Hello community, here is the log from the commit of package libsatsolver checked in at Wed Mar 12 15:22:28 CET 2008. -------- --- libsatsolver/libsatsolver.changes 2008-03-07 10:52:31.000000000 +0100 +++ /mounts/work_src_done/STABLE/libsatsolver/libsatsolver.changes 2008-03-12 14:34:08.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Mar 12 11:45:21 CET 2008 - coolo@suse.de + +- store datadir for susetags +- fixing assertion in rules learning + +------------------------------------------------------------------- Old: ---- satsolver-0.0.21.tar.bz2 New: ---- satsolver-0.0.22.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libsatsolver.spec ++++++ --- /var/tmp/diff_new_pack.V10356/_old 2008-03-12 15:21:54.000000000 +0100 +++ /var/tmp/diff_new_pack.V10356/_new 2008-03-12 15:21:54.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package libsatsolver (Version 0.0.21) +# spec file for package libsatsolver (Version 0.0.22) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,7 +11,7 @@ Name: libsatsolver -Version: 0.0.21 +Version: 0.0.22 Release: 1 License: BSD 3-Clause Url: http://svn.opensuse.org/svn/zypp/trunk/sat-solver @@ -134,6 +134,9 @@ %endif %changelog +* Wed Mar 12 2008 coolo@suse.de +- store datadir for susetags +- fixing assertion in rules learning * Fri Mar 07 2008 coolo@suse.de - several fixes in whatprovides (possibly root cause of bnc#367210) * Mon Feb 25 2008 coolo@suse.de ++++++ satsolver-0.0.21.tar.bz2 -> satsolver-0.0.22.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/bindings/CMakeLists.txt new/satsolver-0.0.22/bindings/CMakeLists.txt --- old/satsolver-0.0.21/bindings/CMakeLists.txt 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/bindings/CMakeLists.txt 2008-03-12 14:34:06.000000000 +0100 @@ -18,5 +18,5 @@ IF (PERL_EXECUTABLE) MESSAGE(STATUS "Perl executable: ${PERL_EXECUTABLE}") -# ADD_SUBDIRECTORY(perl) + ADD_SUBDIRECTORY(perl) ENDIF (PERL_EXECUTABLE) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/package/libsatsolver.changes new/satsolver-0.0.22/package/libsatsolver.changes --- old/satsolver-0.0.21/package/libsatsolver.changes 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/package/libsatsolver.changes 2008-03-12 14:34:06.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Mar 12 11:45:21 CET 2008 - coolo@suse.de + +- store datadir for susetags +- fixing assertion in rules learning + +------------------------------------------------------------------- Fri Mar 7 10:51:09 CET 2008 - coolo@suse.de - several fixes in whatprovides (possibly root cause of bnc#367210) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/poolid.c new/satsolver-0.0.22/src/poolid.c --- old/satsolver-0.0.21/src/poolid.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/poolid.c 2008-03-12 14:34:06.000000000 +0100 @@ -229,7 +229,7 @@ char *p; if (!ISRELDEP(id)) return pool->ss.stringspace + pool->ss.strings[id]; - p = pool_alloctmpspace(pool, dep2strlen(pool, id)); + p = pool_alloctmpspace(pool, dep2strlen(pool, id) + 1); dep2strcpy(pool, p, id); return p; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/repo.c new/satsolver-0.0.22/src/repo.c --- old/satsolver-0.0.21/src/repo.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/repo.c 2008-03-12 14:34:06.000000000 +0100 @@ -920,6 +920,15 @@ repodata_internalize(data); } +void +repo_disable_paging(Repo *repo) +{ + int i; + Repodata *data; + + for (i = 0, data = repo->repodata; i < repo->nrepodata; i++, data++) + repodata_disable_paging(data); +} // EOF /* vim:cinoptions={.5s,g0,p5,t0,(0,^-0.5s,n-0.5s:tw=78:cindent:sw=4: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/repodata.c new/satsolver-0.0.22/src/repodata.c --- old/satsolver-0.0.21/src/repodata.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/repodata.c 2008-03-12 14:34:06.000000000 +0100 @@ -1609,6 +1609,13 @@ } } +void +repodata_disable_paging(Repodata *data) +{ + if (maybe_load_repodata(data, 0) + && data->num_pages) + load_page_range (data, 0, data->num_pages - 1); +} /* vim:cinoptions={.5s,g0,p5,t0,(0,^-0.5s,n-0.5s:tw=78:cindent:sw=4: */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/repodata.h new/satsolver-0.0.22/src/repodata.h --- old/satsolver-0.0.21/src/repodata.h 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/repodata.h 2008-03-12 14:34:06.000000000 +0100 @@ -137,6 +137,7 @@ void repodata_merge_attrs (Repodata *data, Id dest, Id src); void repodata_internalize(Repodata *data); +void repodata_disable_paging(Repodata *data); Id repodata_str2dir(Repodata *data, const char *dir, int create); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/repo.h new/satsolver-0.0.22/src/repo.h --- old/satsolver-0.0.21/src/repo.h 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/repo.h 2008-03-12 14:34:06.000000000 +0100 @@ -201,5 +201,6 @@ void repo_set_str(Repo *repo, Id p, Id keyname, const char *str); void repo_set_poolstr(Repo *repo, Id p, Id keyname, const char *str); void repo_internalize(Repo *repo); +void repo_disable_paging(Repo *repo); #endif /* SATSOLVER_REPO_H */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/solver.c new/satsolver-0.0.22/src/solver.c --- old/satsolver-0.0.21/src/solver.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/solver.c 2008-03-12 14:34:06.000000000 +0100 @@ -604,56 +604,6 @@ POOL_DEBUG(SAT_DEBUG_SCHUBI, "----- makeruledecisions ; size decisionq: %d -----\n",solv->decisionq.count); decisionstart = solv->decisionq.count; -#if 1 - /* FIXME: For the time being we first need to assert what we can get - from learned rules. Currently it can happen that we learn a unit - rule (i.e. assertion) in direct conflict with e.g. a job unit rule. The - input problem was unsolvable, but we can't deal with this situation - of two conflicting assertions (see also FIXME at refine_suggestion). - - What normally would happen (without this loop), we would first see the - job rule (and let's say decide to install A), and later see the learned - rule (which says don't install A), have a conflict, and assert, because - we don't ever expect to see conflicts with learned rules. - - So we gather assertions from learned rules first. This then leads - to a conflict with a job rule, which is dealt with (mostly). We note - that job rule as a problem (and don't remember the learned rule as a - problem like we would normally do, as even other code doesn't expect to - see learned rules in problem descriptions. - - We need to deal with this situation in a better way, preferably by - never learning unit rules in conflicts with any other unit rule. */ - - for (ri = solv->learntrules, r = solv->rules + ri; ri < solv->nrules; ri++, r++) - { - if (!r->w1 || r->w2) /* disabled or no assertion */ - continue; - v = r->p; - vv = v > 0 ? v : -v; - if (solv->decisionmap[vv] == 0) - { - queue_push(&solv->decisionq, v); - queue_push(&solv->decisionq_why, r - solv->rules); - solv->decisionmap[vv] = v > 0 ? 1 : -1; - IF_POOLDEBUG (SAT_DEBUG_PROPAGATE) - { - Solvable *s = solv->pool->solvables + vv; - if (v < 0) - POOL_DEBUG(SAT_DEBUG_PROPAGATE, "conflicting %s (assertion)\n", solvable2str(solv->pool, s)); - else - POOL_DEBUG(SAT_DEBUG_PROPAGATE, "installing %s (assertion)\n", solvable2str(solv->pool, s)); - } - continue; - } - if (v > 0 && solv->decisionmap[vv] > 0) - continue; - if (v < 0 && solv->decisionmap[vv] < 0) - continue; - /* found a conflict, which can't happen with learned rules. */ - assert(0); - } -#endif /* rpm rules don't have assertions, so we can start with the job * rules */ for (ri = solv->jobrules, r = solv->rules + ri; ri < solv->nrules; ri++, r++) @@ -682,10 +632,15 @@ if (v < 0 && solv->decisionmap[vv] < 0) continue; /* found a conflict! */ - /* ri >= learntrules cannot happen, as this would mean that the - * problem was not solvable, so we wouldn't have created the - * learnt rule at all */ - assert(ri < solv->learntrules); + if (ri >= solv->learntrules) + { + /* conflict with a learnt rule */ + /* can happen when packages cannot be installed for + * multiple reasons. */ + /* we disable the learnt rule in this case */ + disablerule(solv, r); + continue; + } /* if we are weak, just disable ourself */ if (ri >= solv->weakrules) { @@ -1933,6 +1888,8 @@ if (solv->decisionmap[vv] <= level && solv->decisionmap[vv] >= -level) break; POOL_DEBUG(SAT_DEBUG_PROPAGATE, "reverting decision %d at %d\n", v, solv->decisionmap[vv]); + if (v > 0 && solv->recommendations.count && v == solv->recommendations.elements[solv->recommendations.count - 1]) + solv->recommendations.count--; solv->decisionmap[vv] = 0; solv->decisionq.count--; solv->decisionq_why.count--; @@ -2113,6 +2070,7 @@ queue_init(&solv->decisionq_why); queue_init(&solv->problems); queue_init(&solv->suggestions); + queue_init(&solv->recommendations); queue_init(&solv->learnt_why); queue_init(&solv->learnt_pool); queue_init(&solv->branches); @@ -2146,6 +2104,7 @@ queue_free(&solv->learnt_pool); queue_free(&solv->problems); queue_free(&solv->suggestions); + queue_free(&solv->recommendations); queue_free(&solv->branches); queue_free(&solv->covenantq); @@ -2366,14 +2325,14 @@ if (p) continue; } - /* dq.count < 2 cannot happen as this means that - * the rule is unit */ - assert(dq.count > 1); IF_POOLDEBUG (SAT_DEBUG_PROPAGATE) { POOL_DEBUG(SAT_DEBUG_PROPAGATE, "unfulfilled "); printrule(solv, SAT_DEBUG_PROPAGATE, r); } + /* dq.count < 2 cannot happen as this means that + * the rule is unit */ + assert(dq.count > 1); olevel = level; level = selectandinstall(solv, level, &dq, 0, disablerules); @@ -2462,6 +2421,7 @@ policy_filter_unwanted(solv, &dq, 0, POLICY_MODE_RECOMMEND); p = dq.elements[0]; POOL_DEBUG(SAT_DEBUG_STATS, "installing recommended %s\n", solvable2str(pool, pool->solvables + p)); + queue_push(&solv->recommendations, p); level = setpropagatelearn(solv, level, p, 0); continue; } @@ -2538,6 +2498,7 @@ } break; } + POOL_DEBUG(SAT_DEBUG_STATS, "done solving.\n\n"); queue_free(&dq); } @@ -2956,6 +2917,16 @@ sat_free(obsoletesmap); + if (solv->recommendations.count) + { + POOL_DEBUG(SAT_DEBUG_RESULT, "\nrecommended packages:\n"); + for (i = 0; i < solv->recommendations.count; i++) + { + s = pool->solvables + solv->recommendations.elements[i]; + POOL_DEBUG(SAT_DEBUG_RESULT, "- %s\n", solvable2str(pool, s)); + } + } + if (solv->suggestions.count) { POOL_DEBUG(SAT_DEBUG_RESULT, "\nsuggested packages:\n"); @@ -3193,6 +3164,13 @@ { if (!*reqrp) *reqrp = rid; + else if (solv->installed && r->p < 0 && solv->pool->solvables[-r->p].repo == solv->installed) + { + /* prefer rules of installed packages */ + Id op = *reqrp >= 0 ? solv->rules[*reqrp].p : -*reqrp; + if (op <= 0 || solv->pool->solvables[op].repo != solv->installed) + *reqrp = rid; + } } } else @@ -3206,6 +3184,13 @@ *reqrp = rid; reqassert = 1; } + else if (solv->installed && solv->pool->solvables[-rid].repo == solv->installed) + { + /* prefer rules of installed packages */ + Id op = *reqrp >= 0 ? solv->rules[*reqrp].p : -*reqrp; + if (op <= 0 || solv->pool->solvables[op].repo != solv->installed) + *reqrp = rid; + } } } if (!*reqrp && lreqr) @@ -3794,7 +3779,56 @@ POOL_DEBUG(SAT_DEBUG_STATS, "problems so far: %d\n", solv->problems.count); /* solve! */ - run_solver(solv, 1, 1); + run_solver(solv, solv->dontinstallrecommended ? 0 : 1, 1); + + /* find recommended packages */ + if (!solv->problems.count && solv->dontinstallrecommended) + { + Id rec, *recp, p, *pp; + + /* create map of all suggests that are still open */ + solv->recommends_index = -1; + MAPZERO(&solv->recommendsmap); + for (i = 0; i < solv->decisionq.count; i++) + { + p = solv->decisionq.elements[i]; + if (p < 0) + continue; + s = pool->solvables + p; + if (s->recommends) + { + recp = s->repo->idarraydata + s->recommends; + while ((rec = *recp++) != 0) + { + FOR_PROVIDES(p, pp, rec) + if (solv->decisionmap[p] > 0) + break; + if (p) + continue; /* already fulfilled */ + FOR_PROVIDES(p, pp, rec) + MAPSET(&solv->recommendsmap, p); + } + } + } + for (i = 1; i < pool->nsolvables; i++) + { + if (solv->decisionmap[i] != 0) + continue; + s = pool->solvables + i; + if (!MAPTST(&solv->recommendsmap, i)) + { + if (!s->supplements) + continue; + if (!pool_installable(pool, s)) + continue; + if (!solver_is_supplementing(solv, s)) + continue; + } + queue_push(&solv->recommendations, i); + } + /* we use MODE_SUGGEST here so that repo prio is ignored */ + policy_filter_unwanted(solv, &solv->recommendations, 0, POLICY_MODE_SUGGEST); + } /* find suggested packages */ if (!solv->problems.count) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/src/solver.h new/satsolver-0.0.22/src/solver.h --- old/satsolver-0.0.21/src/solver.h 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/src/solver.h 2008-03-12 14:34:06.000000000 +0100 @@ -97,11 +97,13 @@ int propagate_index; Queue problems; + Queue recommendations; /* recommended packages */ Queue suggestions; /* suggested packages */ + Map recommendsmap; /* recommended packages from decisionmap */ Map suggestsmap; /* suggested packages from decisionmap */ - int recommends_index; /* recommended level */ + int recommends_index; /* recommendsmap/suggestsmap is created up to this level */ Id *obsoletes; /* obsoletes for each installed solvable */ Id *obsoletes_data; /* data area for obsoletes */ @@ -121,6 +123,7 @@ int allowvirtualconflicts; /* false: conflicts on package name, true: conflicts on package provides */ int noupdateprovide; /* true: update packages needs not to provide old package */ int dosplitprovides; /* true: consider legacy split provides */ + int dontinstallrecommended; /* true: do not install recommended packages */ /* Callbacks for defining the bahaviour of the SAT solver */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/tools/common_write.c new/satsolver-0.0.22/tools/common_write.c --- old/satsolver-0.0.21/tools/common_write.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/tools/common_write.c 2008-03-12 14:34:06.000000000 +0100 @@ -122,6 +122,7 @@ if (key->name == SOLVABLE_FILELIST || key->name == SOLVABLE_DISKUSAGE) return KEY_STORAGE_DROPPED; + name = id2str(repo->pool, key->name); p = strrchr(name, ':'); if (p) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/tools/repo_content.c new/satsolver-0.0.22/tools/repo_content.c --- old/satsolver-0.0.21/tools/repo_content.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/tools/repo_content.c 2008-03-12 14:34:06.000000000 +0100 @@ -249,6 +249,8 @@ s->supplements = adddep(pool, &pd, s->supplements, value, 0); else if (istag ("ENHANCES")) s->enhances = adddep(pool, &pd, s->enhances, value, 0); + else if (istag ("DATADIR")) + repo_set_str(repo, s - pool->solvables, str2id(pool, "susetags:datadir", 1), value); /* FRESHENS doesn't seem to exist. */ /* XXX do something about LINGUAS and ARCH? */ #undef istag diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/tools/repo_rpmmd.c new/satsolver-0.0.22/tools/repo_rpmmd.c --- old/satsolver-0.0.21/tools/repo_rpmmd.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/tools/repo_rpmmd.c 2008-03-12 14:34:06.000000000 +0100 @@ -69,8 +69,6 @@ STATE_SOURCE, STATE_RELNOTESURL, - STATE_FORMAT, - /* rpm-md dependencies inside the format tag */ STATE_PROVIDES, @@ -135,9 +133,7 @@ { STATE_START, "product", STATE_SOLVABLE, 0 }, { STATE_START, "pattern", STATE_SOLVABLE, 0 }, { STATE_START, "patch", STATE_SOLVABLE, 0 }, - - { STATE_START, "metadata", STATE_METADATA, 0 }, - { STATE_METADATA, "package", STATE_SOLVABLE, 0 }, + { STATE_START, "package", STATE_SOLVABLE, 0 }, { STATE_SOLVABLE, "name", STATE_NAME, 1 }, { STATE_SOLVABLE, "arch", STATE_ARCH, 1 }, @@ -168,8 +164,6 @@ { STATE_SOLVABLE, "default", STATE_DEFAULT, 1 }, { STATE_SOLVABLE, "install-time", STATE_INSTALL_TIME, 1 }, - { STATE_SOLVABLE, "format", STATE_FORMAT, 0 }, - /* those are used in libzypp xml store */ { STATE_SOLVABLE, "obsoletes", STATE_CAPS_OBSOLETES , 0 }, { STATE_SOLVABLE, "conflicts", STATE_CAPS_CONFLICTS , 0 }, @@ -181,6 +175,24 @@ { STATE_SOLVABLE, "provides", STATE_CAPS_PROVIDES, 0 }, { STATE_SOLVABLE, "requires", STATE_CAPS_REQUIRES, 0 }, + { STATE_SOLVABLE, "rpm:vendor", STATE_VENDOR, 1 }, + { STATE_SOLVABLE, "rpm:group", STATE_RPM_GROUP, 1 }, + { STATE_SOLVABLE, "rpm:license", STATE_RPM_LICENSE, 1 }, + + /* rpm-md dependencies */ + { STATE_SOLVABLE, "rpm:provides", STATE_PROVIDES, 0 }, + { STATE_SOLVABLE, "rpm:requires", STATE_REQUIRES, 0 }, + { STATE_SOLVABLE, "rpm:obsoletes", STATE_OBSOLETES , 0 }, + { STATE_SOLVABLE, "rpm:conflicts", STATE_CONFLICTS , 0 }, + { STATE_SOLVABLE, "rpm:recommends", STATE_RECOMMENDS , 0 }, + { STATE_SOLVABLE, "rpm:supplements", STATE_SUPPLEMENTS, 0 }, + { STATE_SOLVABLE, "rpm:suggests", STATE_SUGGESTS, 0 }, + { STATE_SOLVABLE, "rpm:enhances", STATE_ENHANCES, 0 }, + { STATE_SOLVABLE, "rpm:freshens", STATE_FRESHENS, 0 }, + { STATE_SOLVABLE, "rpm:sourcerpm", STATE_SOURCERPM, 1 }, + { STATE_SOLVABLE, "rpm:header-range", STATE_HEADERRANGE, 0 }, + { STATE_SOLVABLE, "file", STATE_FILE, 1 }, + { STATE_CAPS_PROVIDES, "capability", STATE_CAP_PROVIDES, 1 }, { STATE_CAPS_REQUIRES, "capability", STATE_CAP_REQUIRES, 1 }, { STATE_CAPS_OBSOLETES, "capability", STATE_CAP_OBSOLETES, 1 }, @@ -191,23 +203,6 @@ { STATE_CAPS_ENHANCES, "capability", STATE_CAP_ENHANCES, 1 }, { STATE_CAPS_FRESHENS, "capability", STATE_CAP_FRESHENS, 1 }, - { STATE_FORMAT, "rpm:vendor", STATE_VENDOR, 1 }, - { STATE_FORMAT, "rpm:group", STATE_RPM_GROUP, 1 }, - { STATE_FORMAT, "rpm:license", STATE_RPM_LICENSE, 1 }, - - /* rpm-md dependencies */ - { STATE_FORMAT, "rpm:provides", STATE_PROVIDES, 0 }, - { STATE_FORMAT, "rpm:requires", STATE_REQUIRES, 0 }, - { STATE_FORMAT, "rpm:obsoletes", STATE_OBSOLETES , 0 }, - { STATE_FORMAT, "rpm:conflicts", STATE_CONFLICTS , 0 }, - { STATE_FORMAT, "rpm:recommends", STATE_RECOMMENDS , 0 }, - { STATE_FORMAT, "rpm:supplements", STATE_SUPPLEMENTS, 0 }, - { STATE_FORMAT, "rpm:suggests", STATE_SUGGESTS, 0 }, - { STATE_FORMAT, "rpm:enhances", STATE_ENHANCES, 0 }, - { STATE_FORMAT, "rpm:freshens", STATE_FRESHENS, 0 }, - { STATE_FORMAT, "rpm:sourcerpm", STATE_SOURCERPM, 1 }, - { STATE_FORMAT, "rpm:header-range", STATE_HEADERRANGE, 0 }, - { STATE_FORMAT, "file", STATE_FILE, 1 }, { STATE_PROVIDES, "rpm:entry", STATE_PROVIDESENTRY, 0 }, { STATE_REQUIRES, "rpm:entry", STATE_REQUIRESENTRY, 0 }, { STATE_OBSOLETES, "rpm:entry", STATE_OBSOLETESENTRY, 0 }, @@ -217,6 +212,7 @@ { STATE_SUGGESTS, "rpm:entry", STATE_SUGGESTSENTRY, 0 }, { STATE_ENHANCES, "rpm:entry", STATE_ENHANCESENTRY, 0 }, { STATE_FRESHENS, "rpm:entry", STATE_FRESHENSENTRY, 0 }, + { NUMSTATES} }; @@ -534,11 +530,21 @@ const char *str; Id entry = s ? (s - pool->solvables) - pd->data->start : 0; + // fprintf(stderr, "into %s, from %d, depth %d, statedepth %d\n", name, pd->state, pd->depth, pd->statedepth); + if (pd->depth != pd->statedepth) { pd->depth++; return; } + + if (pd->state == STATE_START && !strcmp(name, "patterns")) + return; + if (pd->state == STATE_START && !strcmp(name, "metadata")) + return; + if (pd->state == STATE_SOLVABLE && !strcmp(name, "format")) + return; + pd->depth++; for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) if (!strcmp(sw->ename, name)) @@ -727,6 +733,15 @@ // printf("back from unknown %d %d %d\n", pd->state, pd->depth, pd->statedepth); return; } + + /* ignore patterns & metadata */ + if (pd->state == STATE_START && !strcmp(name, "patterns")) + return; + if (pd->state == STATE_START && !strcmp(name, "metadata")) + return; + if (pd->state == STATE_SOLVABLE && !strcmp(name, "format")) + return; + pd->depth--; pd->statedepth--; switch (pd->state) @@ -736,6 +751,8 @@ case STATE_SOLVABLE: if (!s->arch) s->arch = ARCH_NOARCH; + if (!s->evr) + 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); @@ -820,7 +837,7 @@ } pd->state = pd->sbtab[pd->state]; pd->docontent = 0; - //fprintf(stderr, "back from known %d %d %d\n", pd->state, pd->depth, pd->statedepth); + // fprintf(stderr, "back from known %d %d %d\n", pd->state, pd->depth, pd->statedepth); } static void XMLCALL diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/tools/repo_susetags.c new/satsolver-0.0.22/tools/repo_susetags.c --- old/satsolver-0.0.21/tools/repo_susetags.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/tools/repo_susetags.c 2008-03-12 14:34:06.000000000 +0100 @@ -432,12 +432,11 @@ Repodata *data = 0; if ((flags & SUSETAGS_EXTEND) && repo->nrepodata) - { - /* use last repodata */ - data = repo->repodata + repo->nrepodata - 1; - indesc = 1; - } - if (!data) + indesc = 1; + if (repo->nrepodata) + /* use last repodata */ + data = repo->repodata + repo->nrepodata - 1; + else data = repo_add_repodata(repo, 0); memset(&pd, 0, sizeof(pd)); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/tools/repo_write.c new/satsolver-0.0.22/tools/repo_write.c --- old/satsolver-0.0.21/tools/repo_write.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/tools/repo_write.c 2008-03-12 14:34:06.000000000 +0100 @@ -845,7 +845,7 @@ int poolusage, dirpoolusage, idused, dirused; int reloff; - Repodata *data; + Repodata *data, *dirpooldata = 0; Stringpool ownspool, *spool; Dirpool owndirpool, *dirpool; @@ -1051,6 +1051,7 @@ { dirpoolusage = 2; dirpool = &data->dirpool; + dirpooldata = data; } } } @@ -1071,8 +1072,6 @@ else stringpool_init_empty(spool); cbdata.ownspool = spool; - if (dirpoolusage) - dirpoolusage = 3; /* hmm, maybe not needed */ } else if (poolusage == 0 || poolusage == 1) { @@ -1082,6 +1081,7 @@ if (dirpoolusage == 3) { dirpool = &owndirpool; + dirpooldata = 0; dirpool_create(dirpool); cbdata.owndirpool = dirpool; } @@ -1215,8 +1215,6 @@ n++; } - reloff = needid[0].map; - /* If we have fileinfos to write, setup schemas and increment needid[] of the right strings. */ for (i = 0; i < nsubfiles; i++) @@ -1320,10 +1318,18 @@ continue; if (cbdata.dirused && !cbdata.dirused[i]) continue; + if (cbdata.ownspool && dirpooldata && id > 1) + { + id = putinownpool(&cbdata, dirpooldata->localpool ? &dirpooldata->spool : &pool->ss, id); + needid = cbdata.needid; + } needid[id].need++; } } + reloff = needid[0].map; + + /********************************************************************/ /* @@ -1397,7 +1403,10 @@ if (dirmap[i] <= 0) continue; cbdata.dirused[dirmap[i]] = i; - dirmap[i] = needid[dirpool->dirs[dirmap[i]]].need; + id = dirpool->dirs[dirmap[i]]; + if (cbdata.ownspool && dirpooldata && id > 1) + id = putinownpool(&cbdata, dirpooldata->localpool ? &dirpooldata->spool : &pool->ss, id); + dirmap[i] = needid[id].need; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/tools/rpmdb2solv.c new/satsolver-0.0.22/tools/rpmdb2solv.c --- old/satsolver-0.0.21/tools/rpmdb2solv.c 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/tools/rpmdb2solv.c 2008-03-12 14:34:06.000000000 +0100 @@ -65,6 +65,7 @@ } ref = repo_create(refpool, "ref"); repo_add_solv(ref, fp); + repo_disable_paging(ref); fclose(fp); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/satsolver-0.0.21/VERSION.cmake new/satsolver-0.0.22/VERSION.cmake --- old/satsolver-0.0.21/VERSION.cmake 2008-03-07 10:52:30.000000000 +0100 +++ new/satsolver-0.0.22/VERSION.cmake 2008-03-12 14:34:06.000000000 +0100 @@ -46,5 +46,5 @@ SET(LIBSATSOLVER_MAJOR "0") SET(LIBSATSOLVER_MINOR "0") -SET(LIBSATSOLVER_PATCH "21") +SET(LIBSATSOLVER_PATCH "22") ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org