Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10622 - in /trunk/sat-solver: applayer/ bindings/ src/ testsuite/ tools/
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Mon, 21 Jul 2008 16:52:08 -0000
  • Message-id: <20080721165208.D27F12A0F9@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Mon Jul 21 18:52:08 2008
New Revision: 10622

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10622&view=rev
Log:
- no more freshens. R.I.P.

Modified:
trunk/sat-solver/applayer/dependency.c
trunk/sat-solver/applayer/dependency.h
trunk/sat-solver/applayer/xsolvable.c
trunk/sat-solver/bindings/dependency.i
trunk/sat-solver/bindings/solvable.i
trunk/sat-solver/src/knownid.h
trunk/sat-solver/src/pool.c
trunk/sat-solver/src/repo.c
trunk/sat-solver/src/repo.h
trunk/sat-solver/src/repo_helix.c
trunk/sat-solver/src/repo_solv.c
trunk/sat-solver/src/repodata.c
trunk/sat-solver/src/solvable.h
trunk/sat-solver/src/solver.c
trunk/sat-solver/src/solver.h
trunk/sat-solver/testsuite/deptestomatic.c
trunk/sat-solver/tools/dumpsolv.c
trunk/sat-solver/tools/repo_content.c
trunk/sat-solver/tools/repo_patchxml.c
trunk/sat-solver/tools/repo_rpmdb.c
trunk/sat-solver/tools/repo_rpmmd.c
trunk/sat-solver/tools/repo_susetags.c
trunk/sat-solver/tools/repo_write.c

Modified: trunk/sat-solver/applayer/dependency.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/applayer/dependency.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/applayer/dependency.c (original)
+++ trunk/sat-solver/applayer/dependency.c Mon Jul 21 18:52:08 2008
@@ -50,7 +50,6 @@
case DEP_SUG: return &(s->suggests); break;
case DEP_SUP: return &(s->supplements); break;
case DEP_ENH: return &(s->enhances); break;
- case DEP_FRE: return &(s->freshens); break;
}
return NULL;
}

Modified: trunk/sat-solver/applayer/dependency.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/applayer/dependency.h?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/applayer/dependency.h (original)
+++ trunk/sat-solver/applayer/dependency.h Mon Jul 21 18:52:08 2008
@@ -25,8 +25,7 @@
DEP_REC,
DEP_SUG,
DEP_SUP,
- DEP_ENH,
- DEP_FRE
+ DEP_ENH
};

typedef struct _Dependency {

Modified: trunk/sat-solver/applayer/xsolvable.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/applayer/xsolvable.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/applayer/xsolvable.c (original)
+++ trunk/sat-solver/applayer/xsolvable.c Mon Jul 21 18:52:08 2008
@@ -133,7 +133,6 @@
copy_deps( repo, &(new_s->suggests), old_s->repo->idarraydata +
old_s->suggests );
copy_deps( repo, &(new_s->supplements), old_s->repo->idarraydata +
old_s->supplements );
copy_deps( repo, &(new_s->enhances), old_s->repo->idarraydata +
old_s->enhances );
- copy_deps( repo, &(new_s->freshens), old_s->repo->idarraydata +
old_s->freshens );

return xsolvable_new( repo->pool, sid );
}

Modified: trunk/sat-solver/bindings/dependency.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/dependency.i?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/bindings/dependency.i (original)
+++ trunk/sat-solver/bindings/dependency.i Mon Jul 21 18:52:08 2008
@@ -34,7 +34,6 @@
%constant int DEP_SUG = DEP_SUG;
%constant int DEP_SUP = DEP_SUP;
%constant int DEP_ENH = DEP_ENH;
- %constant int DEP_FRE = DEP_FRE;

Dependency( XSolvable *xsolvable, int dep )
{ return dependency_new( xsolvable, dep ); }

Modified: trunk/sat-solver/bindings/solvable.i
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/solvable.i?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/bindings/solvable.i (original)
+++ trunk/sat-solver/bindings/solvable.i Mon Jul 21 18:52:08 2008
@@ -270,8 +270,6 @@
{ return dependency_new( $self, DEP_SUP ); }
Dependency *enhances()
{ return dependency_new( $self, DEP_ENH ); }
- Dependency *freshens()
- { return dependency_new( $self, DEP_FRE ); }

#if defined(SWIGRUBY)
%rename( "provides?" ) does_provide( const char *name );

