15 #define CACHE_DEPENDENCY_RESULT 1
16 #if defined(CACHE_DEPENDENCY_RESULT)
17 #define _RPMDB_INTERNAL
21 #define _RPMEVR_INTERNAL
25 #define _RPMTE_INTERNAL
28 #define _RPMTS_INTERNAL
54 #if defined(CACHE_DEPENDENCY_RESULT)
73 static int intcmp(
const void * a,
const void * b)
78 int rc = (*aptr - *bptr);
100 if (ts->numRemovedPackages > 0 && ts->removedPackages != NULL) {
103 needle = bsearch(&dboffset, ts->removedPackages, ts->numRemovedPackages,
104 sizeof(*ts->removedPackages),
intcmp);
105 if (needle != NULL) {
108 *indexp = needle - ts->removedPackages;
114 if (ts->numRemovedPackages == ts->allocedRemovedPackages) {
115 ts->allocedRemovedPackages += ts->delta;
116 ts->removedPackages =
xrealloc(ts->removedPackages,
117 sizeof(ts->removedPackages) * ts->allocedRemovedPackages);
120 if (ts->removedPackages != NULL) {
122 ts->removedPackages[ts->numRemovedPackages] = dboffset;
123 ts->numRemovedPackages++;
125 if (ts->numRemovedPackages > 1)
126 qsort(ts->removedPackages, ts->numRemovedPackages,
127 sizeof(*ts->removedPackages),
intcmp);
130 if (ts->orderCount >= ts->orderAlloced) {
131 ts->orderAlloced += (ts->orderCount - ts->orderAlloced) + ts->delta;
133 ts->order =
xrealloc(ts->order,
sizeof(*ts->order) * ts->orderAlloced);
139 ts->order[ts->orderCount] = p;
141 *indexp = ts->orderCount;
159 const char * one, * two;
169 return ((strcmp(one, two) == 0) ? 1 : 0);
186 #if defined(SUPPORT_DEBUGINFO_UPGRADE_MODEL)
188 static rpmTag _debuginfo_tag;
203 HE_t he = memset(
alloca(
sizeof(*he)), 0,
sizeof(*he));
212 const char * t =
rpmExpand(
"%{?_upgrade_tag}", NULL);
226 if (tscolor && hcolor && ohcolor && !(hcolor & ohcolor))
229 #if defined(SUPPORT_ORIGINTID)
232 xx = headerGet(oh, he, 0);
233 if (xx && he->
p.
ui32p != NULL) {
234 if (p->originTid[0] == 0 || p->originTid[0] > he->
p.
ui32p[0]
235 || (he->
c > 1 && p->originTid[0] == he->
p.
ui32p[0] && p->originTid[1] > he->
p.
ui32p[1]))
237 p->originTid[0] = he->
p.
ui32p[0];
238 p->originTid[1] = (he->
c > 1 ? he->
p.
ui32p[1] : 0);
243 xx = headerGet(oh, he, 0);
244 if (xx && he->
p.
ui32p != NULL) {
245 if (p->originTime[0] == 0 || p->originTime[0] > he->
p.
ui32p[0]
246 || (he->
c > 1 && p->originTime[0] == he->
p.
ui32p[0] && p->originTime[1] > he->
p.
ui32p[1]))
248 p->originTime[0] = he->
p.
ui32p[0];
249 p->originTime[1] = (he->
c > 1 ? he->
p.
ui32p[1] : 0);
262 assert(lastx >= 0 && lastx < ts->orderCount);
263 q = ts->order[lastx];
278 #if defined(SUPPORT_DEBUGINFO_UPGRADE_MODEL)
285 static inline int chkSuffix(
const char * fn,
const char * suffix)
288 size_t flen = strlen(fn);
289 size_t slen = strlen(suffix);
290 return (flen > slen && !strcmp(fn + flen - slen, suffix));
303 HE_t he = memset(
alloca(
sizeof(*he)), 0,
sizeof(*he));
304 const void *keyval = NULL;
307 uint32_t debuginfoInstance = 0;
308 Header debuginfoHeader = NULL;
314 if (_debuginfo_tag == 0) {
315 const char * t =
rpmExpand(
"%{?_debuginfo_tag}", NULL);
317 _debuginfo_tag = (*t !=
'\0' && !strcmp(t,
"pkgid")
324 switch (_debuginfo_tag) {
325 default:
return 0;
break;
338 xx = headerGet(oh, he, 0);
339 if (!xx || he->
p.
str == NULL)
342 if (chkSuffix(he->
p.
str,
"-debuginfo")) {
352 if (nrefs == 0 && debuginfoInstance > 0 && debuginfoHeader != NULL) {
360 assert(lastx >= 0 && lastx < ts->orderCount);
361 q = ts->order[lastx];
373 debuginfoHeader =
headerFree(debuginfoHeader);
398 const char *t =
rpmExpand(
"%{?_obsolete_tag}", NULL);
407 if (obsoletes != NULL)
411 if ((Name =
rpmdsN(obsoletes)) == NULL)
421 if (tscolor && dscolor && !(tscolor & dscolor))
425 if (!strcmp(
rpmteN(p), Name))
435 ts->removedPackages, ts->numRemovedPackages, 1);
446 if (tscolor && hcolor && ohcolor && !(hcolor & ohcolor))
460 assert(lastx >= 0 && lastx < ts->orderCount);
461 q = ts->order[lastx];
491 rpmds oldChk, newChk;
523 platform =
rpmExpand(arch,
"-unknown-", os, NULL);
527 const char * pkgNEVR =
hGetNEVRA(h, NULL);
530 platform, NULL, NULL, 0);
532 pkgNEVR =
_free(pkgNEVR);
535 platform =
_free(platform);
569 if (arch == NULL || (parch =
rpmteA(p)) == NULL)
572 if (arch[0] ==
'i' && arch[2] ==
'8' && arch[3] ==
'6') {
573 if (arch[0] != parch[0])
continue;
574 if (arch[2] != parch[2])
continue;
575 if (arch[3] != parch[3])
continue;
576 }
else if (strcmp(arch, parch))
578 if (os == NULL || (pos =
rpmteO(p)) == NULL)
596 _(
"package %s was already added, skipping %s\n"),
597 (pkgNEVR ? pkgNEVR + 2 :
"?pkgNEVR?"),
598 (addNEVR ? addNEVR + 2 :
"?addNEVR?"));
610 _(
"package %s was already added, replacing with %s\n"),
611 (pkgNEVR ? pkgNEVR + 2 :
"?pkgNEVR?"),
612 (addNEVR ? addNEVR + 2 :
"?addNEVR?"));
627 if (oc >= ts->orderAlloced) {
628 ts->orderAlloced += (oc - ts->orderAlloced) + ts->delta;
630 ts->order =
xrealloc(ts->order, ts->orderAlloced *
sizeof(*ts->order));
637 if (duplicate && oc < ts->orderCount) {
640 ts->order[oc] =
rpmteFree(ts->order[oc]);
658 ts->order[oc] =
rpmteFree(ts->order[oc]);
660 ts->teInstall = NULL;
667 ts->numAddedPackages++;
670 ts->teInstall = ts->order[oc];
677 if (!(upgrade & 0x1))
693 #if defined(SUPPORT_DEBUGINFO_UPGRADE_MODEL)
703 xx = rpmtsEraseDebuginfo(ts, p, h, pkgKey);
704 if (!chkSuffix(
rpmteN(p),
"-debuginfo") || xx == 0)
724 if (rc == 0 && oc >= 0 && oc < ts->orderCount) {
725 #if defined(SUPPORT_DEBUGINFO_UPGRADE_MODEL)
726 (void) rpmtsEraseDebuginfo(ts, ts->order[oc], h,
RPMAL_NOMATCH);
728 ts->teErase = ts->order[oc];
747 DBT * key =
alloca(
sizeof(*key));
748 DBT * data =
alloca(
sizeof(*data));
754 #if defined(CACHE_DEPENDENCY_RESULT)
755 int _cacheThisRC = 1;
761 if ((Name =
rpmdsN(dep)) == NULL)
769 #if defined(CACHE_DEPENDENCY_RESULT)
781 DBC * dbcursor = NULL;
784 size_t DNEVRlen = strlen(DNEVR);
786 xx = dbiCopen(dbi, dbiTxnid(dbi), &dbcursor, 0);
788 memset(key, 0,
sizeof(*key));
789 key->data = (
void *) DNEVR;
790 key->size = DNEVRlen;
791 memset(data, 0,
sizeof(*data));
793 data->size = datalen;
795 xx = dbiGet(dbi, dbcursor, key, data, DB_SET);
798 DNEVRlen = key->size;
800 datalen = data->size;
803 if (xx == 0 && datap && datalen == 4)
804 memcpy(&rc, datap, datalen);
806 xx = dbiCclose(dbi, dbcursor, 0);
825 if (Flags & RPMSENSE_MISSINGOK)
836 s = Name;
while (*s &&
xisdigit(*s)) s++;
841 uid = strtol(Name, NULL, 10);
844 rc = (xx >= 0 ? 0 : 1);
845 if (Flags & RPMSENSE_MISSINGOK)
853 s = Name;
while (*s &&
xisdigit(*s)) s++;
858 gid = strtol(Name, NULL, 10);
861 rc = (xx >= 0 ? 0 : 1);
862 if (Flags & RPMSENSE_MISSINGOK)
872 if (Flags & RPMSENSE_MISSINGOK)
880 const char ** fs = NULL;
885 fs = ts->filesystems;
886 nfs = ts->filesystemCount;
889 for (i = 0; i < nfs; i++) {
890 if (!strcmp(fs[i], Name))
893 rc = (i < nfs ? 0 : 1);
894 if (Flags & RPMSENSE_MISSINGOK)
901 size_t nb = strlen(Name);
902 rpmDiskSpaceInfo dsi = NULL;
903 const char ** fs = NULL;
904 size_t fslen = 0, longest = 0;
909 fs = ts->filesystems;
910 nfs = ts->filesystemCount;
913 for (i = 0; i < nfs; i++) {
914 fslen = strlen(fs[i]);
917 if (strncmp(fs[i], Name, fslen))
919 if (fslen > 1 && Name[fslen] !=
'/' && Name[fslen] !=
'\0')
930 long long needed = strtoll(
rpmdsEVR(dep), &end, 0);
933 if (strchr(
"Gg", end[0]) && strchr(
"Bb", end[1]) && !end[2])
934 needed *= 1024 * 1024 * 1024;
935 if (strchr(
"Mm", end[0]) && strchr(
"Bb", end[1]) && !end[2])
936 needed *= 1024 * 1024;
937 if (strchr(
"Kk", end[0]) && strchr(
"Bb", end[1]) && !end[2])
940 needed *= 1024 * 1024;
942 needed = BLOCK_ROUND(needed, dsi->f_bsize);
943 xx = (dsi->f_bavail - needed);
949 if (Flags & RPMSENSE_MISSINGOK)
963 const char * digest = NULL;
964 size_t digestlen = 0;
966 size_t nbuf = 8 * BUFSIZ;
967 char * buf =
alloca(nbuf);
970 while ((nb =
Fread(buf,
sizeof(buf[0]), nbuf, fd)) > 0)
972 xx =
Fclose(fd); fd = NULL;
975 xx = (EVR && *EVR && digest && *digest) ? strcmp(EVR, digest) : -1;
979 if (Flags & RPMSENSE_MISSINGOK)
986 static const char gnupg_pre[] =
"%(%{__gpg} -qv ";
987 static const char gnupg_post[] =
" 2>/dev/null; echo $?)";
988 const char * t =
rpmExpand(gnupg_pre, Name, gnupg_post, NULL);
990 rc = (t && t[0] ==
'0') ? 0 : 1;
992 if (Flags & RPMSENSE_MISSINGOK)
999 static const char macro_pre[] =
"%{?";
1000 static const char macro_post[] =
":0}";
1001 const char * a =
rpmExpand(macro_pre, Name, macro_post, NULL);
1003 rc = (a && a[0] ==
'0') ? 0 : 1;
1005 if (Flags & RPMSENSE_MISSINGOK)
1012 const char * a = envGet(Name);
1019 int sense = (a && *a) ? strcmp(a, b) : -1;
1033 if (Flags & RPMSENSE_MISSINGOK)
1041 pid_t pid = strtol(Name, &t, 10);
1043 if (t == NULL || *t !=
'\0') {
1044 const char * fn =
rpmGetPath(
"%{_varrun}/", Name,
".pid", NULL);
1047 if (fn && *fn !=
'%' && (fd =
Fopen(fn,
"r")) && !
Ferror(fd)) {
1049 size_t nb =
Fread(buf,
sizeof(buf[0]),
sizeof(buf), fd);
1052 pid = strtol(buf, &t, 10);
1059 rc = (pid > 0 ? (kill(pid, 0) < 0 &&
errno == ESRCH) : 1);
1060 if (Flags & RPMSENSE_MISSINGOK)
1087 static rpmds rpmlibP = NULL;
1088 static int oneshot = -1;
1092 if (rpmlibP == NULL)
1103 static rpmds cpuinfoP = NULL;
1104 static int oneshot = -1;
1108 if (cpuinfoP == NULL)
1119 static rpmds getconfP = NULL;
1120 static int oneshot = -1;
1124 if (getconfP == NULL)
1135 static rpmds unameP = NULL;
1136 static int oneshot = -1;
1151 rpmds sonameP = NULL;
1153 char * fn = strcpy(
alloca(strlen(Name)+1), Name);
1160 fn[strlen(fn)-1] =
'\0';
1165 if (!(xx == 0 && sonameP != NULL))
1184 #if defined(CACHE_DEPENDENCY_RESULT)
1198 if (Name[0] ==
'/') {
1203 ts->removedPackages, ts->numRemovedPackages, 1);
1215 ts->removedPackages, ts->numRemovedPackages, 1);
1232 if (ts->solve != NULL) {
1233 xx = (*ts->solve) (ts, dep, ts->solveData);
1246 if (Flags & RPMSENSE_MISSINGOK) {
1259 #if defined(CACHE_DEPENDENCY_RESULT)
1270 DBC * dbcursor = NULL;
1271 size_t DNEVRlen = strlen(DNEVR);
1273 xx = dbiCopen(dbi, dbiTxnid(dbi), &dbcursor, DB_WRITECURSOR);
1275 memset(key, 0,
sizeof(*key));
1276 key->data = (
void *) DNEVR;
1277 key->size = DNEVRlen;
1278 memset(data, 0,
sizeof(*data));
1280 data->size =
sizeof(rc);
1283 xx = dbiPut(dbi, dbcursor, key, data, 0);
1285 xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR);
1315 const char * depName,
uint_32 tscolor,
int adding)
1330 if (requires != NULL)
1331 while (!ourrc &&
rpmdsNext(requires) >= 0) {
1333 if ((Name =
rpmdsN(requires)) == NULL)
1337 if (depName != NULL && strcmp(depName, Name))
1342 if (tscolor && dscolor && !(tscolor & dscolor))
1351 {
fnpyKey * suggestedKeys = NULL;
1354 if (ts->availablePackages != NULL) {
1360 rpmdsProblem(ps, pkgNEVRA, requires, suggestedKeys, adding);
1372 if (conflicts != NULL)
1373 while (!ourrc &&
rpmdsNext(conflicts) >= 0) {
1375 if ((Name =
rpmdsN(conflicts)) == NULL)
1379 if (depName != NULL && strcmp(depName, Name))
1384 if (tscolor && dscolor && !(tscolor & dscolor))
1403 dirname_deps =
rpmExpandNumeric(
"%{?_check_dirname_deps}%{?!_check_dirname_deps:1}");
1406 if (dirnames != NULL)
1407 while (!ourrc &&
rpmdsNext(dirnames) >= 0) {
1409 if ((Name =
rpmdsN(dirnames)) == NULL)
1413 if (depName != NULL && strcmp(depName, Name))
1418 if (tscolor && dscolor && !(tscolor & dscolor))
1427 {
fnpyKey * suggestedKeys = NULL;
1430 if (ts->availablePackages != NULL) {
1436 rpmdsProblem(ps, pkgNEVRA, dirnames, suggestedKeys, adding);
1448 symlink_deps =
rpmExpandNumeric(
"%{?_check_symlink_deps}%{?!_check_symlink_deps:1}");
1451 if (linktos != NULL)
1452 while (!ourrc &&
rpmdsNext(linktos) >= 0) {
1454 if ((Name =
rpmdsN(linktos)) == NULL)
1460 if (depName != NULL && strcmp(depName, Name))
1465 if (tscolor && dscolor && !(tscolor & dscolor))
1475 {
fnpyKey * suggestedKeys = NULL;
1478 if (ts->availablePackages != NULL) {
1484 rpmdsProblem(ps, pkgNEVRA, linktos, suggestedKeys, adding);
1521 ts->removedPackages, ts->numRemovedPackages, 1);
1523 const char * pkgNEVRA;
1524 rpmds requires = NULL;
1525 rpmds conflicts = NULL;
1526 rpmds dirnames = NULL;
1527 rpmds linktos = NULL;
1546 requires, conflicts, dirnames, linktos,
1547 depName, tscolor, adding);
1553 pkgNEVRA =
_free(pkgNEVRA);
1620 {
"libtermcap",
"bash" },
1621 {
"modutils",
"vixie-cron" },
1622 {
"ypbind",
"yp-tools" },
1623 {
"ghostscript-fonts",
"ghostscript" },
1625 {
"libgnomeprint15",
"gnome-print" },
1626 {
"nautilus",
"nautilus-mozilla" },
1628 {
"arts",
"kdelibs-sound" },
1630 {
"pango-gtkbeta-devel",
"pango-gtkbeta" },
1631 {
"XFree86",
"Mesa" },
1632 {
"compat-glibc",
"db2" },
1633 {
"compat-glibc",
"db1" },
1634 {
"pam",
"initscripts" },
1635 {
"initscripts",
"sysklogd" },
1637 {
"egcs-c++",
"libstdc++" },
1639 {
"pilot-link-devel",
"pilot-link" },
1641 {
"pam",
"pamconfig" },
1661 for (bdp = badDeps; bdp->
pname != NULL && bdp->
qname != NULL; bdp++)
1663 badDeps =
_free(badDeps);
1665 badDepsInitialized = 0;
1686 if (!badDepsInitialized) {
1687 char * s =
rpmExpand(
"%{?_dependency_whiteout}", NULL);
1688 const char ** av = NULL;
1695 if (s != NULL && *s !=
'\0'
1696 && !(i = poptParseArgvString(s, &ac, (
const char ***)&av))
1697 && ac > 0 && av != NULL)
1699 bdp = badDeps =
xcalloc(ac+1,
sizeof(*badDeps));
1700 for (i = 0; i < ac; i++, bdp++) {
1706 if ((qname = strchr(pname,
'>')) != NULL)
1713 _(
"ignore package name relation(s) [%d]\t%s -> %s\n"),
1721 badDepsInitialized++;
1725 if (badDeps != NULL)
1726 for (bdp = badDeps; bdp->
pname != NULL && bdp->
qname != NULL; bdp++) {
1748 while (tsi != NULL && (p = tsi->tsi_suc) != NULL) {
1749 tsi = tsi->tsi_next;
1750 if (
rpmteTSI(p)->tsi_chain != NULL)
1770 if (f & RPMSENSE_SCRIPT_PRE)
1771 return "Requires(pre):";
1772 if (f & RPMSENSE_SCRIPT_POST)
1773 return "Requires(post):";
1774 if (f & RPMSENSE_SCRIPT_PREUN)
1775 return "Requires(preun):";
1776 if (f & RPMSENSE_SCRIPT_POSTUN)
1777 return "Requires(postun):";
1778 if (f & RPMSENSE_SCRIPT_VERIFY)
1779 return "Requires(verify):";
1780 if (f & RPMSENSE_MISSINGOK)
1781 return "Requires(hint):";
1782 if (f & RPMSENSE_FIND_REQUIRES)
1783 return "Requires(auto):";
1803 int zap,
int * nzaps,
int msglvl)
1810 const char *dp = NULL;
1816 tsi_prev = tsi, tsi = tsi->tsi_next)
1822 if (tsi->tsi_suc != p)
1827 if (requires == NULL)
continue;
1841 _(
"removing %s \"%s\" from tsort relations.\n"),
1844 if (tsi_prev) tsi_prev->tsi_next = tsi->tsi_next;
1845 tsi->tsi_next = NULL;
1846 tsi->tsi_suc = NULL;
1873 unsigned char * selected,
1886 rpmal al = (teType ==
TR_ADDED ? ts->addedPackages : ts->erasedPackages);
1911 {
const char * Name =
rpmdsN(requires);
1914 if (Name == NULL || !strncmp(Name,
"config(",
sizeof(
"config(")-1))
1928 pkgKey = (
alKey)(((
long)pkgKey) + ts->numAddedPackages);
1935 if (q == NULL || i >= ts->orderCount)
1944 if (selected[i] != 0)
1966 tsi =
xcalloc(1,
sizeof(*tsi));
1970 tsi->tsi_reqx =
rpmdsIx(requires);
1972 tsi->tsi_next =
rpmteTSI(q)->tsi_next;
1989 long a = (long) ((
const orderListIndex)one)->pkgKey;
1990 long b = (long) ((
const orderListIndex)two)->pkgKey;
2015 if ((*rp) == NULL) {
2023 for (qprev = NULL, q = (*qp);
2025 qprev = q, q =
rpmteTSI(q)->tsi_suc)
2038 if (qprev == NULL) {
2043 }
else if (q == NULL) {
2058 static uint32_t
_autobits = _notpre(_ALL_REQUIRES_MASK);
2059 #define isAuto(_x) ((_x) & _autobits)
2061 static uint32_t _autobits = 0xffffffff;
2062 #define isAuto(_x) (1)
2078 int orderingCount = 0;
2079 unsigned char * selected =
alloca(
sizeof(*selected) * (ts->orderCount + 1));
2082 int newOrderCount = 0;
2083 orderListIndex orderList;
2086 int * peer = memset(
alloca(npeer*
sizeof(*peer)), 0, (npeer*
sizeof(*peer)));
2112 pkgKey =
rpmalAdd(&ts->erasedPackages, pkgKey, key,
2116 pkgKey = (
alKey)(((
long)pkgKey) + ts->numAddedPackages);
2126 numOrderList = ts->orderCount;
2130 numOrderList += ts->numAddedPackages;
2132 numOrderList += ts->numRemovedPackages;
2134 ordering =
alloca(
sizeof(*ordering) * (numOrderList + 1));
2135 loopcheck = numOrderList;
2146 while ((p =
rpmtsiNext(pi, oType)) != NULL) {
2148 memset(selected, 0,
sizeof(*selected) * ts->orderCount);
2159 if (requires != NULL)
2169 if (!isErasePreReq(Flags))
2174 if (!isInstallPreReq(Flags))
2186 if (requires != NULL)
2196 if (isErasePreReq(Flags))
2201 if (isInstallPreReq(Flags))
2218 if (strcmp(q->pkgid, p->flink.Pkgid[0]))
2221 if (requires != NULL) {
2231 if (_autobits != 0xffffffff)
2236 if (requires != NULL)
2246 if (requires != NULL)
2261 while ((p =
rpmtsiNext(pi, oType)) != NULL) {
2284 rpmMessage(
RPMMESS_DEBUG,
D_(
"========== tsorting packages (order, #predecessors, #succesors, tree, Ldepth, Rbreadth)\n"));
2291 while ((p =
rpmtsiNext(pi, oType)) != NULL) {
2300 addQ(p, &q, &r, prefcolor);
2306 for (; q != NULL; q =
rpmteTSI(q)->tsi_suc) {
2329 breadth = ((depth < npeer) ? peer[depth]++ : 0);
2335 treex, depth, breadth,
2351 while ((tsi = tsi_next) != NULL) {
2352 tsi_next = tsi->tsi_next;
2353 tsi->tsi_next = NULL;
2355 if (p && (--
rpmteTSI(p)->tsi_count) <= 0) {
2371 if (!_printed && loopcheck == qlen &&
rpmteTSI(q)->tsi_suc != NULL) {
2375 D_(
"========== successors only (%d bytes)\n"), (
int)tsbytes);
2380 while ((p =
rpmtsiNext(pi, oType)) != NULL) {
2388 tsi->tsi_suc = NULL;
2393 if (loopcheck != 0) {
2399 while ((q =
rpmtsiNext(qi, oType)) != NULL) {
2410 while ((q =
rpmtsiNext(qi, oType)) != NULL) {
2411 if ((tsi =
rpmteTSI(q)->tsi_next) == NULL)
2428 for (q =
rpmteTSI(r)->tsi_chain; q != NULL;
2437 while ((p = q) != NULL && (q =
rpmteTSI(p)->tsi_chain) != NULL) {
2460 (dp ? dp :
"not found!?!"));
2466 for (p = r, q =
rpmteTSI(r)->tsi_chain; q != NULL;
2478 if (nzaps && nrescans-- > 0) {
2504 orderList =
xcalloc(numOrderList,
sizeof(*orderList));
2507 while ((p =
rpmtsiNext(pi, oType)) != NULL) {
2518 newOrder =
xcalloc(ts->orderCount,
sizeof(*newOrder));
2521 for (i = 0, newOrderCount = 0; i < orderingCount; i++)
2524 orderListIndex needle;
2526 key.
pkgKey = ordering[i];
2527 needle = bsearch(&key, orderList, numOrderList,
2532 j = needle->orIndex;
2533 if ((q = ts->order[j]) == NULL || needle->pkgKey ==
RPMAL_NOMATCH)
2536 newOrder[newOrderCount++] = q;
2537 ts->order[j] = NULL;
2541 assert(newOrderCount == ts->orderCount);
2544 ts->order =
_free(ts->order);
2546 ts->order = newOrder;
2547 ts->orderAlloced = ts->orderCount;
2548 orderList =
_free(orderList);
2563 const char * depName = NULL;;
2568 int closeatexit = 0;
2575 if (
rpmtsGetRdb(ts) == NULL && ts->dbmode != -1) {
2592 rpmds provides, requires, conflicts, dirnames, linktos;
2608 requires, conflicts, dirnames, linktos,
2616 if (provides != NULL)
2618 depName =
_free(depName);
2623 const char * EVR =
rpmdsEVR(provides);
2626 rc = envPut(depName, EVR);
2660 if (provides != NULL)
2662 depName =
_free(depName);
2678 depName =
_free(depName);
2694 {
const char * tsNEVRA =
"transaction dependencies";
2699 const char * dep = NULL;
2712 depName =
_free(depName);
2719 #if defined(CACHE_DEPENDENCY_RESULT)