6 #include <rpm/rpmtypes.h>
7 #include <rpm/rpmlib.h> /* rpmvercmp */
8 #include <rpm/rpmstring.h>
9 #include <rpm/rpmlog.h>
10 #include <rpm/rpmds.h>
16 int _rpmds_nopromote = 1;
19 * A package dependency set.
22 const char * Type; /*!< Tag name. */
23 char * DNEVR; /*!< Formatted dependency string. */
24 const char ** N; /*!< Name. */
25 const char ** EVR; /*!< Epoch-Version-Release. */
26 rpmsenseFlags * Flags; /*!< Bit(s) identifying context/comparison. */
27 rpm_color_t * Color; /*!< Bit(s) calculated from file color(s). */
28 int32_t * Refs; /*!< No. of file refs. */
29 time_t BT; /*!< Package build time tie breaker. */
30 rpmTag tagN; /*!< Header tag. */
31 int32_t Count; /*!< No. of elements */
32 int i; /*!< Element index. */
33 unsigned l; /*!< Low element (bsearch). */
34 unsigned u; /*!< High element (bsearch). */
35 int nopromote; /*!< Don't promote Epoch: in rpmdsCompare()? */
36 int nrefs; /*!< Reference count. */
39 static const char ** rpmdsDupArgv(const char ** argv, int argc);
41 static int dsType(rpmTag tag,
42 const char ** Type, rpmTag * tagEVR, rpmTag * tagF)
46 rpmTag evr = RPMTAG_NOT_FOUND;
47 rpmTag f = RPMTAG_NOT_FOUND;
49 if (tag == RPMTAG_PROVIDENAME) {
51 evr = RPMTAG_PROVIDEVERSION;
52 f = RPMTAG_PROVIDEFLAGS;
53 } else if (tag == RPMTAG_REQUIRENAME) {
55 evr = RPMTAG_REQUIREVERSION;
56 f = RPMTAG_REQUIREFLAGS;
57 } else if (tag == RPMTAG_CONFLICTNAME) {
59 evr = RPMTAG_CONFLICTVERSION;
60 f = RPMTAG_CONFLICTFLAGS;
61 } else if (tag == RPMTAG_OBSOLETENAME) {
63 evr = RPMTAG_OBSOLETEVERSION;
64 f = RPMTAG_OBSOLETEFLAGS;
65 } else if (tag == RPMTAG_TRIGGERNAME) {
67 evr = RPMTAG_TRIGGERVERSION;
68 f = RPMTAG_TRIGGERFLAGS;
73 if (tagEVR) *tagEVR = evr;
78 rpmds rpmdsUnlink(rpmds ds, const char * msg)
80 if (ds == NULL) return NULL;
81 if (_rpmds_debug && msg != NULL)
82 fprintf(stderr, "--> ds %p -- %d %s\n", ds, ds->nrefs, msg);
87 rpmds rpmdsLink(rpmds ds, const char * msg)
89 if (ds == NULL) return NULL;
92 if (_rpmds_debug && msg != NULL)
93 fprintf(stderr, "--> ds %p ++ %d %s\n", ds, ds->nrefs, msg);
98 rpmds rpmdsFree(rpmds ds)
106 return rpmdsUnlink(ds, ds->Type);
108 if (_rpmds_debug < 0)
109 fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count);
111 if (dsType(ds->tagN, NULL, &tagEVR, &tagF))
115 ds->N = _free(ds->N);
116 ds->EVR = _free(ds->EVR);
117 ds->Flags = _free(ds->Flags);
120 ds->DNEVR = _free(ds->DNEVR);
121 ds->Color = _free(ds->Color);
122 ds->Refs = _free(ds->Refs);
124 (void) rpmdsUnlink(ds, ds->Type);
125 memset(ds, 0, sizeof(*ds)); /* XXX trash and burn */
130 rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
135 struct rpmtd_s names;
136 headerGetFlags hgflags = HEADERGET_ALLOC|HEADERGET_ARGV;
138 if (dsType(tagN, &Type, &tagEVR, &tagF))
141 if (headerGet(h, tagN, &names, hgflags) && rpmtdCount(&names) > 0) {
142 struct rpmtd_s evr, flags;
144 ds = xcalloc(1, sizeof(*ds));
150 ds->Count = rpmtdCount(&names);
151 ds->nopromote = _rpmds_nopromote;
153 headerGet(h, tagEVR, &evr, hgflags);
155 headerGet(h, tagF, &flags, hgflags);
156 ds->Flags = flags.data;
158 ds->BT = headerGetNumber(h, RPMTAG_BUILDTIME);
159 ds->Color = xcalloc(ds->Count, sizeof(*ds->Color));
160 ds->Refs = xcalloc(ds->Count, sizeof(*ds->Refs));
161 ds = rpmdsLink(ds, ds->Type);
163 if (_rpmds_debug < 0)
164 fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count);
171 char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
177 if (dspfx) nb += strlen(dspfx) + 1;
178 if (ds->N[ds->i]) nb += strlen(ds->N[ds->i]);
179 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
180 if (ds->Flags != NULL && (ds->Flags[ds->i] & RPMSENSE_SENSEMASK)) {
182 if (ds->Flags[ds->i] & RPMSENSE_LESS) nb++;
183 if (ds->Flags[ds->i] & RPMSENSE_GREATER) nb++;
184 if (ds->Flags[ds->i] & RPMSENSE_EQUAL) nb++;
186 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
187 if (ds->EVR != NULL && ds->EVR[ds->i] && *ds->EVR[ds->i]) {
189 nb += strlen(ds->EVR[ds->i]);
192 t = tbuf = xmalloc(nb + 1);
194 t = stpcpy(t, dspfx);
198 t = stpcpy(t, ds->N[ds->i]);
199 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
200 if (ds->Flags != NULL && (ds->Flags[ds->i] & RPMSENSE_SENSEMASK)) {
201 if (t != tbuf) *t++ = ' ';
202 if (ds->Flags[ds->i] & RPMSENSE_LESS) *t++ = '<';
203 if (ds->Flags[ds->i] & RPMSENSE_GREATER) *t++ = '>';
204 if (ds->Flags[ds->i] & RPMSENSE_EQUAL) *t++ = '=';
206 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
207 if (ds->EVR != NULL && ds->EVR[ds->i] && *ds->EVR[ds->i]) {
208 if (t != tbuf) *t++ = ' ';
209 t = stpcpy(t, ds->EVR[ds->i]);
215 rpmds rpmdsThis(Header h, rpmTag tagN, rpmsenseFlags Flags)
217 char *evr = headerGetAsString(h, RPMTAG_EVR);
218 rpmds ds = rpmdsSingle(tagN, headerGetString(h, RPMTAG_NAME), evr, Flags);
223 rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, rpmsenseFlags Flags)
228 if (dsType(tagN, &Type, NULL, NULL))
231 ds = xcalloc(1, sizeof(*ds));
234 { time_t now = time(NULL);
238 ds->nopromote = _rpmds_nopromote;
240 ds->N = rpmdsDupArgv(&N, 1);
241 ds->EVR = rpmdsDupArgv(&EVR, 1);
243 ds->Flags = xmalloc(sizeof(*ds->Flags));
244 ds->Flags[0] = Flags;
248 return rpmdsLink(ds, (ds ? ds->Type : NULL));
251 int rpmdsCount(const rpmds ds)
253 return (ds != NULL ? ds->Count : 0);
256 int rpmdsIx(const rpmds ds)
258 return (ds != NULL ? ds->i : -1);
261 int rpmdsSetIx(rpmds ds, int ix)
268 ds->DNEVR = _free(ds->DNEVR);
273 const char * rpmdsDNEVR(const rpmds ds)
275 const char * DNEVR = NULL;
277 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
278 if (ds->DNEVR == NULL) {
279 char t[2] = { ds->Type[0], '\0' };
280 ds->DNEVR = rpmdsNewDNEVR(t, ds);
287 const char * rpmdsN(const rpmds ds)
289 const char * N = NULL;
291 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
298 const char * rpmdsEVR(const rpmds ds)
300 const char * EVR = NULL;
302 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
304 EVR = ds->EVR[ds->i];
309 rpmsenseFlags rpmdsFlags(const rpmds ds)
311 rpmsenseFlags Flags = 0;
313 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
314 if (ds->Flags != NULL)
315 Flags = ds->Flags[ds->i];
320 rpmTag rpmdsTagN(const rpmds ds)
329 time_t rpmdsBT(const rpmds ds)
332 if (ds != NULL && ds->BT > 0)
337 time_t rpmdsSetBT(const rpmds ds, time_t BT)
347 int rpmdsNoPromote(const rpmds ds)
352 nopromote = ds->nopromote;
356 int rpmdsSetNoPromote(rpmds ds, int nopromote)
361 onopromote = ds->nopromote;
362 ds->nopromote = nopromote;
367 rpm_color_t rpmdsColor(const rpmds ds)
369 rpm_color_t Color = 0;
371 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
372 if (ds->Color != NULL)
373 Color = ds->Color[ds->i];
378 rpm_color_t rpmdsSetColor(const rpmds ds, rpm_color_t color)
380 rpm_color_t ocolor = 0;
382 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
383 if (ds->Color != NULL) {
384 ocolor = ds->Color[ds->i];
385 ds->Color[ds->i] = color;
391 int32_t rpmdsRefs(const rpmds ds)
395 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
396 if (ds->Refs != NULL)
397 Refs = ds->Refs[ds->i];
402 int32_t rpmdsSetRefs(const rpmds ds, int32_t refs)
406 if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
407 if (ds->Refs != NULL) {
408 orefs = ds->Refs[ds->i];
409 ds->Refs[ds->i] = refs;
415 void rpmdsNotify(rpmds ds, const char * where, int rc)
421 if (!(ds != NULL && ds->i >= 0 && ds->i < ds->Count))
423 if (!(ds->Type != NULL && (DNEVR = rpmdsDNEVR(ds)) != NULL))
426 rpmlog(RPMLOG_DEBUG, "%9s: %-45s %-s %s\n", ds->Type,
427 (rstreq(DNEVR, "cached") ? DNEVR : DNEVR+2),
428 (rc ? _("NO ") : _("YES")),
429 (where != NULL ? where : ""));
432 int rpmdsNext(rpmds ds)
436 if (ds != NULL && ++ds->i >= 0) {
437 if (ds->i < ds->Count) {
439 ds->DNEVR = _free(ds->DNEVR);
443 if (_rpmds_debug < 0 && i != -1)
444 fprintf(stderr, "*** ds %p\t%s[%d]: %s\n", ds, (ds->Type ? ds->Type : "?Type?"), i, (ds->DNEVR ? ds->DNEVR : "?DNEVR?"));
451 rpmds rpmdsInit(rpmds ds)
455 ds->DNEVR = _free(ds->DNEVR);
461 const char ** rpmdsDupArgv(const char ** argv, int argc)
470 for (ac = 0; ac < argc && argv[ac]; ac++) {
471 nb += strlen(argv[ac]) + 1;
473 nb += (ac + 1) * sizeof(*av);
476 t = (char *) (av + ac + 1);
477 for (ac = 0; ac < argc && argv[ac]; ac++) {
479 t = stpcpy(t, argv[ac]) + 1;
485 static rpmds rpmdsDup(const rpmds ods)
487 rpmds ds = xcalloc(1, sizeof(*ds));
490 ds->Type = ods->Type;
491 ds->tagN = ods->tagN;
492 ds->Count = ods->Count;
496 ds->nopromote = ods->nopromote;
498 ds->N = rpmdsDupArgv(ods->N, ods->Count);
500 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
501 assert(ods->EVR != NULL);
502 assert(ods->Flags != NULL);
504 ds->EVR = rpmdsDupArgv(ods->EVR, ods->Count);
506 nb = (ds->Count * sizeof(*ds->Flags));
507 ds->Flags = memcpy(xmalloc(nb), ods->Flags, nb);
509 /* FIX: ds->Flags is kept, not only */
510 return rpmdsLink(ds, (ds ? ds->Type : NULL));
514 int rpmdsFind(rpmds ds, const rpmds ods)
518 if (ds == NULL || ods == NULL)
523 while (ds->l < ds->u) {
524 ds->i = (ds->l + ds->u) / 2;
526 comparison = strcmp(ods->N[ods->i], ds->N[ds->i]);
528 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
529 if (comparison == 0 && ods->EVR && ds->EVR)
530 comparison = strcmp(ods->EVR[ods->i], ds->EVR[ds->i]);
531 if (comparison == 0 && ods->Flags && ds->Flags)
532 comparison = (ods->Flags[ods->i] - ds->Flags[ds->i]);
536 else if (comparison > 0)
544 int rpmdsMerge(rpmds * dsp, rpmds ods)
549 rpmsenseFlags * Flags;
553 if (dsp == NULL || ods == NULL)
556 /* If not initialized yet, dup the 1st entry. */
560 *dsp = rpmdsDup(ods);
571 ods = rpmdsInit(ods);
572 while (rpmdsNext(ods) >= 0) {
574 * If this entry is already present, don't bother.
576 if (rpmdsFind(ds, ods) >= 0)
582 for (j = ds->Count; j > ds->u; j--)
583 ds->N[j] = ds->N[j-1];
584 ds->N[ds->u] = ods->N[ods->i];
585 N = rpmdsDupArgv(ds->N, ds->Count+1);
586 ds->N = _free(ds->N);
589 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
590 assert(ods->EVR != NULL);
591 assert(ods->Flags != NULL);
593 for (j = ds->Count; j > ds->u; j--)
594 ds->EVR[j] = ds->EVR[j-1];
595 ds->EVR[ds->u] = ods->EVR[ods->i];
596 EVR = rpmdsDupArgv(ds->EVR, ds->Count+1);
597 ds->EVR = _free(ds->EVR);
600 Flags = xmalloc((ds->Count+1) * sizeof(*Flags));
602 memcpy(Flags, ds->Flags, ds->u * sizeof(*Flags));
603 if (ds->u < ds->Count)
604 memcpy(Flags + ds->u + 1, ds->Flags + ds->u,
605 (ds->Count - ds->u) * sizeof(*Flags));
606 Flags[ds->u] = ods->Flags[ods->i];
607 ds->Flags = _free(ds->Flags);
619 int rpmdsSearch(rpmds ds, rpmds ods)
624 if (ds == NULL || ods == NULL)
627 /* Binary search to find the [l,u) subset that contains N */
634 comparison = strcmp(ods->N[ods->i], ds->N[i]);
638 else if (comparison > 0)
641 /* Set l to 1st member of set that contains N. */
642 if (!rstreq(ods->N[ods->i], ds->N[l]))
644 while (l > 0 && rstreq(ods->N[ods->i], ds->N[l-1]))
646 /* Set u to 1st member of set that does not contain N. */
647 if (u >= ds->Count || !rstreq(ods->N[ods->i], ds->N[u]))
649 while (++u < ds->Count) {
650 if (!rstreq(ods->N[ods->i], ds->N[u]))
651 /*@innerbreak@*/ break;
657 /* Check each member of [l,u) subset for ranges overlap. */
660 int save = rpmdsSetIx(ds, l-1);
661 while ((l = rpmdsNext(ds)) >= 0 && (l < u)) {
662 if ((i = rpmdsCompare(ods, ds)) != 0)
665 /* Return element index that overlaps, or -1. */
669 (void) rpmdsSetIx(ds, save);
676 * Split EVR into epoch, version, and release components.
677 * @param evr [epoch:]version[-release] string
678 * @retval *ep pointer to epoch
679 * @retval *vp pointer to version
680 * @retval *rp pointer to release
683 void parseEVR(char * evr,
689 const char *version; /* assume only version is present */
694 while (*s && risdigit(*s)) s++; /* s points to epoch terminator */
695 se = strrchr(s, '-'); /* se points to version terminator */
701 if (*epoch == '\0') epoch = "0";
703 epoch = NULL; /* XXX disable epoch compare if missing */
714 if (vp) *vp = version;
715 if (rp) *rp = release;
718 int rpmdsCompare(const rpmds A, const rpmds B)
721 const char *aE, *aV, *aR, *bE, *bV, *bR;
725 /* Different names don't overlap. */
726 if (!rstreq(A->N[A->i], B->N[B->i])) {
731 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
732 if (!(A->EVR && A->Flags && B->EVR && B->Flags)) {
737 /* Same name. If either A or B is an existence test, always overlap. */
738 if (!((A->Flags[A->i] & RPMSENSE_SENSEMASK) && (B->Flags[B->i] & RPMSENSE_SENSEMASK))) {
743 /* If either EVR is non-existent or empty, always overlap. */
744 if (!(A->EVR[A->i] && *A->EVR[A->i] && B->EVR[B->i] && *B->EVR[B->i])) {
749 /* Both AEVR and BEVR exist. */
750 aEVR = xstrdup(A->EVR[A->i]);
751 parseEVR(aEVR, &aE, &aV, &aR);
752 bEVR = xstrdup(B->EVR[B->i]);
753 parseEVR(bEVR, &bE, &bV, &bR);
755 /* Compare {A,B} [epoch:]version[-release] */
757 if (aE && *aE && bE && *bE)
758 sense = rpmvercmp(aE, bE);
759 else if (aE && *aE && atol(aE) > 0) {
764 } else if (bE && *bE && atol(bE) > 0)
768 sense = rpmvercmp(aV, bV);
769 if (sense == 0 && aR && *aR && bR && *bR)
770 sense = rpmvercmp(aR, bR);
775 /* Detect overlap of {A,B} range. */
777 if (sense < 0 && ((A->Flags[A->i] & RPMSENSE_GREATER) || (B->Flags[B->i] & RPMSENSE_LESS))) {
779 } else if (sense > 0 && ((A->Flags[A->i] & RPMSENSE_LESS) || (B->Flags[B->i] & RPMSENSE_GREATER))) {
781 } else if (sense == 0 &&
782 (((A->Flags[A->i] & RPMSENSE_EQUAL) && (B->Flags[B->i] & RPMSENSE_EQUAL)) ||
783 ((A->Flags[A->i] & RPMSENSE_LESS) && (B->Flags[B->i] & RPMSENSE_LESS)) ||
784 ((A->Flags[A->i] & RPMSENSE_GREATER) && (B->Flags[B->i] & RPMSENSE_GREATER)))) {
792 void rpmdsProblem(rpmps ps, const char * pkgNEVR, const rpmds ds,
793 const fnpyKey * suggestedKeys, int adding)
795 const char * DNEVR = rpmdsDNEVR(ds);
796 const char * EVR = rpmdsEVR(ds);
800 if (ps == NULL) return;
802 if (EVR == NULL) EVR = "?EVR?";
803 if (DNEVR == NULL) DNEVR = "? ?N? ?OP? ?EVR?";
805 rpmlog(RPMLOG_DEBUG, "package %s has unsatisfied %s: %s\n",
806 pkgNEVR, ds->Type, DNEVR+2);
808 switch ((unsigned)DNEVR[0]) {
809 case 'C': type = RPMPROB_CONFLICT; break;
811 case 'R': type = RPMPROB_REQUIRES; break;
814 key = (suggestedKeys ? suggestedKeys[0] : NULL);
815 rpmpsAppend(ps, type, pkgNEVR, key, NULL, NULL, DNEVR, adding);
818 int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
820 rpmds provides = NULL;
823 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
824 if (req->EVR == NULL || req->Flags == NULL)
827 if (!(req->Flags[req->i] & RPMSENSE_SENSEMASK) || !req->EVR[req->i] || *req->EVR[req->i] == '\0')
830 /* Get provides information from header */
831 provides = rpmdsInit(rpmdsNew(h, RPMTAG_PROVIDENAME, 0));
832 if (provides == NULL)
833 goto exit; /* XXX should never happen */
835 (void) rpmdsSetNoPromote(provides, nopromote);
838 * Rpm prior to 3.0.3 did not have versioned provides.
839 * If no provides version info is available, match any/all requires
842 if (provides->EVR == NULL) {
848 if (provides != NULL)
849 while (rpmdsNext(provides) >= 0) {
851 /* Filter out provides that came along for the ride. */
852 if (!rstreq(provides->N[provides->i], req->N[req->i]))
855 result = rpmdsCompare(provides, req);
857 /* If this provide matches the require, we're done. */
863 provides = rpmdsFree(provides);
868 int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
872 rpmsenseFlags pkgFlags = RPMSENSE_EQUAL;
874 int rc = 1; /* XXX assume match, names already match here */
876 /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
877 if (req->EVR == NULL || req->Flags == NULL)
880 if (!((req->Flags[req->i] & RPMSENSE_SENSEMASK) && req->EVR[req->i] && *req->EVR[req->i]))
883 /* Get package information from header */
884 pkgN = headerGetString(h, RPMTAG_NAME);
885 pkgEVR = headerGetAsString(h, RPMTAG_EVR);
886 if ((pkg = rpmdsSingle(RPMTAG_PROVIDENAME, pkgN, pkgEVR, pkgFlags)) != NULL) {
888 (void) rpmdsSetNoPromote(pkg, nopromote);
889 rc = rpmdsCompare(pkg, req);
890 pkg = rpmdsFree(pkg);
899 struct rpmlibProvides_s {
900 const char * featureName;
901 const char * featureEVR;
902 rpmsenseFlags featureFlags;
903 const char * featureDescription;
906 static const struct rpmlibProvides_s rpmlibProvides[] = {
907 { "rpmlib(VersionedDependencies)", "3.0.3-1",
908 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
909 N_("PreReq:, Provides:, and Obsoletes: dependencies support versions.") },
910 { "rpmlib(CompressedFileNames)", "3.0.4-1",
911 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
912 N_("file name(s) stored as (dirName,baseName,dirIndex) tuple, not as path.")},
914 { "rpmlib(PayloadIsBzip2)", "3.0.5-1",
915 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
916 N_("package payload can be compressed using bzip2.") },
919 { "rpmlib(PayloadIsXz)", "5.2-1",
920 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
921 N_("package payload can be compressed using xz.") },
922 { "rpmlib(PayloadIsLzma)", "4.4.2-1",
923 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
924 N_("package payload can be compressed using lzma.") },
926 { "rpmlib(PayloadFilesHavePrefix)", "4.0-1",
927 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
928 N_("package payload file(s) have \"./\" prefix.") },
929 { "rpmlib(ExplicitPackageProvide)", "4.0-1",
930 (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
931 N_("package name-version-release is not implicitly provided.") },
932 { "rpmlib(HeaderLoadSortsTags)", "4.0.1-1",
934 N_("header tags are always sorted after being loaded.") },
935 { "rpmlib(ScriptletInterpreterArgs)", "4.0.3-1",
937 N_("the scriptlet interpreter can use arguments from header.") },
938 { "rpmlib(PartialHardlinkSets)", "4.0.4-1",
940 N_("a hardlink file set may be installed without being complete.") },
941 { "rpmlib(ConcurrentAccess)", "4.1-1",
943 N_("package scriptlets may access the rpm database while installing.") },
945 { "rpmlib(BuiltinLuaScripts)", "4.2.2-1",
947 N_("internal support for lua scripts.") },
949 { "rpmlib(FileDigests)", "4.6.0-1",
951 N_("file digest algorithm is per package configurable") },
953 { "rpmlib(FileCaps)", "4.6.1-1",
955 N_("support for POSIX.1e file capabilities") },
957 { NULL, NULL, 0, NULL }
961 int rpmdsRpmlib(rpmds * dsp, void * tblp)
963 const struct rpmlibProvides_s * rltblp = tblp;
964 const struct rpmlibProvides_s * rlp;
968 rltblp = rpmlibProvides;
970 for (rlp = rltblp; rlp->featureName != NULL; rlp++) {
971 rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME, rlp->featureName,
972 rlp->featureEVR, rlp->featureFlags);
973 xx = rpmdsMerge(dsp, ds);