Modified: trunk/sat-solver/src/knownid.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/knownid.h?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/knownid.h (original)
+++ trunk/sat-solver/src/knownid.h Mon Jul 21 18:52:08 2008
@@ -38,7 +38,6 @@
KNOWNID(SOLVABLE_SUGGESTS, "solvable:suggests"),
KNOWNID(SOLVABLE_SUPPLEMENTS, "solvable:supplements"),
KNOWNID(SOLVABLE_ENHANCES, "solvable:enhances"),
-KNOWNID(SOLVABLE_FRESHENS, "solvable:freshens"),
KNOWNID(RPM_RPMDBID, "rpm:dbid"),
/* normal requires before this, prereqs after this */
KNOWNID(SOLVABLE_PREREQMARKER, "solvable:prereqmarker"),

Modified: trunk/sat-solver/src/pool.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/pool.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/pool.c (original)
+++ trunk/sat-solver/src/pool.c Mon Jul 21 18:52:08 2008
@@ -907,8 +907,6 @@
pool_addfileprovides_dep(pool, repo->idarraydata + s->supplements,
&sf, isfp);
if (s->enhances)
pool_addfileprovides_dep(pool, repo->idarraydata + s->enhances, &sf,
isfp);
- if (s->freshens)
- pool_addfileprovides_dep(pool, repo->idarraydata + s->freshens, &sf,
isfp);
}
map_free(&sf.seen);
map_free(&isf.seen);

Modified: trunk/sat-solver/src/repo.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/repo.c (original)
+++ trunk/sat-solver/src/repo.c Mon Jul 21 18:52:08 2008
@@ -316,7 +316,7 @@
}

