{
int flags = 0;
for (;; p++)
- {
+ {
if (*p == '<')
flags |= REL_LT;
else if (*p == '=')
if (!s->evr)
s->evr = ID_EMPTY;
sid = pool_rel2id(pool, s->name, s->evr, REL_EQ, 1);
- s->provides = repo_addid_dep(s->repo, s->provides, sid, 0);
+ s->provides = repo_addid_dep(s->repo, s->provides, sid, 0);
if (!job || !pool->installed || s->repo != pool->installed)
return;
if (keep == KEEP_VERSION)
bufa = 4096;
bufl = 0;
s = 0;
-
+
while (fgets(buf + bufl, bufa - bufl, fp) > 0)
{
bufl += strlen(buf + bufl);
/*
* repo_helix.c
- *
+ *
* Parse 'helix' XML representation
* and create 'repo'
- *
+ *
* A bit of history: "Helix Code" was the name of the company that
* wrote Red Carpet. The company was later renamed to Ximian.
* The Red Carpet solver was merged into the ZYPP project, the
if (v2 > v && *v2 == ':')
e = "0";
}
-
+
/* compute length of Id string */
l = 1; /* for the \0 */
if (e)
/*
* XML callback
* <name>
- *
+ *
*/
static void XMLCALL
#endif
return;
}
-
+
/* set new state */
pd->state = sw->to;
{
Pool *pool = pd->pool;
Id pid, *pidp;
-
+
if (s->provides)
{
pidp = pd->repo->idarraydata + s->provides;
{
Reldep *prd;
const char *depname;
-
+
if (!ISRELDEP(pid))
continue; /* wrong provides name */
prd = GETRELDEP(pool, pid);
if (!ISRELDEP(pid))
{
depname = pool_id2str(pool, pid);
- }
- else
+ }
+ else
{
Reldep *prd = GETRELDEP(pool, pid);
depname = pool_id2str(pool, prd->name);
/*
* XML callback
* </name>
- *
+ *
* create Solvable from collected data
*/
/* see bugzilla bnc#190163 */
flavor = findKernelFlavor(pd, s);
- if (flavor)
+ if (flavor)
{
char *cflavor = solv_strdup(flavor); /* make pointer safe */
/*
* XML callback
* character data
- *
+ *
*/
static void XMLCALL
/*
* read 'helix' type xml from fp
* add packages to pool/repo
- *
+ *
*/
int
now = solv_timems(0);
data = repo_add_repodata(repo, flags);
-
+
/* prepare parsedata */
memset(&pd, 0, sizeof(pd));
for (i = 0, sw = stateswitches; sw->from != NUMSTATES; i++, sw++)
#include "solv_pgpvrfy.h"
#endif
-static void
+static void
setutf8string(Repodata *repodata, Id handle, Id tag, const char *str)
{
if (str[solv_validutf8(str)])
- {
+ {
char *ustr = solv_latin1toutf8(str); /* not utf8, assume latin1 */
repodata_set_str(repodata, handle, tag, ustr);
solv_free(ustr);
- }
- else
+ }
+ else
repodata_set_str(repodata, handle, tag, str);
}
solv_free(cn);
}
-static void
+static void
set_description_author(Repodata *data, Id handle, char *str)
{
char *aut, *p;
*/
struct rpmdbstate {
- Pool *pool;
+ Pool *pool;
char *rootdir;
RpmHead *rpmhead; /* header storage space */
{
Repodata *sdata;
int i;
-
+
FOR_REPODATAS(repo, i, sdata)
{
int p;
}
}
}
-
+
/*
* read complete file
*
DIR *dir;
FILE *fp;
Repodata *data;
-
+
data = repo_add_repodata(repo, flags);
memset(&pd, 0, sizeof(pd));
pd.repo = repo;
return 1;
}
-static int
+static int
mprsa(int nl, mp_t *n, int el, mp_t *e, mp_t *m, mp_t *c)
{
mp_t *tmp;
static FILE *cookieopen(void *cookie, const char *mode,
- ssize_t (*cread)(void *, char *, size_t),
- ssize_t (*cwrite)(void *, const char *, size_t),
+ ssize_t (*cread)(void *, char *, size_t),
+ ssize_t (*cwrite)(void *, const char *, size_t),
int (*cclose)(void *))
{
#ifdef HAVE_FUNOPEN
if (!cookie)
return 0;
- return funopen(cookie,
+ return funopen(cookie,
(int (*)(void *, char *, int))(*mode == 'r' ? cread : NULL), /* readfn */
(int (*)(void *, const char *, int))(*mode == 'w' ? cwrite : NULL), /* writefn */
(fpos_t (*)(void *, fpos_t, int))NULL, /* seekfn */
int flags;
if ((n = strchr(s, '|')) != 0)
- {
+ {
id = testcase_str2dep(pool, n + 1);
- *n = 0;
+ *n = 0;
id = pool_rel2id(pool, testcase_str2dep(pool, s), id, REL_OR, 1);
- *n = '|';
+ *n = '|';
return id;
}
while (*s == ' ' || *s == '\t')
s += 2;
}
for (;;s++)
- {
+ {
if (*s == '<')
flags |= REL_LT;
else if (*s == '=')
n = pool_id2str(pool, s->name);
e = pool_id2str(pool, s->evr);
a = pool_id2str(pool, s->arch);
- str = pool_alloctmpspace(pool, strlen(n) + strlen(e) + strlen(a) + 3);
- sprintf(str, "%s-%s.%s", n, e, a);
+ str = pool_alloctmpspace(pool, strlen(n) + strlen(e) + strlen(a) + 3);
+ sprintf(str, "%s-%s.%s", n, e, a);
if (!s->repo)
return pool_tmpappend(pool, str, "@", 0);
if (s->repo->name)
if (nfilelist)
{
int l;
- Id did;
- for (l = 0; l < nfilelist; l += strlen(filelist + l) + 1)
+ Id did;
+ for (l = 0; l < nfilelist; l += strlen(filelist + l) + 1)
{
char *p = strrchr(filelist + l, '/');
- if (!p)
+ if (!p)
continue;
- *p++ = 0;
+ *p++ = 0;
did = repodata_str2dir(data, filelist + l, 1);
- p[-1] = '/';
+ p[-1] = '/';
if (!did)
did = repodata_str2dir(data, "/", 1);
repodata_add_dirstr(data, s - pool->solvables, SOLVABLE_FILELIST, did, p);
char *result = solv_malloc(1024);
char *rp = result;
int resultl = 1024;
-
+
for (;;)
{
size_t rl;
char *result = solv_malloc(1024);
char *rp = result;
int resultl = 1024;
-
+
for (;;)
{
size_t rl;