diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-01-30 16:04:40 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-01-30 16:04:40 +0200 |
commit | d2efb5d77c0a3a2f5919d40efe5e163254422b6f (patch) | |
tree | 7fc86609eb75acea785b47cace1618ef17ae88a0 /lib | |
parent | 87e01f336262f3738211c0426304590ed16284f8 (diff) | |
download | librpm-tizen-d2efb5d77c0a3a2f5919d40efe5e163254422b6f.tar.gz librpm-tizen-d2efb5d77c0a3a2f5919d40efe5e163254422b6f.tar.bz2 librpm-tizen-d2efb5d77c0a3a2f5919d40efe5e163254422b6f.zip |
Use rpmsenseFlags type for dependency flags everywhere (hopefully)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 6 | ||||
-rw-r--r-- | lib/legacy.c | 6 | ||||
-rw-r--r-- | lib/psm.c | 8 | ||||
-rw-r--r-- | lib/rpmds.c | 14 | ||||
-rw-r--r-- | lib/rpmds.h | 6 | ||||
-rw-r--r-- | lib/rpmlib.h | 3 | ||||
-rw-r--r-- | lib/rpmlibprov.c | 6 | ||||
-rw-r--r-- | lib/rpmts.c | 2 | ||||
-rw-r--r-- | lib/transaction.c | 2 |
9 files changed, 27 insertions, 26 deletions
diff --git a/lib/depends.c b/lib/depends.c index eccb3a9eb..5c345bff4 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -809,7 +809,7 @@ static void markLoop(tsortInfo tsi, rpmte q) } } -static inline const char * identifyDepend(int32_t f) +static inline const char * identifyDepend(rpmsenseFlags f) { if (isLegacyPreReq(f)) return "PreReq:"; @@ -857,7 +857,7 @@ zapRelation(rpmte q, rpmte p, /* XXX Note: the loop traverses "not found", break on "found". */ tsi_prev = tsi, tsi = tsi->tsi_next) { - int32_t Flags; + rpmsenseFlags Flags; if (tsi->tsi_suc != p) continue; @@ -1039,7 +1039,7 @@ static void addQ(rpmte p, int rpmtsOrder(rpmts ts) { rpmds requires; - int32_t Flags; + rpmsenseFlags Flags; uint32_t prefcolor = rpmtsPrefColor(ts); rpmtsi pi; rpmte p; rpmtsi qi; rpmte q; diff --git a/lib/legacy.c b/lib/legacy.c index 86a205ba2..dda035b34 100644 --- a/lib/legacy.c +++ b/lib/legacy.c @@ -147,11 +147,11 @@ void providePackageNVR(Header h) int32_t * epoch; const char *pEVR; char *p; - int32_t pFlags = RPMSENSE_EQUAL; + rpmsenseFlags pFlags = RPMSENSE_EQUAL; const char ** provides = NULL; const char ** providesEVR = NULL; rpm_tagtype_t pnt, pvt; - int32_t * provideFlags = NULL; + rpmsenseFlags * provideFlags = NULL; rpm_count_t providesCount, i; int xx; int bingo = 1; @@ -182,7 +182,7 @@ void providePackageNVR(Header h) if (!hge(h, RPMTAG_PROVIDEVERSION, &pvt, (rpm_data_t *) &providesEVR, NULL)) { for (i = 0; i < providesCount; i++) { const char * vdummy = ""; - int32_t fdummy = RPMSENSE_ANY; + rpmsenseFlags fdummy = RPMSENSE_ANY; xx = headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE, &vdummy, 1); xx = headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE, @@ -61,7 +61,7 @@ struct rpmpsm_s { int progTag; /*!< Scriptlet interpreter tag. */ int npkgs_installed; /*!< No. of installed instances. */ int scriptArg; /*!< Scriptlet package arg. */ - int sense; /*!< One of RPMSENSE_TRIGGER{PREIN,IN,UN,POSTUN}. */ + rpmsenseFlags sense; /*!< One of RPMSENSE_TRIGGER{PREIN,IN,UN,POSTUN}. */ int countCorrection; /*!< 0 if installing, -1 if removing. */ int chrootDone; /*!< Was chroot(2) done by pkgStage? */ int unorderedSuccessor; /*!< Can the PSM be run asynchronously? */ @@ -461,9 +461,9 @@ static const char * tag2sln(rpm_tag_t tag) return "%unknownscript"; } -static rpm_tag_t triggertag(rpm_tag_t sense) +static rpm_tag_t triggertag(rpmsenseFlags sense) { - rpm_tag_t tag = 0; + rpm_tag_t tag = RPMTAG_NOT_FOUND; switch (sense) { case RPMSENSE_TRIGGERIN: tag = RPMTAG_TRIGGERIN; @@ -1018,7 +1018,7 @@ static rpmRC handleOneTrigger(const rpmpsm psm, while ((i = rpmdsNext(trigger)) >= 0) { rpm_tagtype_t tit, tst, tpt; const char * Name; - int32_t Flags = rpmdsFlags(trigger); + rpmsenseFlags Flags = rpmdsFlags(trigger); if ((Name = rpmdsN(trigger)) == NULL) continue; /* XXX can't happen */ diff --git a/lib/rpmds.c b/lib/rpmds.c index 84a859cc6..69781c233 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -32,7 +32,7 @@ struct rpmds_s { Header h; /*!< Header for dependency set (or NULL) */ const char ** N; /*!< Name. */ const char ** EVR; /*!< Epoch-Version-Release. */ - int32_t * Flags; /*!< Bit(s) identifying context/comparison. */ + rpmsenseFlags * Flags; /*!< Bit(s) identifying context/comparison. */ uint32_t * Color; /*!< Bit(s) calculated from file color(s). */ int32_t * Refs; /*!< No. of file refs. */ int32_t BT; /*!< Package build time tie breaker. */ @@ -242,7 +242,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds) return tbuf; } -rpmds rpmdsThis(Header h, rpm_tag_t tagN, int32_t Flags) +rpmds rpmdsThis(Header h, rpm_tag_t tagN, rpmsenseFlags Flags) { HGE_t hge = (HGE_t) headerGetEntryMinMemory; rpmds ds = NULL; @@ -315,7 +315,7 @@ exit: return rpmdsLink(ds, (ds ? ds->Type : RPMDBG())); } -rpmds rpmdsSingle(rpm_tag_t tagN, const char * N, const char * EVR, int32_t Flags) +rpmds rpmdsSingle(rpm_tag_t tagN, const char * N, const char * EVR, rpmsenseFlags Flags) { rpmds ds = NULL; const char * Type; @@ -415,9 +415,9 @@ const char * rpmdsEVR(const rpmds ds) return EVR; } -int32_t rpmdsFlags(const rpmds ds) +rpmsenseFlags rpmdsFlags(const rpmds ds) { - int32_t Flags = 0; + rpmsenseFlags Flags = 0; if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) { if (ds->Flags != NULL) @@ -666,7 +666,7 @@ int rpmdsMerge(rpmds * dsp, rpmds ods) rpmds ds; const char ** N; const char ** EVR; - int32_t * Flags; + rpmsenseFlags * Flags; int j; int save; @@ -948,7 +948,7 @@ int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote) int32_t * epoch; const char * pkgEVR; char * t; - int32_t pkgFlags = RPMSENSE_EQUAL; + rpmsenseFlags pkgFlags = RPMSENSE_EQUAL; rpmds pkg; int rc = 1; /* XXX assume match, names already match here */ diff --git a/lib/rpmds.h b/lib/rpmds.h index 6b604b6ab..2500e6b1c 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -138,7 +138,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds); * @param Flags comparison flags * @return new dependency set */ -rpmds rpmdsThis(Header h, rpm_tag_t tagN, int32_t Flags); +rpmds rpmdsThis(Header h, rpm_tag_t tagN, rpmsenseFlags Flags); /** \ingroup rpmds * Create, load and initialize a dependency set of size 1. @@ -148,7 +148,7 @@ rpmds rpmdsThis(Header h, rpm_tag_t tagN, int32_t Flags); * @param Flags comparison flags * @return new dependency set */ -rpmds rpmdsSingle(rpm_tag_t tagN, const char * N, const char * EVR, int32_t Flags); +rpmds rpmdsSingle(rpm_tag_t tagN, const char * N, const char * EVR, rpmsenseFlags Flags); /** \ingroup rpmds * Return dependency set count. @@ -198,7 +198,7 @@ extern const char * rpmdsEVR(const rpmds ds); * @param ds dependency set * @return current dependency flags, 0 on invalid */ -int32_t rpmdsFlags(const rpmds ds); +rpmsenseFlags rpmdsFlags(const rpmds ds); /** \ingroup rpmds * Return current dependency type. diff --git a/lib/rpmlib.h b/lib/rpmlib.h index fdc6316a6..c948a3f1e 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -11,6 +11,7 @@ #include <rpm/rpmio.h> #include <rpm/header.h> #include <rpm/rpmtag.h> +#include <rpm/rpmds.h> /* XXX move rpmlib provides to rpmds instead */ #include <popt.h> #ifdef __cplusplus @@ -207,7 +208,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, * @return no. of entries */ int rpmGetRpmlibProvides(const char *** provNames, - int ** provFlags, + rpmsenseFlags ** provFlags, const char *** provVersions); /** \ingroup rpmtrans diff --git a/lib/rpmlibprov.c b/lib/rpmlibprov.c index 5bbdcf10a..39cd659e7 100644 --- a/lib/rpmlibprov.c +++ b/lib/rpmlibprov.c @@ -15,7 +15,7 @@ struct rpmlibProvides_s { const char * featureName; const char * featureEVR; - int featureFlags; + rpmsenseFlags featureFlags; const char * featureDescription; }; @@ -95,11 +95,11 @@ int rpmCheckRpmlibProvides(const rpmds key) return rc; } -int rpmGetRpmlibProvides(const char *** provNames, int ** provFlags, +int rpmGetRpmlibProvides(const char *** provNames, rpmsenseFlags ** provFlags, const char *** provVersions) { const char ** names, ** versions; - int * flags; + rpmsenseFlags * flags; int n = 0; while (rpmlibProvides[n].featureName != NULL) diff --git a/lib/rpmts.c b/lib/rpmts.c index ded3acc56..786ece15c 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -407,7 +407,7 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, size_t pktlen const char * group = "Public Keys"; const char * license = "pubkey"; const char * buildhost = "localhost"; - int32_t pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL); + rpmsenseFlags pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL); int32_t zero = 0; pgpDig dig = NULL; pgpDigParams pubp = NULL; diff --git a/lib/transaction.c b/lib/transaction.c index ba3b23b67..4d0987596 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -600,7 +600,7 @@ assert(otherFi != NULL); static int ensureOlder(rpmts ts, const rpmte p, const Header h) { - int32_t reqFlags = (RPMSENSE_LESS | RPMSENSE_EQUAL); + rpmsenseFlags reqFlags = (RPMSENSE_LESS | RPMSENSE_EQUAL); const char * reqEVR; rpmds req; char * t; |