Offset
-repo_fix_legacy(Repo *repo, Offset provides, Offset supplements)
+repo_fix_legacy(Repo *repo, Offset provides, Offset supplements, Offset
freshens)
{
Pool *pool = repo->pool;
Id id, idp, idl;
@@ -403,81 +403,107 @@
}
}
}
- if (!supplements)
- return 0;
- for (i = supplements; repo->idarraydata[i]; i++)
+ if (supplements)
{
- id = repo->idarraydata[i];
- if (ISRELDEP(id))
- continue;
- dep = (char *)id2str(pool, id);
- if (!strncmp(dep, "system:modalias(", 16))
- dep += 7;
- if (!strncmp(dep, "modalias(", 9) && dep[9] && dep[10] && strlen(dep) <
sizeof(buf))
+ for (i = supplements; repo->idarraydata[i]; i++)
{
- strcpy(buf, dep);
- p = strchr(buf + 9, ':');
- if (p && p != buf + 9 && strchr(p + 1, ':'))
- {
- *p++ = 0;
- idp = str2id(pool, buf + 9, 1);
- p[strlen(p) - 1] = 0;
- id = str2id(pool, p, 1);
- id = rel2id(pool, NAMESPACE_MODALIAS, id, REL_NAMESPACE, 1);
- id = rel2id(pool, idp, id, REL_AND, 1);
- }
- else
+ id = repo->idarraydata[i];
+ if (ISRELDEP(id))
+ continue;
+ dep = (char *)id2str(pool, id);
+ if (!strncmp(dep, "system:modalias(", 16))
+ dep += 7;
+ if (!strncmp(dep, "modalias(", 9) && dep[9] && dep[10] && strlen(dep)
< sizeof(buf))
{
- p = buf + 9;
- p[strlen(p) - 1] = 0;
- id = str2id(pool, p, 1);
- id = rel2id(pool, NAMESPACE_MODALIAS, id, REL_NAMESPACE, 1);
+ strcpy(buf, dep);
+ p = strchr(buf + 9, ':');
+ if (p && p != buf + 9 && strchr(p + 1, ':'))
+ {
+ *p++ = 0;
+ idp = str2id(pool, buf + 9, 1);
+ p[strlen(p) - 1] = 0;
+ id = str2id(pool, p, 1);
+ id = rel2id(pool, NAMESPACE_MODALIAS, id, REL_NAMESPACE, 1);
+ id = rel2id(pool, idp, id, REL_AND, 1);
+ }
+ else
+ {
+ p = buf + 9;
+ p[strlen(p) - 1] = 0;
+ id = str2id(pool, p, 1);
+ id = rel2id(pool, NAMESPACE_MODALIAS, id, REL_NAMESPACE, 1);
+ }
+ if (id)
+ repo->idarraydata[i] = id;
}
- if (id)
- repo->idarraydata[i] = id;
- }
- else if (!strncmp(dep, "packageand(", 11) && strlen(dep) < sizeof(buf))
- {
- strcpy(buf, dep);
- id = 0;
- dep = buf + 11;
- while ((p = strchr(dep, ':')) != 0)
+ else if (!strncmp(dep, "packageand(", 11) && strlen(dep) <
sizeof(buf))
{
- if (p == dep)
+ strcpy(buf, dep);
+ id = 0;
+ dep = buf + 11;
+ while ((p = strchr(dep, ':')) != 0)
+ {
+ if (p == dep)
+ {
+ dep = p + 1;
+ continue;
+ }
+ *p++ = 0;
+ idp = str2id(pool, dep, 1);
+ if (id)
+ id = rel2id(pool, id, idp, REL_AND, 1);
+ else
+ id = idp;
+ dep = p;
+ }
+ if (dep[0] && dep[1])
{
- dep = p + 1;
- continue;
+ dep[strlen(dep) - 1] = 0;
+ idp = str2id(pool, dep, 1);
+ if (id)
+ id = rel2id(pool, id, idp, REL_AND, 1);
+ else
+ id = idp;
}
- *p++ = 0;
- idp = str2id(pool, dep, 1);
if (id)
- id = rel2id(pool, id, idp, REL_AND, 1);
- else
- id = idp;
- dep = p;
+ repo->idarraydata[i] = id;
}
- if (dep[0] && dep[1])
+ else if (!strncmp(dep, "filesystem(", 11) && strlen(dep) <
sizeof(buf))
{
- dep[strlen(dep) - 1] = 0;
- idp = str2id(pool, dep, 1);
- if (id)
- id = rel2id(pool, id, idp, REL_AND, 1);
- else
- id = idp;
+ strcpy(buf, dep + 11);
+ if ((p = strrchr(buf, ')')) != 0)
+ *p = 0;
+ id = str2id(pool, buf, 1);
+ id = rel2id(pool, NAMESPACE_FILESYSTEM, id, REL_NAMESPACE, 1);
+ repo->idarraydata[i] = id;
}
- if (id)
- repo->idarraydata[i] = id;
- }
- else if (!strncmp(dep, "filesystem(", 11) && strlen(dep) < sizeof(buf))
- {
- strcpy(buf, dep + 11);
- if ((p = strrchr(buf, ')')) != 0)
- *p = 0;
- id = str2id(pool, buf, 1);
- id = rel2id(pool, NAMESPACE_FILESYSTEM, id, REL_NAMESPACE, 1);
- repo->idarraydata[i] = id;
}
}
+ if (freshens && repo->idarraydata[freshens])
+ {
+ Id idsupp = 0, idfresh = 0;
+ if (!supplements)
+ return freshens;
+ for (i = supplements; repo->idarraydata[i]; i++)
+ {
+ if (!idsupp)
+ idsupp = repo->idarraydata[i];
+ else
+ idsupp = rel2id(pool, idsupp, repo->idarraydata[i], REL_OR, 1);
+ }
+ for (i = freshens; repo->idarraydata[i]; i++)
+ {
+ if (!idfresh)
+ idfresh = repo->idarraydata[i];
+ else
+ idfresh = rel2id(pool, idfresh, repo->idarraydata[i], REL_OR, 1);
+ }
+ if (!idsupp)
+ idsupp = idfresh;
+ else
+ idsupp = rel2id(pool, idsupp, idfresh, REL_AND, 1);
+ supplements = repo_addid_dep(repo, 0, idsupp, 0);
+ }
return supplements;
}

