diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-02 22:59:38 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-02 22:59:38 +0200 |
commit | 249113b17a378e55532a1bd4b01c6954d56e59e1 (patch) | |
tree | 1d8d4bf07067f15dc76ac0994c953ede0844f01e | |
parent | b2a11e03510dde4e805c388b24dcb41e5d1278ab (diff) | |
download | rpm-249113b17a378e55532a1bd4b01c6954d56e59e1.tar.gz rpm-249113b17a378e55532a1bd4b01c6954d56e59e1.tar.bz2 rpm-249113b17a378e55532a1bd4b01c6954d56e59e1.zip |
Move rpmsenseFlag enums to rpmds where they logically belong
-rw-r--r-- | build/rpmbuild.h | 1 | ||||
-rw-r--r-- | lib/formats.c | 1 | ||||
-rw-r--r-- | lib/legacy.c | 1 | ||||
-rw-r--r-- | lib/rpmds.h | 69 | ||||
-rw-r--r-- | lib/rpmlib.h | 69 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 1 | ||||
-rw-r--r-- | tools/rpmgraph.c | 1 | ||||
-rw-r--r-- | tools/rpmsort.c | 1 |
8 files changed, 75 insertions, 69 deletions
diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 55bd5534d..54ec184c8 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -7,6 +7,7 @@ */ #include <rpmcli.h> +#include <rpmds.h> /* and it shouldn't need these :-( */ #include <rpmstring.h> diff --git a/lib/formats.c b/lib/formats.c index f9f8627fa..6697bdb45 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -5,6 +5,7 @@ #include "system.h" #include "rpmio/digest.h" #include <rpmlib.h> +#include <rpmds.h> #include <rpmmacro.h> /* XXX for %_i18ndomains */ #include <rpmfi.h> diff --git a/lib/legacy.c b/lib/legacy.c index 2372f14a6..169a10033 100644 --- a/lib/legacy.c +++ b/lib/legacy.c @@ -8,6 +8,7 @@ #include <rpmmacro.h> #include <rpmstring.h> #include <rpmfi.h> +#include <rpmds.h> #include "lib/legacy.h" #include "debug.h" diff --git a/lib/rpmds.h b/lib/rpmds.h index 6829be78b..d6e296d2b 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -22,6 +22,75 @@ extern int _rpmds_debug; extern int _rpmds_nopromote; /** \ingroup rpmds + * Dependency Attributes. + */ +typedef enum rpmsenseFlags_e { + RPMSENSE_ANY = 0, + RPMSENSE_SERIAL = (1 << 0), /*!< @todo Legacy. */ + RPMSENSE_LESS = (1 << 1), + RPMSENSE_GREATER = (1 << 2), + RPMSENSE_EQUAL = (1 << 3), + RPMSENSE_PROVIDES = (1 << 4), /* only used internally by builds */ + RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */ + /* bit 6 used to be RPMSENSE_PREREQ */ +#define RPMSENSE_PREREQ RPMSENSE_ANY + RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */ + RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */ + RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), /*!< %pre dependency. */ + RPMSENSE_SCRIPT_POST = ((1 << 10)|RPMSENSE_PREREQ), /*!< %post dependency. */ + RPMSENSE_SCRIPT_PREUN = ((1 << 11)|RPMSENSE_PREREQ), /*!< %preun dependency. */ + RPMSENSE_SCRIPT_POSTUN = ((1 << 12)|RPMSENSE_PREREQ), /*!< %postun dependency. */ + RPMSENSE_SCRIPT_VERIFY = (1 << 13), /*!< %verify dependency. */ + RPMSENSE_FIND_REQUIRES = (1 << 14), /*!< find-requires generated dependency. */ + RPMSENSE_FIND_PROVIDES = (1 << 15), /*!< find-provides generated dependency. */ + + RPMSENSE_TRIGGERIN = (1 << 16), /*!< %triggerin dependency. */ + RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */ + RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependency. */ + RPMSENSE_MISSINGOK = (1 << 19), /*!< suggests/enhances hint. */ + RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */ + RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */ + RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */ + RPMSENSE_SCRIPT_CLEAN = (1 << 23), /*!< %clean build dependency. */ + RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */ + RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */ + RPMSENSE_KEYRING = (1 << 26), + RPMSENSE_PATCHES = (1 << 27), + RPMSENSE_CONFIG = (1 << 28) +} rpmsenseFlags; + +#define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ + /* less, greater, equal. */ + +#define RPMSENSE_TRIGGER \ + (RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) + +#define _ALL_REQUIRES_MASK (\ + RPMSENSE_INTERP | \ + RPMSENSE_SCRIPT_PRE | \ + RPMSENSE_SCRIPT_POST | \ + RPMSENSE_SCRIPT_PREUN | \ + RPMSENSE_SCRIPT_POSTUN | \ + RPMSENSE_SCRIPT_VERIFY | \ + RPMSENSE_FIND_REQUIRES | \ + RPMSENSE_SCRIPT_PREP | \ + RPMSENSE_SCRIPT_BUILD | \ + RPMSENSE_SCRIPT_INSTALL | \ + RPMSENSE_SCRIPT_CLEAN | \ + RPMSENSE_RPMLIB | \ + RPMSENSE_KEYRING ) + +#define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) +#define _INSTALL_ONLY_MASK \ + _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING) +#define _ERASE_ONLY_MASK \ + _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) + +#define isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ) +#define isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK) +#define isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK) + +/** \ingroup rpmds * Unreference a dependency set instance. * @param ds dependency set * @param msg diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 69f468ed6..a090ef721 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -373,75 +373,6 @@ typedef enum rpmTag_e { #define RPMTAG_EXTERNAL_TAG 1000000 -/** \ingroup rpmds - * Dependency Attributes. - */ -typedef enum rpmsenseFlags_e { - RPMSENSE_ANY = 0, - RPMSENSE_SERIAL = (1 << 0), /*!< @todo Legacy. */ - RPMSENSE_LESS = (1 << 1), - RPMSENSE_GREATER = (1 << 2), - RPMSENSE_EQUAL = (1 << 3), - RPMSENSE_PROVIDES = (1 << 4), /* only used internally by builds */ - RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */ - /* bit 6 used to be RPMSENSE_PREREQ */ -#define RPMSENSE_PREREQ RPMSENSE_ANY - RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */ - RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */ - RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), /*!< %pre dependency. */ - RPMSENSE_SCRIPT_POST = ((1 << 10)|RPMSENSE_PREREQ), /*!< %post dependency. */ - RPMSENSE_SCRIPT_PREUN = ((1 << 11)|RPMSENSE_PREREQ), /*!< %preun dependency. */ - RPMSENSE_SCRIPT_POSTUN = ((1 << 12)|RPMSENSE_PREREQ), /*!< %postun dependency. */ - RPMSENSE_SCRIPT_VERIFY = (1 << 13), /*!< %verify dependency. */ - RPMSENSE_FIND_REQUIRES = (1 << 14), /*!< find-requires generated dependency. */ - RPMSENSE_FIND_PROVIDES = (1 << 15), /*!< find-provides generated dependency. */ - - RPMSENSE_TRIGGERIN = (1 << 16), /*!< %triggerin dependency. */ - RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */ - RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependency. */ - RPMSENSE_MISSINGOK = (1 << 19), /*!< suggests/enhances hint. */ - RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */ - RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */ - RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */ - RPMSENSE_SCRIPT_CLEAN = (1 << 23), /*!< %clean build dependency. */ - RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */ - RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */ - RPMSENSE_KEYRING = (1 << 26), - RPMSENSE_PATCHES = (1 << 27), - RPMSENSE_CONFIG = (1 << 28) -} rpmsenseFlags; - -#define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ - /* less, greater, equal. */ - -#define RPMSENSE_TRIGGER \ - (RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) - -#define _ALL_REQUIRES_MASK (\ - RPMSENSE_INTERP | \ - RPMSENSE_SCRIPT_PRE | \ - RPMSENSE_SCRIPT_POST | \ - RPMSENSE_SCRIPT_PREUN | \ - RPMSENSE_SCRIPT_POSTUN | \ - RPMSENSE_SCRIPT_VERIFY | \ - RPMSENSE_FIND_REQUIRES | \ - RPMSENSE_SCRIPT_PREP | \ - RPMSENSE_SCRIPT_BUILD | \ - RPMSENSE_SCRIPT_INSTALL | \ - RPMSENSE_SCRIPT_CLEAN | \ - RPMSENSE_RPMLIB | \ - RPMSENSE_KEYRING ) - -#define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) -#define _INSTALL_ONLY_MASK \ - _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING) -#define _ERASE_ONLY_MASK \ - _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) - -#define isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ) -#define isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK) -#define isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK) - /* ==================================================================== */ /** \name RPMRC */ diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 052f2e171..755b7c3e2 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -21,6 +21,7 @@ #include <rpmsq.h> #include <rpmstring.h> #include <rpmfileutil.h> +#include <rpmds.h> /* XXX isInstallPreReq macro only */ #include <rpmlog.h> #include "rpmdb/rpmdb_internal.h" diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index e1e7110e7..ba54d8931 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -7,6 +7,7 @@ const char *__progname; #include <rpmps.h> #include <rpmte.h> #include <rpmts.h> +#include <rpmds.h> #include <rpmlog.h> #include <rpmfileutil.h> diff --git a/tools/rpmsort.c b/tools/rpmsort.c index 368b25116..ccb22c023 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -9,6 +9,7 @@ const char *__progname; #include <rpmps.h> #include <rpmte.h> #include <rpmts.h> +#include <rpmds.h> #include "lib/manifest.h" #include <rpmlog.h> |