@@ -573,7 +599,6 @@
{ SOLVABLE_SUGGESTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
{ SOLVABLE_SUPPLEMENTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
{ SOLVABLE_ENHANCES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_FRESHENS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
{ RPM_RPMDBID, REPOKEY_TYPE_U32, 0, KEY_STORAGE_SOLVABLE },
};

@@ -693,11 +718,6 @@
domatch_idarray(s, SOLVABLE_ENHANCES, md, repo->idarraydata +
s->enhances);
if (keyname || md->stop > SEARCH_NEXT_KEY)
return;
- case SOLVABLE_FRESHENS:
- if (s->freshens)
- domatch_idarray(s, SOLVABLE_FRESHENS, md, repo->idarraydata +
s->freshens);
- if (keyname || md->stop > SEARCH_NEXT_KEY)
- return;
case RPM_RPMDBID:
if (repo->rpmdbid)
{

Modified: trunk/sat-solver/src/repo.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo.h?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/repo.h (original)
+++ trunk/sat-solver/src/repo.h Mon Jul 21 18:52:08 2008
@@ -61,7 +61,7 @@
extern Offset repo_addid(Repo *repo, Offset olddeps, Id id);
extern Offset repo_addid_dep(Repo *repo, Offset olddeps, Id id, Id marker);
extern Offset repo_reserve_ids(Repo *repo, Offset olddeps, int num);
-extern Offset repo_fix_legacy(Repo *repo, Offset provides, Offset supplements);
+extern Offset repo_fix_legacy(Repo *repo, Offset provides, Offset supplements,
Offset freshens);

static inline const char *repo_name(const Repo *repo)
{

Modified: trunk/sat-solver/src/repo_helix.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo_helix.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/repo_helix.c (original)
+++ trunk/sat-solver/src/repo_helix.c Mon Jul 21 18:52:08 2008
@@ -146,6 +146,7 @@
Repo *repo; // current repo
Repodata *data; // current repo data
Solvable *solvable; // current solvable
+ Offset freshens; // current freshens vector

// package data
int epoch; // epoch (as offset into evrspace)
@@ -455,6 +456,7 @@
pd->epoch = 0;
pd->version = 0;
pd->release = 0;
+ pd->freshens = 0;
#if 0
fprintf(stderr, "package #%d\n", s - pool->solvables);
#endif
@@ -516,10 +518,10 @@
s->enhances = adddep(pool, pd, s->enhances, atts, 0);
break;
case STATE_FRESHENS:
- s->freshens = 0;
+ pd->freshens = 0;
break;
case STATE_FRESHENSENTRY:
- s->freshens = adddep(pool, pd, s->freshens, atts, 0);
+ pd->freshens = adddep(pool, pd, pd->freshens, atts, 0);
break;
default:
break;
@@ -620,7 +622,8 @@
/* ensure self-provides */
if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pool,
s->name, s->evr, REL_EQ, 1), 0);
- s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements);
+ s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements,
pd->freshens);
+ pd->freshens = 0;

/* see bugzilla bnc#190163 */
const char *flavor = findKernelFlavor(pd, s);

Modified: trunk/sat-solver/src/repo_solv.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo_solv.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/repo_solv.c (original)
+++ trunk/sat-solver/src/repo_solv.c Mon Jul 21 18:52:08 2008
@@ -29,7 +29,7 @@
#include "repopack.h"

#define INTERESTED_START SOLVABLE_NAME
-#define INTERESTED_END SOLVABLE_FRESHENS
+#define INTERESTED_END SOLVABLE_ENHANCES

#define SOLV_ERROR_NOT_SOLV 1
#define SOLV_ERROR_UNSUPPORTED 2
@@ -1453,8 +1453,6 @@
s->suggests = ido;
else if (id == SOLVABLE_ENHANCES)
s->enhances = ido;
- else if (id == SOLVABLE_FRESHENS)
- s->freshens = ido;
#if 0
POOL_DEBUG(SAT_DEBUG_STATS, "%s ->\n", id2str(pool, id));
for (; repo->idarraydata[ido]; ido++)

Modified: trunk/sat-solver/src/repodata.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repodata.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/repodata.c (original)
+++ trunk/sat-solver/src/repodata.c Mon Jul 21 18:52:08 2008
@@ -848,7 +848,6 @@
{ SOLVABLE_SUGGESTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
{ SOLVABLE_SUPPLEMENTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
{ SOLVABLE_ENHANCES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_FRESHENS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
{ RPM_RPMDBID, REPOKEY_TYPE_U32, 0, KEY_STORAGE_SOLVABLE },
};

@@ -944,10 +943,6 @@
di->idp = s->enhances
? di->repo->idarraydata + s->enhances : 0;
continue;
- case SOLVABLE_FRESHENS:
- di->idp = s->freshens
- ? di->repo->idarraydata + s->freshens : 0;
- continue;
case RPM_RPMDBID:
if (!di->repo->rpmdbid)
continue;

Modified: trunk/sat-solver/src/solvable.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solvable.h?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/solvable.h (original)
+++ trunk/sat-solver/src/solvable.h Mon Jul 21 18:52:08 2008
@@ -38,7 +38,6 @@
Offset supplements;
Offset enhances;

- Offset freshens;
} Solvable;

#endif /* SATSOLVER_SOLVABLE_H */

Modified: trunk/sat-solver/src/solver.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.c (original)
+++ trunk/sat-solver/src/solver.c Mon Jul 21 18:52:08 2008
@@ -1022,50 +1022,6 @@
}
}

-#if CODE10
-/*-------------------------------------------------------------------
- * add patch atom requires
- */
-
-static void
-addpatchatomrequires(Solver *solv, Solvable *s, Id *dp, Queue *q, Map *m)
-{
- Pool *pool = solv->pool;
- Id fre, *frep, p, *pp, ndp;
- Solvable *ps;
- Queue fq;
- Id qbuf[64];
- int i, used = 0;
-
- queue_init_buffer(&fq, qbuf, sizeof(qbuf)/sizeof(*qbuf));
- queue_push(&fq, -(s - pool->solvables));
- for (; *dp; dp++)
- queue_push(&fq, *dp);
- ndp = pool_queuetowhatprovides(pool, &fq);
- frep = s->repo->idarraydata + s->freshens;
- while ((fre = *frep++) != 0)
- {
- FOR_PROVIDES(p, pp, fre)
- {
- ps = pool->solvables + p;
- addrule(solv, -p, ndp);
- used = 1;
- if (!MAPTST(m, p))
- queue_push(q, p);
- }
- }
- if (used)
- {
- for (i = 1; i < fq.count; i++)
- {
- p = fq.elements[i];
- if (!MAPTST(m, p))
- queue_push(q, p);
- }
- }
- queue_free(&fq);
-}
-#endif


/*-------------------------------------------------------------------
@@ -1158,15 +1114,6 @@
POOL_DEBUG(SAT_DEBUG_RULE_CREATION, "package %s [%d] is not
installable\n", solvable2str(pool, s), (Id)(s - pool->solvables));
addrule(solv, -n, 0); /* uninstallable */
}
-#if CODE10
- patchatom = 0;
- if (s->freshens && !s->supplements)
- {
- const char *name = id2str(pool, s->name);
- if (name[0] == 'a' && !strncmp(name, "atom:", 5))
- patchatom = 1;
- }
-#endif

/*-----------------------------------------
* check requires of s
@@ -1377,17 +1324,6 @@
break;
}

- /* if nothing found, check for freshens
- * (patterns use this)
- */
- if (!sup && s->freshens)
- {
- supp = s->repo->idarraydata + s->freshens;
- while ((sup = *supp++) != ID_NULL)
- if (dep_possible(solv, sup, m))
- break;
- }
-
/* if nothing found, check for enhances */
if (!sup && s->enhances)
{
@@ -1396,7 +1332,7 @@
if (dep_possible(solv, sup, m))
break;
}
- /* if notthing found, goto next solvables */
+ /* if nothing found, goto next solvables */
if (!sup)
continue;
addrpmrulesforsolvable(solv, s, m);
@@ -2658,7 +2594,7 @@
else
{
s = pool->solvables + i;
- if (!s->supplements && !s->freshens)
+ if (!s->supplements)
continue;
if (!pool_installable(pool, s))
continue;
@@ -2687,7 +2623,7 @@
{
p = dqs.elements[i];
s = pool->solvables + p;
- if (!s->supplements && !s->freshens)
+ if (!s->supplements)
continue;
if (!solver_is_supplementing(solv, s))
queue_pushunique(&dq, p);
@@ -3896,7 +3832,7 @@
oldnrules = solv->nrules;

/*
- * add rules for suggests, [freshens,] enhances
+ * add rules for suggests, enhances
*/
addrpmrulesforweak(solv, &addedmap);
POOL_DEBUG(SAT_DEBUG_STATS, "added %d rpm rules because of weak
dependencies\n", solv->nrules - oldnrules);
@@ -3953,17 +3889,6 @@
addrule(solv, 0, 0); /* create dummy rule */
continue;
}
-#if CODE10
- if (s->freshens && !s->supplements)
- {
- const char *name = id2str(pool, s->name);
- if (name[0] == 'a' && !strncmp(name, "atom:", 5))
- {
- addrule(solv, 0, 0);
- continue;
- }
- }
-#endif
addupdaterule(solv, s, 1); /* allow s to be updated */
}
/*
@@ -3998,18 +3923,6 @@
continue;
}

-#if CODE10
- /* no update rules for patch atoms */
- if (s->freshens && !s->supplements)
- {
- const char *name = id2str(pool, s->name);
- if (name[0] == 'a' && !strncmp(name, "atom:", 5))
- {
- addrule(solv, 0, 0);
- continue;
- }
- }
-#endif
addupdaterule(solv, s, 0); /* allowall = 0: downgrades allowed */

/*

Modified: trunk/sat-solver/src/solver.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.h?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.h (original)
+++ trunk/sat-solver/src/solver.h Mon Jul 21 18:52:08 2008
@@ -289,27 +289,13 @@
solver_is_supplementing(Solver *solv, Solvable *s)
{
Id sup, *supp;
- if (!s->supplements && !s->freshens)
+ if (!s->supplements)
return 0;
- if (s->supplements)
- {
- supp = s->repo->idarraydata + s->supplements;
- while ((sup = *supp++) != 0)
- if (solver_dep_fulfilled(solv, sup))
- break;
- if (!sup)
- return 0;
- }
- if (s->freshens)
- {
- supp = s->repo->idarraydata + s->freshens;
- while ((sup = *supp++) != 0)
- if (solver_dep_fulfilled(solv, sup))
- break;
- if (!sup)
- return 0;
- }
- return 1;
+ supp = s->repo->idarraydata + s->supplements;
+ while ((sup = *supp++) != 0)
+ if (solver_dep_fulfilled(solv, sup))
+ return 1;
+ return 0;
}

static inline int

Modified: trunk/sat-solver/testsuite/deptestomatic.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/testsuite/deptestomatic.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/testsuite/deptestomatic.c (original)
+++ trunk/sat-solver/testsuite/deptestomatic.c Mon Jul 21 18:52:08 2008
@@ -926,6 +926,7 @@
{
const char *name = attrval( atts, "name" );
const char *file = attrval( atts, "file" );
+ const char *prio = attrval( atts, "priority" );
if (file)
{
char path[PATH_MAX];
@@ -949,6 +950,8 @@
cmap->name = cname;
cmap->nid = str2id( pool, cname, 1 );
cmap->repo = repo;
+ if (prio)
+ repo->priority = 99 - atoi(prio);
}
else
{

Modified: trunk/sat-solver/tools/dumpsolv.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/dumpsolv.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/dumpsolv.c (original)
+++ trunk/sat-solver/tools/dumpsolv.c Mon Jul 21 18:52:08 2008
@@ -291,7 +291,6 @@
printids(repo, "suggests", s->suggests);
printids(repo, "supplements", s->supplements);
printids(repo, "enhances", s->enhances);
- printids(repo, "freshens", s->freshens);
if (repo->rpmdbid)
printf("rpmdbid: %u\n", repo->rpmdbid[i - repo->start]);
#if 0

Modified: trunk/sat-solver/tools/repo_content.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_content.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_content.c (original)
+++ trunk/sat-solver/tools/repo_content.c Mon Jul 21 18:52:08 2008
@@ -230,7 +230,7 @@
if (s && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
s->provides = repo_addid_dep(repo, s->provides,
rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
if (s)
- s->supplements = repo_fix_legacy(repo, s->provides,
s->supplements);
+ s->supplements = repo_fix_legacy(repo, s->provides,
s->supplements, 0);
/* Only support one product. */
s = pool_id2solvable(pool, repo_add_solvable(repo));
repodata_extend(data, s - pool->solvables);
@@ -319,7 +319,7 @@
if (s && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
s->provides = repo_addid_dep(repo, s->provides, rel2id(pool, s->name,
s->evr, REL_EQ, 1), 0);
if (s)
- s->supplements = repo_fix_legacy(repo, s->provides, s->supplements);
+ s->supplements = repo_fix_legacy(repo, s->provides, s->supplements, 0);

if (pd.tmp)
sat_free(pd.tmp);

Modified: trunk/sat-solver/tools/repo_patchxml.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_patchxml.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_patchxml.c (original)
+++ trunk/sat-solver/tools/repo_patchxml.c Mon Jul 21 18:52:08 2008
@@ -148,6 +148,7 @@
unsigned int datanum;
Solvable *solvable;
char *kind;
+ Offset freshens;
unsigned int timestamp;

struct stateswitch *swtab[NUMSTATES];
@@ -407,6 +408,7 @@
pd->kind = "patch";

pd->solvable = pool_id2solvable(pool, repo_add_solvable(pd->repo));
+ pd->freshens = 0;

if (!strcmp(pd->kind, "patch"))
{
@@ -574,10 +576,10 @@
s->enhances = adddep(pool, pd, s->enhances, atts, 0);
break;
case STATE_FRESHENS:
- s->freshens = 0;
+ pd->freshens = 0;
break;
case STATE_FRESHENSENTRY:
- s->freshens = adddep(pool, pd, s->freshens, atts, 0);
+ pd->freshens = adddep(pool, pd, pd->freshens, atts, 0);
break;
case STATE_REBOOT:
repodata_set_void(pd->data, pd->datanum, UPDATE_REBOOT);
@@ -618,7 +620,8 @@
s->arch = ARCH_NOARCH;
if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pool,
s->name, s->evr, REL_EQ, 1), 0);
- s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements);
+ s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements,
pd->freshens);
+ pd->freshens = 0;
break;
case STATE_NAME:
s->name = str2id(pool, pd->content, 1);

Modified: trunk/sat-solver/tools/repo_rpmdb.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_rpmdb.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_rpmdb.c (original)
+++ trunk/sat-solver/tools/repo_rpmdb.c Mon Jul 21 18:52:08 2008
@@ -837,8 +837,7 @@
s->suggests = makedeps(pool, repo, rpmhead, TAG_SUGGESTSNAME,
TAG_SUGGESTSVERSION, TAG_SUGGESTSFLAGS, 1);
s->supplements = makedeps(pool, repo, rpmhead, TAG_ENHANCESNAME,
TAG_ENHANCESVERSION, TAG_ENHANCESFLAGS, 2);
s->enhances = makedeps(pool, repo, rpmhead, TAG_ENHANCESNAME,
TAG_ENHANCESVERSION, TAG_ENHANCESFLAGS, 1);
- s->freshens = 0;
- s->supplements = repo_fix_legacy(repo, s->provides, s->supplements);
+ s->supplements = repo_fix_legacy(repo, s->provides, s->supplements, 0);

if (repodata)
{
@@ -1107,7 +1106,6 @@
s->suggests = copydeps(pool, repo, r->suggests, fromrepo);
s->supplements = copydeps(pool, repo, r->supplements, fromrepo);
s->enhances = copydeps(pool, repo, r->enhances, fromrepo);
- s->freshens = copydeps(pool, repo, r->freshens, fromrepo);

/* copy all attributes */
if (!data)

Modified: trunk/sat-solver/tools/repo_rpmmd.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_rpmmd.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_rpmmd.c (original)
+++ trunk/sat-solver/tools/repo_rpmmd.c Mon Jul 21 18:52:08 2008
@@ -231,6 +231,7 @@
int acontent;
int docontent;
Solvable *solvable;
+ Offset freshens;
struct stateswitch *swtab[NUMSTATES];
enum state sbtab[NUMSTATES];
const char *lang;
@@ -578,6 +579,7 @@
pd->kind = "patch";

pd->solvable = pool_id2solvable(pool,
repo_add_solvable(pd->common.repo));
+ pd->freshens = 0;
repodata_extend(pd->data, pd->solvable - pool->solvables);
pd->handle = repodata_get_handle(pd->data, (pd->solvable -
pool->solvables) - pd->data->start);
#if 0
@@ -645,10 +647,10 @@
break;
case STATE_CAPS_FRESHENS:
case STATE_FRESHENS:
- s->freshens = 0;
+ pd->freshens = 0;
break;
case STATE_FRESHENSENTRY:
- s->freshens = adddep(pool, pd, s->freshens, atts, 0);
+ pd->freshens = adddep(pool, pd, pd->freshens, atts, 0);
break;
case STATE_CAP_PROVIDES:
case STATE_CAP_REQUIRES:
@@ -761,7 +763,8 @@
s->evr = ID_EMPTY; /* some patterns have this */
if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
s->provides = repo_addid_dep(repo, s->provides, rel2id(pool, s->name,
s->evr, REL_EQ, 1), 0);
- s->supplements = repo_fix_legacy(repo, s->provides, s->supplements);
+ s->supplements = repo_fix_legacy(repo, s->provides, s->supplements,
pd->freshens);
+ pd->freshens = 0;
pd->kind = 0;
break;
case STATE_NAME:
@@ -827,7 +830,7 @@
s->enhances = adddepplain(pool, &pd->common, s->enhances, pd->content,
0, pd->capkind);
break;
case STATE_CAP_FRESHENS:
- s->freshens = adddepplain(pool, &pd->common, s->freshens, pd->content,
0, pd->capkind);
+ pd->freshens = adddepplain(pool, &pd->common, pd->freshens, pd->content,
0, pd->capkind);
break;
case STATE_SUMMARY:
pd->lang = 0;

Modified: trunk/sat-solver/tools/repo_susetags.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_susetags.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_susetags.c (original)
+++ trunk/sat-solver/tools/repo_susetags.c Mon Jul 21 18:52:08 2008
@@ -379,7 +379,7 @@
*/

static void
-finish_solvable(struct parsedata *pd, Solvable *s, int handle)
+finish_solvable(struct parsedata *pd, Solvable *s, int handle, Offset freshens)
{
Pool *pool = pd->repo->pool;

@@ -449,7 +449,7 @@
rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
/* XXX This uses repo_addid_dep internally, so should also be
harmless to do twice. */
- s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements);
+ s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements,
freshens);
if (pd->ndirs)
commit_diskusage (pd, handle);
}
@@ -461,6 +461,7 @@
char *line, *linep;
int aline;
Solvable *s;
+ Offset freshens;
int intag = 0;
int cummulate = 0;
int indesc = 0;
@@ -489,6 +490,7 @@

linep = line;
s = 0;
+ freshens = 0;

/* XXX deactivate test code */
blanr = 0;
@@ -624,7 +626,7 @@
/* If we have an old solvable, complete it by filling in some
default stuff. */
if (s)
- finish_solvable(&pd, s, handle);
+ finish_solvable(&pd, s, handle, freshens);

/*
* define kind
@@ -652,6 +654,7 @@
evr = makeevr(pool, join2(sp[1], "-", sp[2]));

s = 0;
+ freshens = 0;

/* Now see if we know this solvable already. If we found neither
the name nor the arch at all in this repo
@@ -752,7 +755,7 @@
s->suggests = adddep(pool, &pd, s->suggests, line, 0, pd.kind);
continue;
case CTAG('=', 'F', 'r', 'e'):
/* freshens */
- s->freshens = adddep(pool, &pd, s->freshens, line, 0, pd.kind);
+ freshens = adddep(pool, &pd, freshens, line, 0, pd.kind);
continue;
case CTAG('=', 'P', 'r', 'c'):
/* packages recommended */
if (flags & SUSETAGS_KINDS_SEPARATELY)
@@ -782,7 +785,7 @@
if (flags & SUSETAGS_KINDS_SEPARATELY)
fprintf (stderr, "Unsupported: pattern -> package freshens\n");
else
- s->freshens = adddep(pool, &pd, s->freshens, line, 0, 0);
+ freshens = adddep(pool, &pd, freshens, line, 0, 0);
continue;
case CTAG('=', 'P', 's', 'p'):
/* pattern: package supplements */
if (flags & SUSETAGS_KINDS_SEPARATELY)
@@ -952,7 +955,7 @@
} /* for(;;) */

if (s)
- finish_solvable(&pd, s, handle);
+ finish_solvable(&pd, s, handle, freshens);

/* Shared attributes
* (e.g. multiple binaries built from same source)

Modified: trunk/sat-solver/tools/repo_write.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_write.c?rev=10622&r1=10621&r2=10622&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_write.c (original)
+++ trunk/sat-solver/tools/repo_write.c Mon Jul 21 18:52:08 2008
@@ -1267,11 +1267,6 @@
*sp++ = SOLVABLE_ENHANCES;
cbdata.mykeys[SOLVABLE_ENHANCES].size += incneedidarray(pool,
idarraydata + s->enhances, needid);
}
- if (s->freshens && cbdata.keymap[SOLVABLE_FRESHENS])
- {
- *sp++ = SOLVABLE_FRESHENS;
- cbdata.mykeys[SOLVABLE_FRESHENS].size += incneedidarray(pool,
idarraydata + s->freshens, needid);
- }
if (repo->rpmdbid && cbdata.keymap[RPM_RPMDBID])
{
*sp++ = RPM_RPMDBID;
@@ -1533,8 +1528,6 @@
data_addidarray_sort(xd, pool, needid, idarraydata + s->supplements,
0);
if (s->enhances && cbdata.keymap[SOLVABLE_ENHANCES])
data_addidarray_sort(xd, pool, needid, idarraydata + s->enhances, 0);
- if (s->freshens && cbdata.keymap[SOLVABLE_FRESHENS])
- data_addidarray_sort(xd, pool, needid, idarraydata + s->freshens, 0);
if (repo->rpmdbid && cbdata.keymap[RPM_RPMDBID])
data_addu32(xd, repo->rpmdbid[i - repo->start]);
if (anyrepodataused)

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages