| header.h | | header.h | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| Header headerFree( Header h); | | Header headerFree( Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Reference a header instance. | | * Reference a header instance. | |
| * @param h header | | * @param h header | |
| * @return new header reference | | * @return new header reference | |
| */ | | */ | |
| Header headerLink(Header h); | | Header headerLink(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
|
| * Dereference a header instance. | | | |
| * @param h header | | | |
| * @return new header reference | | | |
| */ | | | |
| Header headerUnlink(Header h); | | | |
| | | | |
| /** \ingroup header | | | |
| * Sort tags in header. | | * Sort tags in header. | |
| * @param h header | | * @param h header | |
| */ | | */ | |
| void headerSort(Header h); | | void headerSort(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Restore tags in header to original ordering. | | * Restore tags in header to original ordering. | |
| * @param h header | | * @param h header | |
| */ | | */ | |
| void headerUnsort(Header h); | | void headerUnsort(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return size of on-disk header representation in bytes. | | * Return size of on-disk header representation in bytes. | |
| * @param h header | | * @param h header | |
| * @param magicp include size of 8 bytes for (magic, 0)? | | * @param magicp include size of 8 bytes for (magic, 0)? | |
| * @return size of on-disk header | | * @return size of on-disk header | |
| */ | | */ | |
|
| unsigned int headerSizeof(Header h, enum hMagic magicp); | | unsigned int headerSizeof(Header h, int magicp); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Perform simple sanity and range checks on header tag(s). | | * Perform simple sanity and range checks on header tag(s). | |
| * @param il no. of tags in header | | * @param il no. of tags in header | |
| * @param dl no. of bytes in header data. | | * @param dl no. of bytes in header data. | |
| * @param pev 1st element in tag array, big-endian | | * @param pev 1st element in tag array, big-endian | |
| * @param iv failing (or last) tag element, host-endian | | * @param iv failing (or last) tag element, host-endian | |
| * @param negate negative offset expected? | | * @param negate negative offset expected? | |
| * @return -1 on success, otherwise failing tag element index | | * @return -1 on success, otherwise failing tag element index | |
| */ | | */ | |
| | | | |
| skipping to change at line 109 | | skipping to change at line 102 | |
| */ | | */ | |
| void * headerUnload(Header h); | | void * headerUnload(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Convert header to on-disk representation, and then reload. | | * Convert header to on-disk representation, and then reload. | |
| * This is used to insure that all header data is in one chunk. | | * This is used to insure that all header data is in one chunk. | |
| * @param h header (with pointers) | | * @param h header (with pointers) | |
| * @param tag region tag | | * @param tag region tag | |
| * @return on-disk header (with offsets) | | * @return on-disk header (with offsets) | |
| */ | | */ | |
|
| Header headerReload(Header h, rpmTag tag); | | Header headerReload(Header h, rpmTagVal tag); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Duplicate a header. | | * Duplicate a header. | |
| * @param h header | | * @param h header | |
| * @return new header instance | | * @return new header instance | |
| */ | | */ | |
| Header headerCopy(Header h); | | Header headerCopy(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Convert header to in-memory representation. | | * Convert header to in-memory representation. | |
| | | | |
| skipping to change at line 138 | | skipping to change at line 131 | |
| * @return header | | * @return header | |
| */ | | */ | |
| Header headerCopyLoad(const void * uh); | | Header headerCopyLoad(const void * uh); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Read (and load) header from file handle. | | * Read (and load) header from file handle. | |
| * @param fd file handle | | * @param fd file handle | |
| * @param magicp read (and verify) 8 bytes of (magic, 0)? | | * @param magicp read (and verify) 8 bytes of (magic, 0)? | |
| * @return header (or NULL on error) | | * @return header (or NULL on error) | |
| */ | | */ | |
|
| Header headerRead(FD_t fd, enum hMagic magicp); | | Header headerRead(FD_t fd, int magicp); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Write (with unload) header to file handle. | | * Write (with unload) header to file handle. | |
| * @param fd file handle | | * @param fd file handle | |
| * @param h header | | * @param h header | |
| * @param magicp prefix write with 8 bytes of (magic, 0)? | | * @param magicp prefix write with 8 bytes of (magic, 0)? | |
| * @return 0 on success, 1 on error | | * @return 0 on success, 1 on error | |
| */ | | */ | |
|
| int headerWrite(FD_t fd, Header h, enum hMagic magicp); | | int headerWrite(FD_t fd, Header h, int magicp); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Check if tag is in header. | | * Check if tag is in header. | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerIsEntry(Header h, rpmTag tag); | | int headerIsEntry(Header h, rpmTagVal tag); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Modifier flags for headerGet() operation. | | * Modifier flags for headerGet() operation. | |
| * For consistent behavior you'll probably want to use ALLOC to ensure | | * For consistent behavior you'll probably want to use ALLOC to ensure | |
| * the caller owns the data, but MINMEM is useful for avoiding extra | | * the caller owns the data, but MINMEM is useful for avoiding extra | |
| * copy of data when you are sure the header wont go away. | | * copy of data when you are sure the header wont go away. | |
| * Most of the time you'll probably want EXT too, but note that extensions | | * Most of the time you'll probably want EXT too, but note that extensions | |
| * tags don't generally honor the other flags, MINMEM, RAW, ALLOC and ARGV | | * tags don't generally honor the other flags, MINMEM, RAW, ALLOC and ARGV | |
| * are only relevant for non-extension data. | | * are only relevant for non-extension data. | |
| */ | | */ | |
|
| typedef enum headerGetFlags_e { | | enum headerGetFlags_e { | |
| HEADERGET_DEFAULT = 0, /* legacy headerGetEntry() behavior */ | | HEADERGET_DEFAULT = 0, /* legacy headerGetEntry() behavior */ | |
| HEADERGET_MINMEM = (1 << 0), /* pointers can refer to header memory *
/ | | HEADERGET_MINMEM = (1 << 0), /* pointers can refer to header memory *
/ | |
| HEADERGET_EXT = (1 << 1), /* lookup extension types too */ | | HEADERGET_EXT = (1 << 1), /* lookup extension types too */ | |
| HEADERGET_RAW = (1 << 2), /* return raw contents (no i18n lookups)
*/ | | HEADERGET_RAW = (1 << 2), /* return raw contents (no i18n lookups)
*/ | |
| HEADERGET_ALLOC = (1 << 3), /* always allocate memory for all data *
/ | | HEADERGET_ALLOC = (1 << 3), /* always allocate memory for all data *
/ | |
| HEADERGET_ARGV = (1 << 4), /* return string arrays NULL-terminated
*/ | | HEADERGET_ARGV = (1 << 4), /* return string arrays NULL-terminated
*/ | |
|
| } headerGetFlags; | | }; | |
| | | | |
| | | typedef rpmFlags headerGetFlags; | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Retrieve tag value. | | * Retrieve tag value. | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @retval td tag data container | | * @retval td tag data container | |
| * @param flags retrieval modifier flags | | * @param flags retrieval modifier flags | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerGet(Header h, rpmTag tag, rpmtd td, headerGetFlags flags); | | int headerGet(Header h, rpmTagVal tag, rpmtd td, headerGetFlags flags); | |
| | | | |
|
| typedef enum headerPutFlags_e { | | enum headerPutFlags_e { | |
| HEADERPUT_DEFAULT = 0, | | HEADERPUT_DEFAULT = 0, | |
| HEADERPUT_APPEND = (1 << 0), | | HEADERPUT_APPEND = (1 << 0), | |
|
| } headerPutFlags; | | }; | |
| | | | |
| | | typedef rpmFlags headerPutFlags; | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Add or append tag to header. | | * Add or append tag to header. | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param td tag data container | | * @param td tag data container | |
| * @param flags flags to control operation | | * @param flags flags to control operation | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
| int headerPut(Header h, rpmtd td, headerPutFlags flags); | | int headerPut(Header h, rpmtd td, headerPutFlags flags); | |
| | | | |
| skipping to change at line 223 | | skipping to change at line 220 | |
| * need more fine grained control use headerPut() & friends instead. | | * need more fine grained control use headerPut() & friends instead. | |
| * @todo Make doxygen group these meaningfully. | | * @todo Make doxygen group these meaningfully. | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag to insert | | * @param tag tag to insert | |
| * @param val pointer to value(s) | | * @param val pointer to value(s) | |
| * @param size number of items in array (1 or larger) | | * @param size number of items in array (1 or larger) | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| * | | * | |
| */ | | */ | |
|
| int headerPutString(Header h, rpmTag tag, const char *val); | | int headerPutString(Header h, rpmTagVal tag, const char *val); | |
| int headerPutStringArray(Header h, rpmTag tag, const char **val, rpm_count_ | | int headerPutStringArray(Header h, rpmTagVal tag, const char **val, rpm_cou | |
| t size); | | nt_t size); | |
| int headerPutBin(Header h, rpmTag tag, uint8_t *val, rpm_count_t size); | | int headerPutBin(Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t s | |
| int headerPutChar(Header h, rpmTag tag, char *val, rpm_count_t size); | | ize); | |
| int headerPutUint8(Header h, rpmTag tag, uint8_t *val, rpm_count_t size); | | int headerPutChar(Header h, rpmTagVal tag, const char *val, rpm_count_t siz | |
| int headerPutUint16(Header h, rpmTag tag, uint16_t *val, rpm_count_t size); | | e); | |
| int headerPutUint32(Header h, rpmTag tag, uint32_t *val, rpm_count_t size); | | int headerPutUint8(Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t | |
| int headerPutUint64(Header h, rpmTag tag, uint64_t *val, rpm_count_t size); | | size); | |
| | | int headerPutUint16(Header h, rpmTagVal tag, const uint16_t *val, rpm_count | |
| | | _t size); | |
| | | int headerPutUint32(Header h, rpmTagVal tag, const uint32_t *val, rpm_count | |
| | | _t size); | |
| | | int headerPutUint64(Header h, rpmTagVal tag, const uint64_t *val, rpm_count | |
| | | _t size); | |
| /** @} */ | | /** @} */ | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Add locale specific tag to header. | | * Add locale specific tag to header. | |
| * A NULL lang is interpreted as the C locale. Here are the rules: | | * A NULL lang is interpreted as the C locale. Here are the rules: | |
| * \verbatim | | * \verbatim | |
| * - If the tag isn't in the header, it's added with the passed string | | * - If the tag isn't in the header, it's added with the passed string | |
| * as new value. | | * as new value. | |
| * - If the tag occurs multiple times in entry, which tag is affected | | * - If the tag occurs multiple times in entry, which tag is affected | |
| * by the operation is undefined. | | * by the operation is undefined. | |
| | | | |
| skipping to change at line 253 | | skipping to change at line 250 | |
| * \endverbatim | | * \endverbatim | |
| * This function is intended to just "do the right thing". If you need | | * This function is intended to just "do the right thing". If you need | |
| * more fine grained control use headerPut() and headerMod(). | | * more fine grained control use headerPut() and headerMod(). | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @param string tag value | | * @param string tag value | |
| * @param lang locale | | * @param lang locale | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerAddI18NString(Header h, rpmTag tag, const char * string, | | int headerAddI18NString(Header h, rpmTagVal tag, const char * string, | |
| const char * lang); | | const char * lang); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Modify tag in header. | | * Modify tag in header. | |
| * If there are multiple entries with this tag, the first one gets replaced
. | | * If there are multiple entries with this tag, the first one gets replaced
. | |
| * @param h header | | * @param h header | |
| * @param td tag data container | | * @param td tag data container | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
| int headerMod(Header h, rpmtd td); | | int headerMod(Header h, rpmtd td); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Delete tag in header. | | * Delete tag in header. | |
| * Removes all entries of type tag from the header, returns 1 if none were | | * Removes all entries of type tag from the header, returns 1 if none were | |
| * found. | | * found. | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @return 0 on success, 1 on failure (INCONSISTENT) | | * @return 0 on success, 1 on failure (INCONSISTENT) | |
| */ | | */ | |
|
| int headerDel(Header h, rpmTag tag); | | int headerDel(Header h, rpmTagVal tag); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return formatted output string from header tags. | | * Return formatted output string from header tags. | |
| * The returned string must be free()d. | | * The returned string must be free()d. | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param fmt format to use | | * @param fmt format to use | |
| * @retval errmsg error message (if any) | | * @retval errmsg error message (if any) | |
| * @return formatted output string (malloc'ed) | | * @return formatted output string (malloc'ed) | |
| */ | | */ | |
| char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); | | char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Duplicate tag values from one header into another. | | * Duplicate tag values from one header into another. | |
| * @param headerFrom source header | | * @param headerFrom source header | |
| * @param headerTo destination header | | * @param headerTo destination header | |
| * @param tagstocopy array of tags that are copied | | * @param tagstocopy array of tags that are copied | |
| */ | | */ | |
| void headerCopyTags(Header headerFrom, Header headerTo, | | void headerCopyTags(Header headerFrom, Header headerTo, | |
|
| const rpmTag * tagstocopy); | | const rpmTagVal * tagstocopy); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Destroy header tag iterator. | | * Destroy header tag iterator. | |
| * @param hi header tag iterator | | * @param hi header tag iterator | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| HeaderIterator headerFreeIterator(HeaderIterator hi); | | HeaderIterator headerFreeIterator(HeaderIterator hi); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Create header tag iterator. | | * Create header tag iterator. | |
| | | | |
| skipping to change at line 323 | | skipping to change at line 320 | |
| * @retval td tag data container | | * @retval td tag data container | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
| int headerNext(HeaderIterator hi, rpmtd td); | | int headerNext(HeaderIterator hi, rpmtd td); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return next tag number from header. | | * Return next tag number from header. | |
| * @param hi header tag iterator | | * @param hi header tag iterator | |
| * @return next tag, RPMTAG_NOT_FOUND to stop iteration | | * @return next tag, RPMTAG_NOT_FOUND to stop iteration | |
| */ | | */ | |
|
| rpmTag headerNextTag(HeaderIterator hi); | | rpmTagVal headerNextTag(HeaderIterator hi); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return name, version, release strings from header. | | * Return name, version, release strings from header. | |
| * @param h header | | * @param h header | |
| * @retval *np name pointer (or NULL) | | * @retval *np name pointer (or NULL) | |
| * @retval *vp version pointer (or NULL) | | * @retval *vp version pointer (or NULL) | |
| * @retval *rp release pointer (or NULL) | | * @retval *rp release pointer (or NULL) | |
| * @return 0 always | | * @return 0 always | |
| */ | | */ | |
| RPM_GNUC_DEPRECATED | | RPM_GNUC_DEPRECATED | |
| | | | |
| skipping to change at line 390 | | skipping to change at line 387 | |
| */ | | */ | |
| RPM_GNUC_DEPRECATED | | RPM_GNUC_DEPRECATED | |
| char * headerGetEVR(Header h, const char **np); | | char * headerGetEVR(Header h, const char **np); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return any non-array tag from header, converted to string | | * Return any non-array tag from header, converted to string | |
| * @param h header | | * @param h header | |
| * @param tag tag to retrieve | | * @param tag tag to retrieve | |
| * @return string pointer (malloced) or NULL on failure | | * @return string pointer (malloced) or NULL on failure | |
| */ | | */ | |
|
| char * headerGetAsString(Header h, rpmTag tag); | | char * headerGetAsString(Header h, rpmTagVal tag); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return a simple string tag from header | | * Return a simple string tag from header | |
| * @param h header | | * @param h header | |
| * @param tag tag to retrieve | | * @param tag tag to retrieve | |
| * @return string pointer (to header memory) or NULL on failure | | * @return string pointer (to header memory) or NULL on failure | |
| */ | | */ | |
|
| const char * headerGetString(Header h, rpmTag tag); | | const char * headerGetString(Header h, rpmTagVal tag); | |
| | | | |
| /* \ingroup header | | /* \ingroup header | |
| * Return a simple number tag (or extension) from header | | * Return a simple number tag (or extension) from header | |
| * @param h header | | * @param h header | |
| * @param tag tag to retrieve | | * @param tag tag to retrieve | |
| * @return numeric tag value or 0 on failure | | * @return numeric tag value or 0 on failure | |
| */ | | */ | |
|
| uint64_t headerGetNumber(Header h, rpmTag tag); | | uint64_t headerGetNumber(Header h, rpmTagVal tag); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return header color. | | * Return header color. | |
| * @param h header | | * @param h header | |
| * @return header color | | * @return header color | |
| */ | | */ | |
| RPM_GNUC_DEPRECATED | | RPM_GNUC_DEPRECATED | |
| rpm_color_t headerGetColor(Header h); | | rpm_color_t headerGetColor(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| | | | |
| skipping to change at line 439 | | skipping to change at line 436 | |
| | | | |
| typedef enum headerConvOps_e { | | typedef enum headerConvOps_e { | |
| HEADERCONV_EXPANDFILELIST = 0, | | HEADERCONV_EXPANDFILELIST = 0, | |
| HEADERCONV_COMPRESSFILELIST = 1, | | HEADERCONV_COMPRESSFILELIST = 1, | |
| HEADERCONV_RETROFIT_V3 = 2, | | HEADERCONV_RETROFIT_V3 = 2, | |
| } headerConvOps; | | } headerConvOps; | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Convert header to/from (legacy) data presentation | | * Convert header to/from (legacy) data presentation | |
| * @param h header | | * @param h header | |
|
| * @param op operation | | * @param op one of headerConvOps operations | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerConvert(Header h, headerConvOps op); | | int headerConvert(Header h, int op); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_HEADER */ | | #endif /* H_HEADER */ | |
| | | | |
End of changes. 21 change blocks. |
| 35 lines changed or deleted | | 38 lines changed or added | |
|
| rpmbuild.h | | rpmbuild.h | |
| #ifndef _H_RPMBUILD_ | | #ifndef _H_RPMBUILD_ | |
| #define _H_RPMBUILD_ | | #define _H_RPMBUILD_ | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| * \file build/rpmbuild.h | | * \file build/rpmbuild.h | |
| * This is the *only* module users of librpmbuild should need to include. | | * This is the *only* module users of librpmbuild should need to include. | |
| */ | | */ | |
| | | | |
| #include <rpm/rpmcli.h> | | #include <rpm/rpmcli.h> | |
| #include <rpm/rpmds.h> | | #include <rpm/rpmds.h> | |
|
| | | | |
| /* and it shouldn't need these :-( */ | | | |
| #include <rpm/rpmstring.h> | | | |
| | | | |
| /* but this will be needed */ | | | |
| #include <rpm/rpmspec.h> | | #include <rpm/rpmspec.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Bit(s) to control buildSpec() operation. | | * Bit(s) to control rpmSpecBuild() operation. | |
| */ | | */ | |
|
| typedef enum rpmBuildFlags_e { | | enum rpmBuildFlags_e { | |
| RPMBUILD_NONE = 0, | | RPMBUILD_NONE = 0, | |
| RPMBUILD_PREP = (1 << 0), /*!< Execute %%prep. */ | | RPMBUILD_PREP = (1 << 0), /*!< Execute %%prep. */ | |
| RPMBUILD_BUILD = (1 << 1), /*!< Execute %%build. */ | | RPMBUILD_BUILD = (1 << 1), /*!< Execute %%build. */ | |
| RPMBUILD_INSTALL = (1 << 2), /*!< Execute %%install. */ | | RPMBUILD_INSTALL = (1 << 2), /*!< Execute %%install. */ | |
| RPMBUILD_CHECK = (1 << 3), /*!< Execute %%check. */ | | RPMBUILD_CHECK = (1 << 3), /*!< Execute %%check. */ | |
| RPMBUILD_CLEAN = (1 << 4), /*!< Execute %%clean. */ | | RPMBUILD_CLEAN = (1 << 4), /*!< Execute %%clean. */ | |
| RPMBUILD_FILECHECK = (1 << 5), /*!< Check %%files manifest. */ | | RPMBUILD_FILECHECK = (1 << 5), /*!< Check %%files manifest. */ | |
| RPMBUILD_PACKAGESOURCE = (1 << 6), /*!< Create source package.
*/ | | RPMBUILD_PACKAGESOURCE = (1 << 6), /*!< Create source package.
*/ | |
| RPMBUILD_PACKAGEBINARY = (1 << 7), /*!< Create binary package(s
). */ | | RPMBUILD_PACKAGEBINARY = (1 << 7), /*!< Create binary package(s
). */ | |
| RPMBUILD_RMSOURCE = (1 << 8), /*!< Remove source(s) and patch(s).
*/ | | RPMBUILD_RMSOURCE = (1 << 8), /*!< Remove source(s) and patch(s).
*/ | |
| RPMBUILD_RMBUILD = (1 << 9), /*!< Remove build sub-tree. */ | | RPMBUILD_RMBUILD = (1 << 9), /*!< Remove build sub-tree. */ | |
|
| RPMBUILD_STRINGBUF = (1 << 10), /*!< only for doScript() */ | | RPMBUILD_STRINGBUF = (1 << 10), /*!< Internal use only */ | |
| RPMBUILD_RMSPEC = (1 << 11) /*!< Remove spec file. */ | | RPMBUILD_RMSPEC = (1 << 11), /*!< Remove spec file. */ | |
| } rpmBuildFlags; | | | |
| | | | |
| #define PART_SUBNAME 0 | | | |
| #define PART_NAME 1 | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * rpmSpec file parser states. | | | |
| */ | | | |
| /** \ingroup rpmbuild | | | |
| * * Spec file parser states. | | | |
| * */ | | | |
| #define PART_BASE 0 | | | |
| typedef enum rpmParseState_e { | | | |
| PART_ERROR = -1, /*!< */ | | | |
| PART_NONE = 0+PART_BASE, /*!< */ | | | |
| /* leave room for RPMRC_NOTFOUND returns. */ | | | |
| PART_PREAMBLE = 11+PART_BASE, /*!< */ | | | |
| PART_PREP = 12+PART_BASE, /*!< */ | | | |
| PART_BUILD = 13+PART_BASE, /*!< */ | | | |
| PART_INSTALL = 14+PART_BASE, /*!< */ | | | |
| PART_CHECK = 15+PART_BASE, /*!< */ | | | |
| PART_CLEAN = 16+PART_BASE, /*!< */ | | | |
| PART_FILES = 17+PART_BASE, /*!< */ | | | |
| PART_PRE = 18+PART_BASE, /*!< */ | | | |
| PART_POST = 19+PART_BASE, /*!< */ | | | |
| PART_PREUN = 20+PART_BASE, /*!< */ | | | |
| PART_POSTUN = 21+PART_BASE, /*!< */ | | | |
| PART_PRETRANS = 22+PART_BASE, /*!< */ | | | |
| PART_POSTTRANS = 23+PART_BASE, /*!< */ | | | |
| PART_DESCRIPTION = 24+PART_BASE, /*!< */ | | | |
| PART_CHANGELOG = 25+PART_BASE, /*!< */ | | | |
| PART_TRIGGERIN = 26+PART_BASE, /*!< */ | | | |
| PART_TRIGGERUN = 27+PART_BASE, /*!< */ | | | |
| PART_VERIFYSCRIPT = 28+PART_BASE, /*!< */ | | | |
| PART_BUILDARCHITECTURES= 29+PART_BASE,/*!< */ | | | |
| PART_TRIGGERPOSTUN = 30+PART_BASE, /*!< */ | | | |
| PART_TRIGGERPREIN = 31+PART_BASE, /*!< */ | | | |
| PART_LAST = 32+PART_BASE /*!< */ | | | |
| } rpmParseState; | | | |
| | | | |
| #define STRIP_NOTHING 0 | | | |
| #define STRIP_TRAILINGSPACE (1 << 0) | | | |
| #define STRIP_COMMENTS (1 << 1) | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Destroy uid/gid caches. | | | |
| */ | | | |
| void freeNames(void); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return cached user name from user id. | | | |
| * @todo Implement using hash. | | | |
| * @param uid user id | | | |
| * @return cached user name | | | |
| */ | | | |
| const char * getUname(uid_t uid); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return cached user name. | | | |
| * @todo Implement using hash. | | | |
| * @param uname user name | | | |
| * @return cached user name | | | |
| */ | | | |
| const char * getUnameS(const char * uname); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return cached user id. | | | |
| * @todo Implement using hash. | | | |
| * @param uname user name | | | |
| * @return cached uid | | | |
| */ | | | |
| uid_t getUidS(const char * uname); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return cached group name from group id. | | | |
| * @todo Implement using hash. | | | |
| * @param gid group id | | | |
| * @return cached group name | | | |
| */ | | | |
| const char * getGname(gid_t gid); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return cached group name. | | | |
| * @todo Implement using hash. | | | |
| * @param gname group name | | | |
| * @return cached group name | | | |
| */ | | | |
| const char * getGnameS(const char * gname); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return cached group id. | | | |
| * @todo Implement using hash. | | | |
| * @param gname group name | | | |
| * @return cached gid | | | |
| */ | | | |
| gid_t getGidS(const char * gname); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return build hostname. | | | |
| * @return build hostname | | | |
| */ | | | |
| const char * buildHost(void) ; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Return build time stamp. | | | |
| * @return build time stamp | | | |
| */ | | | |
| rpm_time_t * getBuildTime(void) ; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Read next line from spec file. | | | |
| * @param spec spec file control structure | | | |
| * @param strip truncate comments? | | | |
| * @return 0 on success, 1 on EOF, <0 on error | | | |
| */ | | | |
| int readLine(rpmSpec spec, int strip); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Stop reading from spec file, freeing resources. | | | |
| * @param spec spec file control structure | | | |
| */ | | | |
| void closeSpec(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Truncate comment lines. | | | |
| * @param s skip white space, truncate line at '#' | | | |
| */ | | | |
| void handleComments(char * s); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Check line for section separator, return next parser state. | | | |
| * @param line from spec file | | | |
| * @return next parser state | | | |
| */ | | | |
| rpmParseState isPart(const char * line) ; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse an unsigned number. | | | |
| * @param line from spec file | | | |
| * @retval res pointer to uint32_t | | | |
| * @return 0 on success, 1 on failure | | | |
| */ | | | |
| uint32_t parseUnsignedNum(const char * line, uint32_t * res); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Add changelog entry to header. | | | |
| * @param h header | | | |
| * @param time time of change | | | |
| * @param name person who made the change | | | |
| * @param text description of change | | | |
| */ | | | |
| void addChangelogEntry(Header h, time_t time, const char * name, | | | |
| const char * text); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse %%build/%%install/%%clean section(s) of a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @param parsePart current rpmParseState | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parseBuildInstallClean(rpmSpec spec, rpmParseState parsePart); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse %%changelog section of a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parseChangelog(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse %%description section of a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parseDescription(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse %%files section of a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parseFiles(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse tags from preamble of a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @param initialPackage | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parsePreamble(rpmSpec spec, int initialPackage); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse %%prep section of a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parsePrep(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Check for inappropriate characters. All alphanums are considered sane. | | | |
| * @param spec spec | | | |
| * @param field string to check | | | |
| * @param fsize size of string to check | | | |
| * @param whitelist string of permitted characters | | | |
| * @return RPMRC_OK if OK | | | |
| */ | | | |
| rpmRC rpmCharCheck(rpmSpec spec, char *field, size_t fsize, const char *whi | | | |
| telist); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse dependency relations from spec file and/or autogenerated output bu | | | |
| ffer. | | | |
| * @param spec spec file control structure | | | |
| * @param pkg package control structure | | | |
| * @param field text to parse (e.g. "foo < 0:1.2-3, bar = 5: | | | |
| 6.7") | | | |
| * @param tagN tag, identifies type of dependency | | | |
| * @param index (0 always) | | | |
| * @param tagflags dependency flags already known from context | | | |
| * @return RPMRC_OK on success, RPMRC_FAIL on failure | | | |
| */ | | | |
| rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char * field, rpmTag tagN | | | |
| , | | | |
| int index, rpmsenseFlags tagflags); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Parse %%pre et al scriptlets from a spec file. | | | |
| * @param spec spec file control structure | | | |
| * @param parsePart current rpmParseState | | | |
| * @return >= 0 next rpmParseState, < 0 on error | | | |
| */ | | | |
| int parseScript(rpmSpec spec, int parsePart); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Evaluate boolean expression. | | | |
| * @param spec spec file control structure | | | |
| * @param expr expression to parse | | | |
| * @return | | | |
| */ | | | |
| int parseExpressionBoolean(rpmSpec spec, const char * expr); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Evaluate string expression. | | | |
| * @param spec spec file control structure | | | |
| * @param expr expression to parse | | | |
| * @return | | | |
| */ | | | |
| char * parseExpressionString(rpmSpec spec, const char * expr); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Remove all sources assigned to spec file. | | | |
| * | | | |
| * @param spec spec file control structure | | | |
| * @return RPMRC_OK on success | | | |
| */ | | | |
| rpmRC doRmSource(rpmSpec spec); | | | |
| /** \ingroup rpmbuild | | | |
| * Run a build script, assembled from spec file scriptlet section. | | | |
| * | | | |
| * @param spec spec file control structure | | | |
| * @param what type of script | | | |
| * @param name name of scriptlet section | | | |
| * @param sb lines that compose script body | | | |
| * @param test don't execute scripts or package if testing | | | |
| * @return RPMRC_OK on success | | | |
| */ | | | |
| rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char * name, | | | |
| StringBuf sb, int test); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Find sub-package control structure by name. | | | |
| * @param spec spec file control structure | | | |
| * @param name (sub-)package name | | | |
| * @param flag if PART_SUBNAME, then 1st package name is prepended | | | |
| * @retval pkg package control structure | | | |
| * @return 0 on success, 1 on failure | | | |
| */ | | | |
| rpmRC lookupPackage(rpmSpec spec, const char * name, int flag, | | | |
| Package * pkg); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Create and initialize package control structure. | | | |
| * @param spec spec file control structure | | | |
| * @return package control structure | | | |
| */ | | | |
| Package newPackage(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * Destroy all packages associated with spec file. | | | |
| * @param packages package control structure chain | | | |
| * @return NULL | | | |
| */ | | | |
| Package freePackages(Package packages); | | | |
| | | | |
|
| /** \ingroup rpmbuild | | RPMBUILD_NOBUILD = (1 << 31) /*!< Don't execute or package. */ | |
| * Destroy package control structure. | | }; | |
| * @param pkg package control structure | | | |
| * @return NULL | | | |
| */ | | | |
| Package freePackage(Package pkg); | | | |
| | | | |
|
| /** \ingroup rpmbuild | | typedef rpmFlags rpmBuildFlags; | |
| * Add dependency to header, filtering duplicates. | | | |
| * @param spec spec file control structure | | | |
| * @param h header | | | |
| * @param tagN tag, identifies type of dependency | | | |
| * @param N (e.g. Requires: foo < 0:1.2-3, "foo") | | | |
| * @param EVR (e.g. Requires: foo < 0:1.2-3, "0:1.2-3") | | | |
| * @param Flags (e.g. Requires: foo < 0:1.2-3, both "Require | | | |
| s:" and "<") | | | |
| * @param index (0 always) | | | |
| * @return 0 on success, 1 on error | | | |
| */ | | | |
| int addReqProv(rpmSpec spec, Header h, rpmTag tagN, | | | |
| const char * N, const char * EVR, rpmsenseFlags Flags, | | | |
| uint32_t index); | | | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Add rpmlib feature dependency. | | * Bit(s) to control package generation | |
| * @param h header | | | |
| * @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo | | | |
| ) | | | |
| * @param featureEVR rpm feature epoch/version/release | | | |
| * @return 0 always | | | |
| */ | | */ | |
|
| int rpmlibNeedsFeature(Header h, const char * feature, const char * feature | | enum rpmBuildPkgFlags_e { | |
| EVR); | | RPMBUILD_PKG_NONE = 0, | |
| | | RPMBUILD_PKG_NODIRTOKENS = (1 << 0), /*!< Legacy filename layout */ | |
| | | }; | |
| | | | |
|
| /** \ingroup rpmbuild | | typedef rpmFlags rpmBuildPkgFlags; | |
| * Post-build processing for binary package(s). | | | |
| * @param spec spec file control structure | | | |
| * @param installSpecialDoc | | | |
| * @param test don't execute scripts or package if testing | | | |
| * @return 0 on success | | | |
| */ | | | |
| int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test); | | | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Create and initialize header for source package. | | * Describe build request. | |
| * @param spec spec file control structure | | | |
| */ | | */ | |
|
| void initSourceHeader(rpmSpec spec); | | struct rpmBuildArguments_s { | |
| | | rpmBuildPkgFlags pkgFlags; /*!< Bit(s) to control package generation. * | |
| | | / | |
| | | rpmBuildFlags buildAmount; /*!< Bit(s) to control build execution. */ | |
| | | char * buildRootOverride; /*!< from --buildroot */ | |
| | | char * cookie; /*!< NULL for binary, ??? for source, rpm's | |
| | | */ | |
| | | const char * rootdir; | |
| | | }; | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Post-build processing for source package. | | | |
| * @param spec spec file control structure | | | |
| * @return 0 on success | | | |
| */ | | */ | |
|
| int processSourceFiles(rpmSpec spec); | | typedef struct rpmBuildArguments_s * BTA_t; | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| * Parse spec file into spec control structure. | | * Parse spec file into spec control structure. | |
|
| * @param ts transaction set (spec file control in ts->spec) | | * @todo Eliminate buildRoot from here, its a build, not spec property | |
| * @param specFile | | * | |
| * @param rootDir | | * @param specFile path to spec file | |
| * @param buildRoot | | * @param flags flags to control operation | |
| * @param recursing parse is recursive? | | * @param buildRoot buildRoot override or NULL for default | |
| * @param passPhrase | | * @return new spec control structure | |
| * @param cookie | | | |
| * @param anyarch | | | |
| * @param force | | | |
| * @return | | | |
| */ | | */ | |
|
| int parseSpec(rpmts ts, const char * specFile, | | rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags, | |
| const char * rootDir, | | const char *buildRoot); | |
| const char * buildRoot, | | | |
| int recursing, | | | |
| const char * passPhrase, | | | |
| const char * cookie, | | | |
| int anyarch, int force); | | | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Build stages state machine driver. | | * Return the headers of the SRPM that would be built from the spec file | |
| * @param ts transaction set | | * @param spec path to spec file | |
| * @param spec spec file control structure | | * @return Header | |
| * @param what bit(s) to enable stages of build | | | |
| * @param test don't execute scripts or package if testing | | | |
| * @return RPMRC_OK on success | | | |
| */ | | */ | |
|
| rpmRC buildSpec(rpmts ts, rpmSpec spec, int what, int test); | | Header rpmSpecSourceHeader(rpmSpec spec); | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Check package(s). | | * Verify build depencies of a spec against. | |
| * @param pkgcheck program to run | | * @param ts (empty) transaction set | |
| * @return RPMRC_OK on success | | * @param spec parsed spec control structure | |
| | | * @return rpm problem set or NULL on no problems | |
| */ | | */ | |
|
| rpmRC checkPackages(char *pkgcheck); | | rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec); | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Generate binary package(s). | | * Retrieve build dependency set from spec. | |
| * @param spec spec file control structure | | * @param spec parsed spec control structure | |
| * @return RPMRC_OK on success | | * @param tag dependency tag | |
| | | * @return dependency set of tag (or NULL) | |
| */ | | */ | |
|
| rpmRC packageBinaries(rpmSpec spec); | | rpmds rpmSpecDS(rpmSpec spec, rpmTagVal tag); | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * Generate source package. | | * Spec build stages state machine driver. | |
| * @param spec spec file control structure | | * @param spec spec file control structure | |
|
| | | * @param buildArgs build arguments | |
| * @return RPMRC_OK on success | | * @return RPMRC_OK on success | |
| */ | | */ | |
|
| rpmRC packageSources(rpmSpec spec); | | rpmRC rpmSpecBuild(rpmSpec spec, BTA_t buildArgs); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _H_RPMBUILD_ */ | | #endif /* _H_RPMBUILD_ */ | |
| | | | |
End of changes. 24 change blocks. |
| 380 lines changed or deleted | | 49 lines changed or added | |
|
| rpmcli.h | | rpmcli.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| #include <rpm/rpmts.h> | | #include <rpm/rpmts.h> | |
| #include <rpm/rpmfi.h> | | #include <rpm/rpmfi.h> | |
| #include <rpm/rpmvf.h> | | #include <rpm/rpmvf.h> | |
| #include <rpm/argv.h> | | #include <rpm/argv.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
|
| * Should version 3 packages be produced? | | | |
| */ | | | |
| extern int _noDirTokens; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| * Popt option table for options shared by all modes and executables. | | * Popt option table for options shared by all modes and executables. | |
| */ | | */ | |
| extern struct poptOption rpmcliAllPoptTable[]; | | extern struct poptOption rpmcliAllPoptTable[]; | |
| | | | |
|
| extern int ftsOpts; | | | |
| | | | |
| extern struct poptOption rpmcliFtsPoptTable[]; | | | |
| | | | |
| extern const char * rpmcliPipeOutput; | | extern const char * rpmcliPipeOutput; | |
| | | | |
| extern const char * rpmcliRcfile; | | extern const char * rpmcliRcfile; | |
| | | | |
| extern const char * rpmcliRootDir; | | extern const char * rpmcliRootDir; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Initialize most everything needed by an rpm CLI executable context. | | * Initialize most everything needed by an rpm CLI executable context. | |
| * @param argc no. of args | | * @param argc no. of args | |
| * @param argv arg array | | * @param argv arg array | |
| | | | |
| skipping to change at line 87 | | skipping to change at line 78 | |
| #define RPMCLI_POPT_NOHDRCHK -1031 | | #define RPMCLI_POPT_NOHDRCHK -1031 | |
| #define RPMCLI_POPT_NOCONTEXTS -1032 | | #define RPMCLI_POPT_NOCONTEXTS -1032 | |
| | | | |
| /* ==================================================================== */ | | /* ==================================================================== */ | |
| /** \name RPMQV */ | | /** \name RPMQV */ | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Query/Verify argument qualifiers. | | * Query/Verify argument qualifiers. | |
| * @todo Reassign to tag values. | | * @todo Reassign to tag values. | |
| */ | | */ | |
|
| typedef enum rpmQVSources_e { | | enum rpmQVSources_e { | |
| RPMQV_PACKAGE = 0, /*!< ... from package name db search. */ | | RPMQV_PACKAGE = 0, /*!< ... from package name db search. */ | |
| RPMQV_PATH, /*!< ... from file path db search. */ | | RPMQV_PATH, /*!< ... from file path db search. */ | |
| RPMQV_ALL, /*!< ... from each installed package. */ | | RPMQV_ALL, /*!< ... from each installed package. */ | |
| RPMQV_RPM, /*!< ... from reading binary rpm package. */ | | RPMQV_RPM, /*!< ... from reading binary rpm package. */ | |
| RPMQV_GROUP, /*!< ... from group db search. */ | | RPMQV_GROUP, /*!< ... from group db search. */ | |
| RPMQV_WHATPROVIDES, /*!< ... from provides db search. */ | | RPMQV_WHATPROVIDES, /*!< ... from provides db search. */ | |
| RPMQV_WHATREQUIRES, /*!< ... from requires db search. */ | | RPMQV_WHATREQUIRES, /*!< ... from requires db search. */ | |
| RPMQV_TRIGGEREDBY, /*!< ... from trigger db search. */ | | RPMQV_TRIGGEREDBY, /*!< ... from trigger db search. */ | |
| RPMQV_DBOFFSET, /*!< ... from database header instance. */ | | RPMQV_DBOFFSET, /*!< ... from database header instance. */ | |
|
| RPMQV_SPECFILE, /*!< ... from spec file parse (query only). */ | | RPMQV_SPECRPMS, /*!< ... from spec file binaries (query only). */ | |
| | | RPMQV_SPECFILE = RPMQV_SPECRPMS, /*!< ... backwards compatibility */ | |
| RPMQV_PKGID, /*!< ... from package id (header+payload MD5). */ | | RPMQV_PKGID, /*!< ... from package id (header+payload MD5). */ | |
| RPMQV_HDRID, /*!< ... from header id (immutable header SHA1). */ | | RPMQV_HDRID, /*!< ... from header id (immutable header SHA1). */ | |
|
| RPMQV_FILEID, /*!< ... from file id (file MD5). */ | | | |
| RPMQV_TID, /*!< ... from install transaction id (time stamp). *
/ | | RPMQV_TID, /*!< ... from install transaction id (time stamp). *
/ | |
|
| RPMQV_HDLIST, /*!< ... from system hdlist. */ | | RPMQV_SPECSRPM, /*!< ... from spec file source (query only). */ | |
| RPMQV_FTSWALK /*!< ... from fts(3) walk. */ | | }; | |
| } rpmQVSources; | | | |
| | | typedef rpmFlags rpmQVSources; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Bit(s) to control rpmQuery() operation, stored in qva_flags. | | * Bit(s) to control rpmQuery() operation, stored in qva_flags. | |
| * @todo Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs?. | | * @todo Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs?. | |
| */ | | */ | |
|
| typedef enum rpmQueryFlags_e { | | enum rpmQueryFlags_e { | |
| QUERY_FOR_DEFAULT = 0, /*!< */ | | QUERY_FOR_DEFAULT = 0, /*!< */ | |
| QUERY_MD5 = (1 << 0), /*!< from --nomd5 */ | | QUERY_MD5 = (1 << 0), /*!< from --nomd5 */ | |
| QUERY_FILEDIGEST = (1 << 0), /*!< from --nofiledigest, same as --
nomd5 */ | | QUERY_FILEDIGEST = (1 << 0), /*!< from --nofiledigest, same as --
nomd5 */ | |
| QUERY_SIZE = (1 << 1), /*!< from --nosize */ | | QUERY_SIZE = (1 << 1), /*!< from --nosize */ | |
| QUERY_LINKTO = (1 << 2), /*!< from --nolink */ | | QUERY_LINKTO = (1 << 2), /*!< from --nolink */ | |
| QUERY_USER = (1 << 3), /*!< from --nouser) */ | | QUERY_USER = (1 << 3), /*!< from --nouser) */ | |
| QUERY_GROUP = (1 << 4), /*!< from --nogroup) */ | | QUERY_GROUP = (1 << 4), /*!< from --nogroup) */ | |
| QUERY_MTIME = (1 << 5), /*!< from --nomtime) */ | | QUERY_MTIME = (1 << 5), /*!< from --nomtime) */ | |
| QUERY_MODE = (1 << 6), /*!< from --nomode) */ | | QUERY_MODE = (1 << 6), /*!< from --nomode) */ | |
| QUERY_RDEV = (1 << 7), /*!< from --nodev */ | | QUERY_RDEV = (1 << 7), /*!< from --nodev */ | |
| | | | |
| skipping to change at line 135 | | skipping to change at line 127 | |
| QUERY_SCRIPT = (1 << 18), /*!< verify: from --noscripts */ | | QUERY_SCRIPT = (1 << 18), /*!< verify: from --noscripts */ | |
| QUERY_DIGEST = (1 << 19), /*!< verify: from --nodigest */ | | QUERY_DIGEST = (1 << 19), /*!< verify: from --nodigest */ | |
| QUERY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */ | | QUERY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */ | |
| QUERY_PATCHES = (1 << 21), /*!< verify: from --nopatches */ | | QUERY_PATCHES = (1 << 21), /*!< verify: from --nopatches */ | |
| QUERY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */ | | QUERY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */ | |
| QUERY_FOR_LIST = (1 << 23), /*!< query: from --list */ | | QUERY_FOR_LIST = (1 << 23), /*!< query: from --list */ | |
| QUERY_FOR_STATE = (1 << 24), /*!< query: from --state */ | | QUERY_FOR_STATE = (1 << 24), /*!< query: from --state */ | |
| QUERY_FOR_DOCS = (1 << 25), /*!< query: from --docfiles */ | | QUERY_FOR_DOCS = (1 << 25), /*!< query: from --docfiles */ | |
| QUERY_FOR_CONFIG = (1 << 26), /*!< query: from --configfiles */ | | QUERY_FOR_CONFIG = (1 << 26), /*!< query: from --configfiles */ | |
| QUERY_FOR_DUMPFILES = (1 << 27) /*!< query: from --dump */ | | QUERY_FOR_DUMPFILES = (1 << 27) /*!< query: from --dump */ | |
|
| } rpmQueryFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmQueryFlags; | |
| | | | |
| #define _QUERY_FOR_BITS \ | | #define _QUERY_FOR_BITS \ | |
| (QUERY_FOR_LIST|QUERY_FOR_STATE|QUERY_FOR_DOCS|QUERY_FOR_CONFIG|\ | | (QUERY_FOR_LIST|QUERY_FOR_STATE|QUERY_FOR_DOCS|QUERY_FOR_CONFIG|\ | |
| QUERY_FOR_DUMPFILES) | | QUERY_FOR_DUMPFILES) | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Bit(s) from common command line options. | | * Bit(s) from common command line options. | |
| */ | | */ | |
| extern rpmQueryFlags rpmcliQueryFlags; | | extern rpmQueryFlags rpmcliQueryFlags; | |
| | | | |
| | | | |
| skipping to change at line 178 | | skipping to change at line 172 | |
| typedef int (*QSpecF_t) (rpmts ts, QVA_t qva, const char * arg); | | typedef int (*QSpecF_t) (rpmts ts, QVA_t qva, const char * arg); | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Describe query/verify/signature command line operation. | | * Describe query/verify/signature command line operation. | |
| */ | | */ | |
| struct rpmQVKArguments_s { | | struct rpmQVKArguments_s { | |
| rpmQVSources qva_source; /*!< Identify CLI arg type. */ | | rpmQVSources qva_source; /*!< Identify CLI arg type. */ | |
| int qva_sourceCount;/*!< Exclusive option check (>1 is error). *
/ | | int qva_sourceCount;/*!< Exclusive option check (>1 is error). *
/ | |
| rpmQueryFlags qva_flags; /*!< Bit(s) to control operation. */ | | rpmQueryFlags qva_flags; /*!< Bit(s) to control operation. */ | |
| rpmfileAttrs qva_fflags; /*!< Bit(s) to filter on attribute. */ | | rpmfileAttrs qva_fflags; /*!< Bit(s) to filter on attribute. */ | |
|
| rpmdbMatchIterator qva_mi; /*!< Match iterator on selected headers. */ | | | |
| rpmgi qva_gi; /*!< Generalized iterator on args. */ | | | |
| rpmRC qva_rc; /*!< Current return code. */ | | | |
| | | | |
| QVF_t qva_showPackage; /*!< Function to display iterator matches. *
/ | | QVF_t qva_showPackage; /*!< Function to display iterator matches. *
/ | |
| QSpecF_t qva_specQuery; /*!< Function to query spec file. */ | | QSpecF_t qva_specQuery; /*!< Function to query spec file. */ | |
|
| int qva_verbose; /*!< (unused) */ | | | |
| char * qva_queryFormat; /*!< Format for headerFormat(). */ | | char * qva_queryFormat; /*!< Format for headerFormat(). */ | |
|
| int sign; /*!< Is a passphrase needed? */ | | | |
| const char * passPhrase; /*!< Pass phrase. */ | | | |
| const char * qva_prefix; /*!< Path to top of install tree. */ | | | |
| char qva_mode; | | char qva_mode; | |
| /*!< | | /*!< | |
| - 'q' from --query, -q | | - 'q' from --query, -q | |
| - 'Q' from --querytags | | - 'Q' from --querytags | |
| - 'V' from --verify, -V | | - 'V' from --verify, -V | |
|
| - 'A' from --addsign | | | |
| - 'I' from --import | | - 'I' from --import | |
| - 'K' from --checksig, -K | | - 'K' from --checksig, -K | |
|
| - 'R' from --resign | | | |
| */ | | */ | |
|
| char qva_char; /*!< (unused) always ' ' */ | | | |
| }; | | }; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| */ | | */ | |
| extern struct rpmQVKArguments_s rpmQVKArgs; | | extern struct rpmQVKArguments_s rpmQVKArgs; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| */ | | */ | |
| extern struct poptOption rpmQVSourcePoptTable[]; | | extern struct poptOption rpmQVSourcePoptTable[]; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| */ | | */ | |
| extern struct poptOption rpmQueryPoptTable[]; | | extern struct poptOption rpmQueryPoptTable[]; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| */ | | */ | |
| extern struct poptOption rpmVerifyPoptTable[]; | | extern struct poptOption rpmVerifyPoptTable[]; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
|
| * Display query/verify information for each header in iterator. | | | |
| * | | | |
| * This routine uses: | | | |
| * - qva->qva_mi rpm database iterator | | | |
| * - qva->qva_showPackage query/verify display routine | | | |
| * | | | |
| * @param qva parsed query/verify options | | | |
| * @param ts transaction set | | | |
| * @return result of last non-zero showPackage() return | | | |
| */ | | | |
| int rpmcliShowMatches(QVA_t qva, rpmts ts); | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| * Display list of tags that can be used in --queryformat. | | * Display list of tags that can be used in --queryformat. | |
| * @param fp file handle to use for display | | * @param fp file handle to use for display | |
| */ | | */ | |
| void rpmDisplayQueryTags(FILE * fp); | | void rpmDisplayQueryTags(FILE * fp); | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
|
| * Common query/verify source interface, called once for each CLI arg. | | | |
| * | | | |
| * This routine uses: | | | |
| * - qva->qva_mi rpm database iterator | | | |
| * - qva->qva_showPackage query/verify display routine | | | |
| * | | | |
| * @param qva parsed query/verify options | | | |
| * @param ts transaction set | | | |
| * @param arg name of source to query/verify | | | |
| * @return showPackage() result, 1 if rpmdbInitIterator() is NU | | | |
| LL | | | |
| */ | | | |
| int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg); | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| * Display results of package query. | | * Display results of package query. | |
| * @todo Devise a meaningful return code. | | * @todo Devise a meaningful return code. | |
| * @param qva parsed query/verify options | | * @param qva parsed query/verify options | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param h header to use for query | | * @param h header to use for query | |
| * @return 0 always | | * @return 0 always | |
| */ | | */ | |
| int showQueryPackage(QVA_t qva, rpmts ts, Header h); | | int showQueryPackage(QVA_t qva, rpmts ts, Header h); | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| | | | |
| skipping to change at line 310 | | skipping to change at line 267 | |
| * Verify package install. | | * Verify package install. | |
| * @todo hack: RPMQV_ALL can pass char ** arglist = NULL, not char * arg. U
nion? | | * @todo hack: RPMQV_ALL can pass char ** arglist = NULL, not char * arg. U
nion? | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param qva parsed query/verify options | | * @param qva parsed query/verify options | |
| * @param argv verify argument(s) (or NULL) | | * @param argv verify argument(s) (or NULL) | |
| * @return 0 on success, else no. of failures | | * @return 0 on success, else no. of failures | |
| */ | | */ | |
| int rpmcliVerify(rpmts ts, QVA_t qva, ARGV_const_t argv); | | int rpmcliVerify(rpmts ts, QVA_t qva, ARGV_const_t argv); | |
| | | | |
| /* ==================================================================== */ | | /* ==================================================================== */ | |
|
| /** \name RPMBT */ | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| * Describe build command line request. | | | |
| */ | | | |
| struct rpmBuildArguments_s { | | | |
| rpmQueryFlags qva_flags; /*!< Bit(s) to control verification. */ | | | |
| int buildAmount; /*!< Bit(s) to control operation. */ | | | |
| char * buildRootOverride; /*!< from --buildroot */ | | | |
| char * targets; /*!< Target platform(s), comma separated. */ | | | |
| const char * passPhrase; /*!< Pass phrase. */ | | | |
| char * cookie; /*!< NULL for binary, ??? for source, rpm's | | | |
| */ | | | |
| int force; /*!< from --force */ | | | |
| int noBuild; /*!< from --nobuild */ | | | |
| int noDeps; /*!< from --nodeps */ | | | |
| int noLang; /*!< from --nolang */ | | | |
| int shortCircuit; /*!< from --short-circuit */ | | | |
| int sign; /*!< from --sign */ | | | |
| char buildMode; /*!< Build mode (one of "btBC") */ | | | |
| char buildChar; /*!< Build stage (one of "abcilps ") */ | | | |
| const char * rootdir; | | | |
| }; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| */ | | | |
| typedef struct rpmBuildArguments_s * BTA_t; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| */ | | | |
| extern struct rpmBuildArguments_s rpmBTArgs; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| */ | | | |
| extern struct poptOption rpmBuildPoptTable[]; | | | |
| | | | |
| /* ==================================================================== */ | | | |
| /** \name RPMEIU */ | | /** \name RPMEIU */ | |
| /* --- install/upgrade/erase modes */ | | /* --- install/upgrade/erase modes */ | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Bit(s) to control rpmInstall() operation. | | * Bit(s) to control rpmInstall() operation. | |
| */ | | */ | |
|
| typedef enum rpmInstallFlags_e { | | enum rpmInstallFlags_e { | |
| INSTALL_NONE = 0, | | INSTALL_NONE = 0, | |
| INSTALL_PERCENT = (1 << 0), /*!< from --percent */ | | INSTALL_PERCENT = (1 << 0), /*!< from --percent */ | |
| INSTALL_HASH = (1 << 1), /*!< from --hash */ | | INSTALL_HASH = (1 << 1), /*!< from --hash */ | |
| INSTALL_NODEPS = (1 << 2), /*!< from --nodeps */ | | INSTALL_NODEPS = (1 << 2), /*!< from --nodeps */ | |
| INSTALL_NOORDER = (1 << 3), /*!< from --noorder */ | | INSTALL_NOORDER = (1 << 3), /*!< from --noorder */ | |
| INSTALL_LABEL = (1 << 4), /*!< from --verbose (notify) */ | | INSTALL_LABEL = (1 << 4), /*!< from --verbose (notify) */ | |
| INSTALL_UPGRADE = (1 << 5), /*!< from --upgrade */ | | INSTALL_UPGRADE = (1 << 5), /*!< from --upgrade */ | |
| INSTALL_FRESHEN = (1 << 6), /*!< from --freshen */ | | INSTALL_FRESHEN = (1 << 6), /*!< from --freshen */ | |
| INSTALL_INSTALL = (1 << 7), /*!< from --install */ | | INSTALL_INSTALL = (1 << 7), /*!< from --install */ | |
| INSTALL_ERASE = (1 << 8), /*!< from --erase */ | | INSTALL_ERASE = (1 << 8), /*!< from --erase */ | |
| INSTALL_ALLMATCHES = (1 << 9) /*!< from --allmatches */ | | INSTALL_ALLMATCHES = (1 << 9) /*!< from --allmatches */ | |
|
| } rpmInstallFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmInstallFlags; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Bit(s) to control rpmErase() operation. | | * Bit(s) to control rpmErase() operation. | |
| */ | | */ | |
| #define UNINSTALL_NONE INSTALL_NONE | | #define UNINSTALL_NONE INSTALL_NONE | |
| #define UNINSTALL_NODEPS INSTALL_NODEPS | | #define UNINSTALL_NODEPS INSTALL_NODEPS | |
| #define UNINSTALL_ALLMATCHES INSTALL_ALLMATCHES | | #define UNINSTALL_ALLMATCHES INSTALL_ALLMATCHES | |
| | | | |
| extern int rpmcliPackagesTotal; | | extern int rpmcliPackagesTotal; | |
| extern int rpmcliHashesCurrent; | | extern int rpmcliHashesCurrent; | |
| | | | |
| skipping to change at line 419 | | skipping to change at line 342 | |
| char ** specFilePtr, | | char ** specFilePtr, | |
| char ** cookie); | | char ** cookie); | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Describe database command line requests. | | * Describe database command line requests. | |
| */ | | */ | |
| struct rpmInstallArguments_s { | | struct rpmInstallArguments_s { | |
| rpmtransFlags transFlags; | | rpmtransFlags transFlags; | |
| rpmprobFilterFlags probFilter; | | rpmprobFilterFlags probFilter; | |
| rpmInstallFlags installInterfaceFlags; | | rpmInstallFlags installInterfaceFlags; | |
|
| rpmQueryFlags qva_flags; /*!< from --nodigest/--nosignature */ | | | |
| int numRelocations; | | int numRelocations; | |
| int noDeps; | | int noDeps; | |
| int incldocs; | | int incldocs; | |
| rpmRelocation * relocations; | | rpmRelocation * relocations; | |
| char * prefix; | | char * prefix; | |
|
| const char * rootdir; | | | |
| }; | | }; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| * Install/upgrade/freshen binary rpm package. | | * Install/upgrade/freshen binary rpm package. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param ia mode flags and parameters | | * @param ia mode flags and parameters | |
| * @param fileArgv array of package file names (NULL terminated) | | * @param fileArgv array of package file names (NULL terminated) | |
| * @return 0 on success | | * @return 0 on success | |
| * | | * | |
| * @todo fileArgv is modified on errors, should be ARGV_const
_t | | * @todo fileArgv is modified on errors, should be ARGV_const
_t | |
| | | | |
| skipping to change at line 458 | | skipping to change at line 379 | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| */ | | */ | |
| extern struct rpmInstallArguments_s rpmIArgs; | | extern struct rpmInstallArguments_s rpmIArgs; | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
| */ | | */ | |
| extern struct poptOption rpmInstallPoptTable[]; | | extern struct poptOption rpmInstallPoptTable[]; | |
| | | | |
| /* ==================================================================== */ | | /* ==================================================================== */ | |
|
| /** \name RPMDB */ | | | |
| /* --- database modes */ | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| * Describe database command line requests. | | | |
| */ | | | |
| struct rpmDatabaseArguments_s { | | | |
| int init; /*!< from --initdb */ | | | |
| int rebuild; /*!< from --rebuilddb */ | | | |
| int verify; /*!< from --verifydb */ | | | |
| }; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| */ | | | |
| extern struct rpmDatabaseArguments_s rpmDBArgs; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| */ | | | |
| extern struct poptOption rpmDatabasePoptTable[]; | | | |
| | | | |
| /* ==================================================================== */ | | | |
| /** \name RPMK */ | | /** \name RPMK */ | |
| | | | |
|
| /** \ingroup rpmcli | | /** Import public key(s) to rpm keyring | |
| * Bit(s) to control rpmReSign() operation. | | * @param ts transaction set | |
| */ | | * @param argv array of pubkey path arguments (NULL terminated) | |
| typedef enum rpmSignFlags_e { | | * @return 0 on success | |
| RPMSIGN_NONE = 0, | | | |
| RPMSIGN_CHK_SIGNATURE = 'K', /*!< from --checksig */ | | | |
| RPMSIGN_NEW_SIGNATURE = 'R', /*!< from --resign */ | | | |
| RPMSIGN_ADD_SIGNATURE = 'A', /*!< from --addsign */ | | | |
| RPMSIGN_DEL_SIGNATURE = 'D', /*!< from --delsign */ | | | |
| RPMSIGN_IMPORT_PUBKEY = 'I', /*!< from --import */ | | | |
| } rpmSignFlags; | | | |
| | | | |
| /** \ingroup rpmcli | | | |
| */ | | */ | |
|
| extern struct poptOption rpmSignPoptTable[]; | | int rpmcliImportPubkeys(rpmts ts, ARGV_const_t argv); | |
| | | | |
| /** \ingroup rpmcli | | /** \ingroup rpmcli | |
|
| * Create/Modify/Check elements from signature header. | | * Verify package signatures | |
| * @param ts transaction set | | * @param ts transaction set | |
|
| * @param qva mode flags and parameters | | * @param argv array of package path arguments (NULL terminated) | |
| * @param argv array of arguments (NULL terminated) | | | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
|
| int rpmcliSign(rpmts ts, QVA_t qva, ARGV_const_t argv); | | int rpmcliVerifySignatures(rpmts ts, ARGV_const_t argv); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMCLI */ | | #endif /* H_RPMCLI */ | |
| | | | |
End of changes. 27 change blocks. |
| 135 lines changed or deleted | | 23 lines changed or added | |
|
| rpmdb.h | | rpmdb.h | |
| #ifndef H_RPMDB | | #ifndef H_RPMDB | |
| #define H_RPMDB | | #define H_RPMDB | |
| | | | |
|
| /** \ingroup rpmdb dbi db1 db3 | | /** \ingroup rpmdb dbi | |
| * \file lib/rpmdb.h | | * \file lib/rpmdb.h | |
| * Access RPM indices using Berkeley DB interface(s). | | * Access RPM indices using Berkeley DB interface(s). | |
| */ | | */ | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/rpmsw.h> | | #include <rpm/rpmsw.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| extern int _rpmdb_debug; | | | |
| | | | |
| /** | | /** | |
| * Tag value pattern match mode. | | * Tag value pattern match mode. | |
| */ | | */ | |
| typedef enum rpmMireMode_e { | | typedef enum rpmMireMode_e { | |
| RPMMIRE_DEFAULT = 0, /*!< regex with \., .* and ^...$ added */ | | RPMMIRE_DEFAULT = 0, /*!< regex with \., .* and ^...$ added */ | |
| RPMMIRE_STRCMP = 1, /*!< strings using strcmp(3) */ | | RPMMIRE_STRCMP = 1, /*!< strings using strcmp(3) */ | |
| RPMMIRE_REGEX = 2, /*!< regex(7) patterns through regcomp(3) */ | | RPMMIRE_REGEX = 2, /*!< regex(7) patterns through regcomp(3) */ | |
| RPMMIRE_GLOB = 3 /*!< glob(7) patterns through fnmatch(3) */ | | RPMMIRE_GLOB = 3 /*!< glob(7) patterns through fnmatch(3) */ | |
| } rpmMireMode; | | } rpmMireMode; | |
| | | | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 42 | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| * Retrieve operation timestamp from rpm database. | | * Retrieve operation timestamp from rpm database. | |
| * @param db rpm database | | * @param db rpm database | |
| * @param opx operation timestamp index | | * @param opx operation timestamp index | |
| * @return pointer to operation timestamp. | | * @return pointer to operation timestamp. | |
| */ | | */ | |
| rpmop rpmdbOp(rpmdb db, rpmdbOpX opx); | | rpmop rpmdbOp(rpmdb db, rpmdbOpX opx); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
|
| * Set chrootDone flag, i.e. has chroot(2) been performed? | | | |
| * @param db rpm database | | | |
| * @param chrootDone new chrootDone flag | | | |
| * @return previous chrootDone flag | | | |
| */ | | | |
| int rpmdbSetChrootDone(rpmdb db, int chrootDone); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Unreference a database instance. | | | |
| * @param db rpm database | | | |
| * @param msg | | | |
| * @return NULL always | | | |
| */ | | | |
| rpmdb rpmdbUnlink (rpmdb db, const char * msg); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Reference a database instance. | | | |
| * @param db rpm database | | | |
| * @param msg | | | |
| * @return new rpm database reference | | | |
| */ | | | |
| rpmdb rpmdbLink (rpmdb db, const char * msg); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Open rpm database. | | | |
| * @param prefix path to top of install tree | | | |
| * @retval dbp address of rpm database | | | |
| * @param mode open(2) flags: O_RDWR or O_RDONLY (O_CREAT also) | | | |
| * @param perms database permissions | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmdbOpen (const char * prefix, rpmdb * dbp, | | | |
| int mode, int perms); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Initialize database. | | | |
| * @param prefix path to top of install tree | | | |
| * @param perms database permissions | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmdbInit(const char * prefix, int perms); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Verify database components. | | | |
| * @param prefix path to top of install tree | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmdbVerify(const char * prefix); | | | |
| | | | |
| /** | | | |
| * Close a single database index. | | | |
| * @param db rpm database | | | |
| * @param rpmtag rpm tag | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmdbCloseDBI(rpmdb db, rpmTag rpmtag); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Close all database indices and free rpmdb. | | | |
| * @param db rpm database | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmdbClose (rpmdb db); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Sync all database indices. | | | |
| * @param db rpm database | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmdbSync (rpmdb db); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Open all database indices. | | * Open all database indices. | |
| * @param db rpm database | | * @param db rpm database | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmdbOpenAll (rpmdb db); | | int rpmdbOpenAll (rpmdb db); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| * Return number of instances of package in rpm database. | | * Return number of instances of package in rpm database. | |
| * @param db rpm database | | * @param db rpm database | |
| * @param name rpm package name | | * @param name rpm package name | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 85 | |
| * Append items to set of package instances to iterate. | | * Append items to set of package instances to iterate. | |
| * @param mi rpm database iterator | | * @param mi rpm database iterator | |
| * @param hdrNums array of package instances | | * @param hdrNums array of package instances | |
| * @param nHdrNums number of elements in array | | * @param nHdrNums number of elements in array | |
| * @return 0 on success, 1 on failure (bad args) | | * @return 0 on success, 1 on failure (bad args) | |
| */ | | */ | |
| int rpmdbAppendIterator(rpmdbMatchIterator mi, | | int rpmdbAppendIterator(rpmdbMatchIterator mi, | |
| const int * hdrNums, int nHdrNums); | | const int * hdrNums, int nHdrNums); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
|
| * Remove items from set of package instances to iterate. | | | |
| * @note Sorted hdrNums are always passed in rpmlib. | | | |
| * @param mi rpm database iterator | | | |
| * @param hdrNums array of package instances | | | |
| * @param nHdrNums number of elements in array | | | |
| * @param sorted is the array sorted? (array will be sorted on return | | | |
| ) | | | |
| * @return 0 on success, 1 on failure (bad args) | | | |
| */ | | | |
| int rpmdbPruneIterator(rpmdbMatchIterator mi, | | | |
| int * hdrNums, int nHdrNums, int sorted); | | | |
| | | | |
| /** \ingroup rpmdb | | | |
| * Add pattern to iterator selector. | | * Add pattern to iterator selector. | |
| * @param mi rpm database iterator | | * @param mi rpm database iterator | |
| * @param tag rpm tag | | * @param tag rpm tag | |
| * @param mode type of pattern match | | * @param mode type of pattern match | |
| * @param pattern pattern to match | | * @param pattern pattern to match | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
|
| int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag, | | int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag, | |
| rpmMireMode mode, const char * pattern); | | rpmMireMode mode, const char * pattern); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| * Prepare iterator for lazy writes. | | * Prepare iterator for lazy writes. | |
| * @note Must be called before rpmdbNextIterator() with CDB model database. | | * @note Must be called before rpmdbNextIterator() with CDB model database. | |
| * @param mi rpm database iterator | | * @param mi rpm database iterator | |
| * @param rewrite new value of rewrite | | * @param rewrite new value of rewrite | |
| * @return previous value | | * @return previous value | |
| */ | | */ | |
| int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite); | | int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite); | |
| | | | |
| skipping to change at line 211 | | skipping to change at line 125 | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param (*hdrchk) headerCheck() vector | | * @param (*hdrchk) headerCheck() vector | |
| * @return 0 always | | * @return 0 always | |
| */ | | */ | |
| int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts, | | int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts, | |
| rpmRC (*hdrchk) (rpmts ts, const void * uh, size_t uc, char ** msg))
; | | rpmRC (*hdrchk) (rpmts ts, const void * uh, size_t uc, char ** msg))
; | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| * Return database iterator. | | * Return database iterator. | |
| * @param db rpm database | | * @param db rpm database | |
|
| * @param rpmtag rpm tag | | * @param rpmtag database index tag | |
| * @param keyp key data (NULL for sequential access) | | * @param keyp key data (NULL for sequential access) | |
| * @param keylen key data length (0 will use strlen(keyp)) | | * @param keylen key data length (0 will use strlen(keyp)) | |
| * @return NULL on failure | | * @return NULL on failure | |
| */ | | */ | |
|
| rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmTag rpmtag, | | rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag, | |
| const void * keyp, size_t keylen); | | const void * keyp, size_t keylen); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| * Return next package header from iteration. | | * Return next package header from iteration. | |
| * @param mi rpm database iterator | | * @param mi rpm database iterator | |
| * @return NULL on end of iteration. | | * @return NULL on end of iteration. | |
| */ | | */ | |
| Header rpmdbNextIterator(rpmdbMatchIterator mi); | | Header rpmdbNextIterator(rpmdbMatchIterator mi); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| | | | |
| skipping to change at line 249 | | skipping to change at line 163 | |
| int rpmdbCheckTerminate(int terminate); | | int rpmdbCheckTerminate(int terminate); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
| * Destroy rpm database iterator. | | * Destroy rpm database iterator. | |
| * @param mi rpm database iterator | | * @param mi rpm database iterator | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); | | rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
|
| * Add package header to rpm database and indices. | | * Get an iterator for an index | |
| * @param db rpm database | | * @param db rpm database | |
|
| * @param iid install transaction id (iid = 0 or -1 to skip) | | * @param rpmtag the index to iterate over | |
| * @param h header | | * @return the index iterator | |
| * @param ts (unused) transaction set (or NULL) | | | |
| * @param (*hdrchk) (unused) headerCheck() vector (or NULL) | | | |
| * @return 0 on success | | | |
| */ | | */ | |
|
| int rpmdbAdd(rpmdb db, int iid, Header h, rpmts ts, | | rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag); | |
| rpmRC (*hdrchk) (rpmts ts, const void *uh, size_t uc, char ** m | | | |
| sg)); | | | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
|
| * Remove package header from rpm database and indices. | | * Get the next key - Warning! Keys are not zero terminated! | |
| * @param db rpm database | | * Binary tags may even contain zero bytes | |
| * @param rid (unused) remove transaction id (rid = 0 or -1 to ski | | * @param ii index iterator | |
| p) | | * @param key adress to save the pointer to the key | |
| * @param hdrNum package instance number in database | | * @param keylen adress to save the length of the key to | |
| * @param ts (unused) transaction set (or NULL) | | * @return 0 on success; != 0 on error or end of index | |
| * @param (*hdrchk) (unused) headerCheck() vector (or NULL) | | | |
| * @return 0 on success | | | |
| */ | | */ | |
|
| int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, | | int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void ** key, size_t | |
| rpmts ts, | | * keylen); | |
| rpmRC (*hdrchk) (rpmts ts, const void *uh, size_t uc, char * | | | |
| * msg)); | | | |
| | | | |
| /** \ingroup rpmdb | | /** \ingroup rpmdb | |
|
| * Rebuild database indices from package headers. | | * Get number of entries for current key | |
| * @param prefix path to top of install tree | | * @param ii index iterator | |
| * @param ts transaction set (or NULL) | | * @return number of entries. 0 on error. | |
| * @param (*hdrchk) headerCheck() vector (or NULL) | | | |
| * @return 0 on success | | | |
| */ | | */ | |
|
| int rpmdbRebuild(const char * prefix, rpmts ts, | | unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii); | |
| rpmRC (*hdrchk) (rpmts ts, const void *uh, size_t uc, char * | | | |
| * msg)); | | /** \ingroup rpmdb | |
| | | * Get package offset of entry | |
| | | * @param ii index iterator | |
| | | * @param nr number of the entry | |
| | | * @return db offset of pkg | |
| | | */ | |
| | | unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned in | |
| | | t nr); | |
| | | | |
| | | /** \ingroup rpmdb | |
| | | * Get tag number of entry | |
| | | * @param ii index iterator | |
| | | * @param nr number of the entry | |
| | | * @return number of tag within the package | |
| | | */ | |
| | | unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int n | |
| | | r); | |
| | | | |
| | | /** \ingroup rpmdb | |
| | | * Free index iterator | |
| | | * @param ii index iterator | |
| | | * return NULL | |
| | | */ | |
| | | rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMDB */ | | #endif /* H_RPMDB */ | |
| | | | |
End of changes. 14 change blocks. |
| 120 lines changed or deleted | | 45 lines changed or added | |
|
| rpmds.h | | rpmds.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/rpmps.h> | | #include <rpm/rpmps.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| */ | | */ | |
|
| extern int _rpmds_debug; | | | |
| | | | |
| /** | | | |
| */ | | | |
| extern int _rpmds_nopromote; | | extern int _rpmds_nopromote; | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Dependency Attributes. | | * Dependency Attributes. | |
| */ | | */ | |
|
| typedef enum rpmsenseFlags_e { | | enum rpmsenseFlags_e { | |
| RPMSENSE_ANY = 0, | | RPMSENSE_ANY = 0, | |
| RPMSENSE_LESS = (1 << 1), | | RPMSENSE_LESS = (1 << 1), | |
| RPMSENSE_GREATER = (1 << 2), | | RPMSENSE_GREATER = (1 << 2), | |
| RPMSENSE_EQUAL = (1 << 3), | | RPMSENSE_EQUAL = (1 << 3), | |
|
| RPMSENSE_PROVIDES = (1 << 4), /* only used internally by builds */ | | /* bit 4 unused */ | |
| RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */ | | RPMSENSE_POSTTRANS = (1 << 5), /*!< %posttrans dependency */ | |
| RPMSENSE_PREREQ = (1 << 6), /* legacy prereq dependency */ | | RPMSENSE_PREREQ = (1 << 6), /* legacy prereq dependency */ | |
| RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */ | | RPMSENSE_PRETRANS = (1 << 7), /*!< Pre-transaction dependency. */ | |
| RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet.
*/ | | RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet.
*/ | |
| RPMSENSE_SCRIPT_PRE = (1 << 9), /*!< %pre dependency. */ | | RPMSENSE_SCRIPT_PRE = (1 << 9), /*!< %pre dependency. */ | |
| RPMSENSE_SCRIPT_POST = (1 << 10), /*!< %post dependency. */ | | RPMSENSE_SCRIPT_POST = (1 << 10), /*!< %post dependency. */ | |
| RPMSENSE_SCRIPT_PREUN = (1 << 11), /*!< %preun dependency. */ | | RPMSENSE_SCRIPT_PREUN = (1 << 11), /*!< %preun dependency. */ | |
| RPMSENSE_SCRIPT_POSTUN = (1 << 12), /*!< %postun dependency. */ | | RPMSENSE_SCRIPT_POSTUN = (1 << 12), /*!< %postun dependency. */ | |
| RPMSENSE_SCRIPT_VERIFY = (1 << 13), /*!< %verify dependency. */ | | RPMSENSE_SCRIPT_VERIFY = (1 << 13), /*!< %verify dependency. */ | |
| RPMSENSE_FIND_REQUIRES = (1 << 14), /*!< find-requires generated depend
ency. */ | | RPMSENSE_FIND_REQUIRES = (1 << 14), /*!< find-requires generated depend
ency. */ | |
| RPMSENSE_FIND_PROVIDES = (1 << 15), /*!< find-provides generated depend
ency. */ | | RPMSENSE_FIND_PROVIDES = (1 << 15), /*!< find-provides generated depend
ency. */ | |
| | | | |
| RPMSENSE_TRIGGERIN = (1 << 16), /*!< %triggerin dependency. */ | | RPMSENSE_TRIGGERIN = (1 << 16), /*!< %triggerin dependency. */ | |
| RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */ | | RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */ | |
| RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependen
cy. */ | | RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependen
cy. */ | |
| RPMSENSE_MISSINGOK = (1 << 19), /*!< suggests/enhances hint. */ | | RPMSENSE_MISSINGOK = (1 << 19), /*!< suggests/enhances hint. */ | |
|
| RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */ | | /* bits 20-23 unused */ | |
| 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), /*!< rpmlib(feature) dependency. */ | | RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ | |
| RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ | | RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ | |
| RPMSENSE_KEYRING = (1 << 26), | | RPMSENSE_KEYRING = (1 << 26), | |
|
| RPMSENSE_PATCHES = (1 << 27), | | /* bit 27 unused */ | |
| RPMSENSE_CONFIG = (1 << 28) | | RPMSENSE_CONFIG = (1 << 28) | |
|
| } rpmsenseFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmsenseFlags; | |
| | | | |
| #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie s
erial, */ | | #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie s
erial, */ | |
| /* less, greater, equal.
*/ | | /* less, greater, equal.
*/ | |
| | | | |
| #define RPMSENSE_TRIGGER \ | | #define RPMSENSE_TRIGGER \ | |
| (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | R
PMSENSE_TRIGGERPOSTUN) | | (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | R
PMSENSE_TRIGGERPOSTUN) | |
| | | | |
| #define _ALL_REQUIRES_MASK (\ | | #define _ALL_REQUIRES_MASK (\ | |
| RPMSENSE_INTERP | \ | | RPMSENSE_INTERP | \ | |
| RPMSENSE_SCRIPT_PRE | \ | | RPMSENSE_SCRIPT_PRE | \ | |
| RPMSENSE_SCRIPT_POST | \ | | RPMSENSE_SCRIPT_POST | \ | |
| RPMSENSE_SCRIPT_PREUN | \ | | RPMSENSE_SCRIPT_PREUN | \ | |
| RPMSENSE_SCRIPT_POSTUN | \ | | RPMSENSE_SCRIPT_POSTUN | \ | |
| RPMSENSE_SCRIPT_VERIFY | \ | | RPMSENSE_SCRIPT_VERIFY | \ | |
| RPMSENSE_FIND_REQUIRES | \ | | RPMSENSE_FIND_REQUIRES | \ | |
|
| RPMSENSE_SCRIPT_PREP | \ | | | |
| RPMSENSE_SCRIPT_BUILD | \ | | | |
| RPMSENSE_SCRIPT_INSTALL | \ | | | |
| RPMSENSE_SCRIPT_CLEAN | \ | | | |
| RPMSENSE_RPMLIB | \ | | RPMSENSE_RPMLIB | \ | |
| RPMSENSE_KEYRING | \ | | RPMSENSE_KEYRING | \ | |
|
| | | RPMSENSE_PRETRANS | \ | |
| | | RPMSENSE_POSTTRANS | \ | |
| RPMSENSE_PREREQ) | | RPMSENSE_PREREQ) | |
| | | | |
| #define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) | | #define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) | |
| #define _INSTALL_ONLY_MASK \ | | #define _INSTALL_ONLY_MASK \ | |
|
| _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSEN
SE_KEYRING) | | _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSEN
SE_KEYRING|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS) | |
| #define _ERASE_ONLY_MASK \ | | #define _ERASE_ONLY_MASK \ | |
| _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) | | _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) | |
| | | | |
| #define isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE
_PREREQ) | | #define isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE
_PREREQ) | |
| #define isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK) | | #define isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK) | |
| #define isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK) | | #define isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK) | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
|
| * Unreference a dependency set instance. | | | |
| * @param ds dependency set | | | |
| * @param msg | | | |
| * @return NULL always | | | |
| */ | | | |
| rpmds rpmdsUnlink (rpmds ds, const char * msg); | | | |
| /** \ingroup rpmds | | | |
| * Reference a dependency set instance. | | * Reference a dependency set instance. | |
| * @param ds dependency set | | * @param ds dependency set | |
|
| * @param msg | | | |
| * @return new dependency set reference | | * @return new dependency set reference | |
| */ | | */ | |
|
| rpmds rpmdsLink (rpmds ds, const char * msg); | | rpmds rpmdsLink(rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Destroy a dependency set. | | * Destroy a dependency set. | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| rpmds rpmdsFree(rpmds ds); | | rpmds rpmdsFree(rpmds ds); | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Create and load a dependency set. | | * Create and load a dependency set. | |
| * @param h header | | * @param h header | |
| * @param tagN type of dependency | | * @param tagN type of dependency | |
| * @param flags unused | | * @param flags unused | |
| * @return new dependency set | | * @return new dependency set | |
| */ | | */ | |
|
| rpmds rpmdsNew(Header h, rpmTag tagN, int flags); | | rpmds rpmdsNew(Header h, rpmTagVal tagN, int flags); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return new formatted dependency string. | | * Return new formatted dependency string. | |
| * @param dspfx formatted dependency string prefix | | * @param dspfx formatted dependency string prefix | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @return new formatted dependency (malloc'ed) | | * @return new formatted dependency (malloc'ed) | |
| */ | | */ | |
| char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds); | | char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Create, load and initialize a dependency for this header. | | * Create, load and initialize a dependency for this header. | |
| * @param h header | | * @param h header | |
| * @param tagN type of dependency | | * @param tagN type of dependency | |
| * @param Flags comparison flags | | * @param Flags comparison flags | |
| * @return new dependency set | | * @return new dependency set | |
| */ | | */ | |
|
| rpmds rpmdsThis(Header h, rpmTag tagN, rpmsenseFlags Flags); | | rpmds rpmdsThis(Header h, rpmTagVal tagN, rpmsenseFlags Flags); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Create, load and initialize a dependency set of size 1. | | * Create, load and initialize a dependency set of size 1. | |
| * @param tagN type of dependency | | * @param tagN type of dependency | |
| * @param N name | | * @param N name | |
| * @param EVR epoch:version-release | | * @param EVR epoch:version-release | |
| * @param Flags comparison flags | | * @param Flags comparison flags | |
| * @return new dependency set | | * @return new dependency set | |
| */ | | */ | |
|
| rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, rpmsenseFl | | rpmds rpmdsSingle(rpmTagVal tagN, const char * N, const char * EVR, rpmsens | |
| ags Flags); | | eFlags Flags); | |
| | | | |
| | | /** \ingroup rpmds | |
| | | * Return a new dependency set of size 1 from the current iteration index | |
| | | * @param ds dependency set | |
| | | * @return new dependency set | |
| | | */ | |
| | | rpmds rpmdsCurrent(rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return dependency set count. | | * Return dependency set count. | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @return current count | | * @return current count | |
| */ | | */ | |
| int rpmdsCount(const rpmds ds); | | int rpmdsCount(const rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return dependency set index. | | * Return dependency set index. | |
| | | | |
| skipping to change at line 206 | | skipping to change at line 198 | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @return current dependency flags, 0 on invalid | | * @return current dependency flags, 0 on invalid | |
| */ | | */ | |
| rpmsenseFlags rpmdsFlags(const rpmds ds); | | rpmsenseFlags rpmdsFlags(const rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return current dependency type. | | * Return current dependency type. | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @return current dependency type, 0 on invalid | | * @return current dependency type, 0 on invalid | |
| */ | | */ | |
|
| rpmTag rpmdsTagN(const rpmds ds); | | rpmTagVal rpmdsTagN(const rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | | |
| * Return dependency build time. | | | |
| * @param ds dependency set | | | |
| * @return dependency build time, 0 on invalid | | | |
| */ | | | |
| time_t rpmdsBT(const rpmds ds); | | | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
|
| * Set dependency build time. | | * Return dependency header instance, ie whether the dependency comes from | |
| | | * an installed header or not. | |
| * @param ds dependency set | | * @param ds dependency set | |
|
| * @param BT build time | | * @return header instance of dependency (0 for not installed) | |
| * @return dependency build time, 0 on invalid | | | |
| */ | | */ | |
|
| time_t rpmdsSetBT(const rpmds ds, time_t BT); | | unsigned int rpmdsInstance(rpmds ds); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return current "Don't promote Epoch:" flag. | | * Return current "Don't promote Epoch:" flag. | |
| * | | * | |
| * This flag controls for Epoch: promotion when a dependency set is | | * This flag controls for Epoch: promotion when a dependency set is | |
| * compared. If the flag is set (for already installed packages), then | | * compared. If the flag is set (for already installed packages), then | |
| * an unspecified value will be treated as Epoch: 0. Otherwise (for added | | * an unspecified value will be treated as Epoch: 0. Otherwise (for added | |
| * packages), the Epoch: portion of the comparison is skipped if the value | | * packages), the Epoch: portion of the comparison is skipped if the value | |
| * is not specified, i.e. an unspecified Epoch: is assumed to be equal | | * is not specified, i.e. an unspecified Epoch: is assumed to be equal | |
| * in dependency comparisons. | | * in dependency comparisons. | |
| | | | |
| skipping to change at line 262 | | skipping to change at line 247 | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return current dependency color. | | * Return current dependency color. | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @param color new dependency color | | * @param color new dependency color | |
| * @return previous dependency color | | * @return previous dependency color | |
| */ | | */ | |
| rpm_color_t rpmdsSetColor(const rpmds ds, rpm_color_t color); | | rpm_color_t rpmdsSetColor(const rpmds ds, rpm_color_t color); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
|
| * Return current dependency file refs. | | | |
| * @param ds dependency set | | | |
| * @return current dependency file refs, -1 on global | | | |
| */ | | | |
| int32_t rpmdsRefs(const rpmds ds); | | | |
| | | | |
| /** \ingroup rpmds | | | |
| * Return current dependency color. | | | |
| * @param ds dependency set | | | |
| * @param refs new dependency refs | | | |
| * @return previous dependency refs | | | |
| */ | | | |
| int32_t rpmdsSetRefs(const rpmds ds, int32_t refs); | | | |
| | | | |
| /** \ingroup rpmds | | | |
| * Notify of results of dependency match. | | * Notify of results of dependency match. | |
| * @param ds dependency set | | * @param ds dependency set | |
| * @param where where dependency was resolved (or NULL) | | * @param where where dependency was resolved (or NULL) | |
| * @param rc 0 == YES, otherwise NO | | * @param rc 0 == YES, otherwise NO | |
| */ | | */ | |
| /* FIX: rpmMessage annotation is a lie */ | | /* FIX: rpmMessage annotation is a lie */ | |
| void rpmdsNotify(rpmds ds, const char * where, int rc); | | void rpmdsNotify(rpmds ds, const char * where, int rc); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Return next dependency set iterator index. | | * Return next dependency set iterator index. | |
| | | | |
| skipping to change at line 334 | | skipping to change at line 304 | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Compare two versioned dependency ranges, looking for overlap. | | * Compare two versioned dependency ranges, looking for overlap. | |
| * @param A 1st dependency | | * @param A 1st dependency | |
| * @param B 2nd dependency | | * @param B 2nd dependency | |
| * @return 1 if dependencies overlap, 0 otherwise | | * @return 1 if dependencies overlap, 0 otherwise | |
| */ | | */ | |
| int rpmdsCompare(const rpmds A, const rpmds B); | | int rpmdsCompare(const rpmds A, const rpmds B); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
|
| * Report a Requires: or Conflicts: dependency problem. | | | |
| * @param ps transaction set problems | | | |
| * @param pkgNEVR package name/epoch/version/release | | | |
| * @param ds dependency set | | | |
| * @param suggestedKeys filename or python object address | | | |
| * @param adding dependency problem is from added package set? | | | |
| */ | | | |
| void rpmdsProblem(rpmps ps, const char * pkgNEVR, const rpmds ds, | | | |
| const fnpyKey * suggestedKeys, | | | |
| int adding); | | | |
| | | | |
| /** \ingroup rpmds | | | |
| * Compare package provides dependencies from header with a single dependen
cy. | | * Compare package provides dependencies from header with a single dependen
cy. | |
| * @param h header | | * @param h header | |
| * @param req dependency set | | * @param req dependency set | |
| * @param nopromote Don't promote Epoch: in comparison? | | * @param nopromote Don't promote Epoch: in comparison? | |
| * @return 1 if any dependency overlaps, 0 otherwise | | * @return 1 if any dependency overlaps, 0 otherwise | |
| */ | | */ | |
| int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote); | | int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote); | |
| | | | |
| /** \ingroup rpmds | | /** \ingroup rpmds | |
| * Compare package name-version-release from header with a single dependenc
y. | | * Compare package name-version-release from header with a single dependenc
y. | |
| | | | |
| skipping to change at line 369 | | skipping to change at line 327 | |
| * @return 1 if dependency overlaps, 0 otherwise | | * @return 1 if dependency overlaps, 0 otherwise | |
| */ | | */ | |
| int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote); | | int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote); | |
| | | | |
| /** | | /** | |
| * Load rpmlib provides into a dependency set. | | * Load rpmlib provides into a dependency set. | |
| * @retval *dsp (loaded) depedency set | | * @retval *dsp (loaded) depedency set | |
| * @param tblp rpmlib provides table (NULL uses internal table) | | * @param tblp rpmlib provides table (NULL uses internal table) | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
|
| int rpmdsRpmlib(rpmds * dsp, void * tblp); | | int rpmdsRpmlib(rpmds * dsp, const void * tblp); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMDS */ | | #endif /* H_RPMDS */ | |
| | | | |
End of changes. 22 change blocks. |
| 73 lines changed or deleted | | 31 lines changed or added | |
|
| rpmfc.h | | rpmfc.h | |
| #ifndef _H_RPMFC_ | | #ifndef _H_RPMFC_ | |
| #define _H_RPMFC_ | | #define _H_RPMFC_ | |
| | | | |
| /** \ingroup rpmfc rpmbuild | | /** \ingroup rpmfc rpmbuild | |
| * \file build/rpmfc.h | | * \file build/rpmfc.h | |
| * Structures and methods for build-time file classification. | | * Structures and methods for build-time file classification. | |
| */ | | */ | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/argv.h> /* for ARGV_t */ | | #include <rpm/argv.h> /* for ARGV_t */ | |
|
| #include <rpm/rpmstring.h> /* for StringBuf */ | | | |
| #include <rpm/rpmspec.h> /* for Package */ | | #include <rpm/rpmspec.h> /* for Package */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| extern int _rpmfc_debug; | | extern int _rpmfc_debug; | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| */ | | */ | |
| | | | |
| skipping to change at line 34 | | skipping to change at line 33 | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| */ | | */ | |
| enum FCOLOR_e { | | enum FCOLOR_e { | |
| RPMFC_BLACK = 0, | | RPMFC_BLACK = 0, | |
| RPMFC_ELF32 = (1 << 0), | | RPMFC_ELF32 = (1 << 0), | |
| RPMFC_ELF64 = (1 << 1), | | RPMFC_ELF64 = (1 << 1), | |
| RPMFC_ELFMIPSN32 = (1 << 2), | | RPMFC_ELFMIPSN32 = (1 << 2), | |
| #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) | | #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) | |
| /* (1 << 3) leaks into package headers, reserved */ | | /* (1 << 3) leaks into package headers, reserved */ | |
| | | | |
|
| /* bits 4-6 unused */ | | | |
| RPMFC_OCAML = (1 << 7), | | | |
| RPMFC_PKGCONFIG = (1 << 8), | | | |
| RPMFC_LIBTOOL = (1 << 9), | | | |
| RPMFC_BOURNE = (1 << 10), | | | |
| RPMFC_MONO = (1 << 11), | | | |
| | | | |
| RPMFC_SCRIPT = (1 << 12), | | | |
| RPMFC_STATIC = (1 << 13), | | | |
| RPMFC_NOTSTRIPPED = (1 << 14), | | | |
| /* bit 15 unused */ | | | |
| | | | |
| /* bits 16-19 are enumerated, not bits */ | | | |
| RPMFC_DIRECTORY = (1 << 16), | | | |
| RPMFC_SYMLINK = (2 << 16), | | | |
| RPMFC_DEVICE = (3 << 16), | | | |
| RPMFC_LIBRARY = (4 << 16), | | | |
| RPMFC_FONT = (5 << 16), | | | |
| RPMFC_IMAGE = (6 << 16), | | | |
| RPMFC_MANPAGE = (7 << 16), | | | |
| RPMFC_TEXT = (8 << 16), | | | |
| RPMFC_DOCUMENT = (9 << 16), | | | |
| | | | |
| RPMFC_ARCHIVE = (1 << 20), | | | |
| RPMFC_COMPRESSED = (1 << 21), | | | |
| RPMFC_MODULE = (1 << 22), | | | |
| RPMFC_EXECUTABLE = (1 << 23), | | | |
| | | | |
| RPMFC_PERL = (1 << 24), | | | |
| RPMFC_JAVA = (1 << 25), | | | |
| RPMFC_PYTHON = (1 << 26), | | | |
| RPMFC_PHP = (1 << 27), | | | |
| RPMFC_TCL = (1 << 28), | | | |
| | | | |
| RPMFC_WHITE = (1 << 29), | | RPMFC_WHITE = (1 << 29), | |
| RPMFC_INCLUDE = (1 << 30), | | RPMFC_INCLUDE = (1 << 30), | |
| RPMFC_ERROR = (1 << 31) | | RPMFC_ERROR = (1 << 31) | |
| }; | | }; | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| */ | | */ | |
|
| typedef enum FCOLOR_e FCOLOR_t; | | typedef rpmFlags FCOLOR_t; | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| */ | | */ | |
| typedef const struct rpmfcTokens_s * rpmfcToken; | | typedef const struct rpmfcTokens_s * rpmfcToken; | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
|
| * Return helper output. | | | |
| * @param av helper argv (with possible macros) | | | |
| * @param sb_stdin helper input | | | |
| * @retval *sb_stdoutp helper output | | | |
| * @param failnonzero IS non-zero helper exit status a failure? | | | |
| */ | | | |
| int rpmfcExec(ARGV_const_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp, | | | |
| int failnonzero); | | | |
| | | | |
| /** \ingroup rpmfc | | | |
| * Return file color given file(1) string. | | | |
| * @param fmstr file(1) string | | | |
| * @return file color | | | |
| */ | | | |
| int rpmfcColoring(const char * fmstr); | | | |
| | | | |
| /** \ingroup rpmfc | | | |
| * Print results of file classification. | | * Print results of file classification. | |
| * @todo Remove debugging routine. | | * @todo Remove debugging routine. | |
| * @param msg message prefix (NULL for none) | | * @param msg message prefix (NULL for none) | |
| * @param fc file classifier | | * @param fc file classifier | |
| * @param fp output file handle (NULL for stderr) | | * @param fp output file handle (NULL for stderr) | |
| */ | | */ | |
| void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp); | | void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp); | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| * Destroy a file classifier. | | * Destroy a file classifier. | |
| * @param fc file classifier | | * @param fc file classifier | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| rpmfc rpmfcFree(rpmfc fc); | | rpmfc rpmfcFree(rpmfc fc); | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| * Create a file classifier. | | * Create a file classifier. | |
|
| | | * @param rootDir (build) root directory | |
| | | * @param flags (unused) | |
| | | * @return new file classifier | |
| | | */ | |
| | | rpmfc rpmfcCreate(const char *rootDir, rpmFlags flags); | |
| | | | |
| | | /** \ingroup rpmfc | |
| | | * @deprecated | |
| | | * Create a file classifier. | |
| * @return new file classifier | | * @return new file classifier | |
| */ | | */ | |
|
| | | RPM_GNUC_DEPRECATED | |
| rpmfc rpmfcNew(void); | | rpmfc rpmfcNew(void); | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| * Build file class dictionary and mappings. | | * Build file class dictionary and mappings. | |
| * @param fc file classifier | | * @param fc file classifier | |
| * @param argv files to classify | | * @param argv files to classify | |
| * @param fmode files mode_t array (or NULL) | | * @param fmode files mode_t array (or NULL) | |
| * @return RPMRC_OK on success | | * @return RPMRC_OK on success | |
| */ | | */ | |
| rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode); | | rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode); | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| * Build file/package dependency dictionary and mappings. | | * Build file/package dependency dictionary and mappings. | |
| * @param fc file classifier | | * @param fc file classifier | |
| * @return RPMRC_OK on success | | * @return RPMRC_OK on success | |
| */ | | */ | |
| rpmRC rpmfcApply(rpmfc fc); | | rpmRC rpmfcApply(rpmfc fc); | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
|
| * Generate package dependencies. | | | |
| * @param spec spec file control | | | |
| * @param pkg package control | | | |
| * @return RPMRC_OK on success | | | |
| */ | | | |
| rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg); | | | |
| | | | |
| /** \ingroup rpmfc | | | |
| * Retrieve file classification provides | | * Retrieve file classification provides | |
| * @param fc file classifier | | * @param fc file classifier | |
| * @return rpmds dependency set of fc provides | | * @return rpmds dependency set of fc provides | |
| */ | | */ | |
| rpmds rpmfcProvides(rpmfc fc); | | rpmds rpmfcProvides(rpmfc fc); | |
| | | | |
| /** \ingroup rpmfc | | /** \ingroup rpmfc | |
| * Retrieve file classification requires | | * Retrieve file classification requires | |
| * @param fc file classifier | | * @param fc file classifier | |
| * @return rpmds dependency set of fc requires | | * @return rpmds dependency set of fc requires | |
| | | | |
End of changes. 7 change blocks. |
| 61 lines changed or deleted | | 11 lines changed or added | |
|
| rpmfi.h | | rpmfi.h | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| */ | | */ | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/rpmvf.h> | | #include <rpm/rpmvf.h> | |
| #include <rpm/rpmpgp.h> | | #include <rpm/rpmpgp.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| extern int _rpmfi_debug; | | | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * File types. | | * File types. | |
| * These are the file types used internally by rpm. The file | | * These are the file types used internally by rpm. The file | |
| * type is determined by applying stat(2) macros like S_ISDIR to | | * type is determined by applying stat(2) macros like S_ISDIR to | |
| * the file mode tag from a header. The values are arbitrary, | | * the file mode tag from a header. The values are arbitrary, | |
| * but are identical to the linux stat(2) file types. | | * but are identical to the linux stat(2) file types. | |
| */ | | */ | |
| typedef enum rpmFileTypes_e { | | typedef enum rpmFileTypes_e { | |
| PIPE = 1, /*!< pipe/fifo */ | | PIPE = 1, /*!< pipe/fifo */ | |
| CDEV = 2, /*!< character device */ | | CDEV = 2, /*!< character device */ | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 38 | |
| BDEV = 6, /*!< block device */ | | BDEV = 6, /*!< block device */ | |
| REG = 8, /*!< regular file */ | | REG = 8, /*!< regular file */ | |
| LINK = 10, /*!< hard link */ | | LINK = 10, /*!< hard link */ | |
| SOCK = 12 /*!< socket */ | | SOCK = 12 /*!< socket */ | |
| } rpmFileTypes; | | } rpmFileTypes; | |
| | | | |
| /** | | /** | |
| * File States (when installed). | | * File States (when installed). | |
| */ | | */ | |
| typedef enum rpmfileState_e { | | typedef enum rpmfileState_e { | |
|
| | | RPMFILE_STATE_MISSING = -1, /* used for unavailable data */ | |
| RPMFILE_STATE_NORMAL = 0, | | RPMFILE_STATE_NORMAL = 0, | |
| RPMFILE_STATE_REPLACED = 1, | | RPMFILE_STATE_REPLACED = 1, | |
| RPMFILE_STATE_NOTINSTALLED = 2, | | RPMFILE_STATE_NOTINSTALLED = 2, | |
| RPMFILE_STATE_NETSHARED = 3, | | RPMFILE_STATE_NETSHARED = 3, | |
| RPMFILE_STATE_WRONGCOLOR = 4 | | RPMFILE_STATE_WRONGCOLOR = 4 | |
| } rpmfileState; | | } rpmfileState; | |
|
| #define RPMFILE_STATE_MISSING -1 /* XXX used for unavailable
data */ | | | |
| | | | |
| /** | | /** | |
| * File Attributes. | | * File Attributes. | |
| */ | | */ | |
|
| typedef enum rpmfileAttrs_e { | | enum rpmfileAttrs_e { | |
| RPMFILE_NONE = 0, | | RPMFILE_NONE = 0, | |
| RPMFILE_CONFIG = (1 << 0), /*!< from %%config */ | | RPMFILE_CONFIG = (1 << 0), /*!< from %%config */ | |
| RPMFILE_DOC = (1 << 1), /*!< from %%doc */ | | RPMFILE_DOC = (1 << 1), /*!< from %%doc */ | |
| RPMFILE_ICON = (1 << 2), /*!< from %%donotuse. */ | | RPMFILE_ICON = (1 << 2), /*!< from %%donotuse. */ | |
| RPMFILE_MISSINGOK = (1 << 3), /*!< from %%config(missingok) */ | | RPMFILE_MISSINGOK = (1 << 3), /*!< from %%config(missingok) */ | |
| RPMFILE_NOREPLACE = (1 << 4), /*!< from %%config(noreplace) */ | | RPMFILE_NOREPLACE = (1 << 4), /*!< from %%config(noreplace) */ | |
| RPMFILE_SPECFILE = (1 << 5), /*!< @todo (unnecessary) marks 1st f
ile in srpm. */ | | RPMFILE_SPECFILE = (1 << 5), /*!< @todo (unnecessary) marks 1st f
ile in srpm. */ | |
| RPMFILE_GHOST = (1 << 6), /*!< from %%ghost */ | | RPMFILE_GHOST = (1 << 6), /*!< from %%ghost */ | |
| RPMFILE_LICENSE = (1 << 7), /*!< from %%license */ | | RPMFILE_LICENSE = (1 << 7), /*!< from %%license */ | |
| RPMFILE_README = (1 << 8), /*!< from %%readme */ | | RPMFILE_README = (1 << 8), /*!< from %%readme */ | |
| RPMFILE_EXCLUDE = (1 << 9), /*!< from %%exclude, internal */ | | RPMFILE_EXCLUDE = (1 << 9), /*!< from %%exclude, internal */ | |
| RPMFILE_UNPATCHED = (1 << 10), /*!< placeholder (SuSE) */ | | RPMFILE_UNPATCHED = (1 << 10), /*!< placeholder (SuSE) */ | |
| RPMFILE_PUBKEY = (1 << 11), /*!< from %%pubkey */ | | RPMFILE_PUBKEY = (1 << 11), /*!< from %%pubkey */ | |
|
| RPMFILE_POLICY = (1 << 12) /*!< from %%policy */ | | }; | |
| } rpmfileAttrs; | | | |
| | | typedef rpmFlags rpmfileAttrs; | |
| | | | |
| #define RPMFILE_ALL ~(RPMFILE_NONE) | | #define RPMFILE_ALL ~(RPMFILE_NONE) | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * File disposition(s) during package install/erase transaction. | | * File disposition(s) during package install/erase transaction. | |
| */ | | */ | |
| typedef enum rpmFileAction_e { | | typedef enum rpmFileAction_e { | |
| FA_UNKNOWN = 0, /*!< initial action for file ... */ | | FA_UNKNOWN = 0, /*!< initial action for file ... */ | |
| FA_CREATE, /*!< ... copy in from payload. */ | | FA_CREATE, /*!< ... copy in from payload. */ | |
| FA_COPYIN, /*!< ... copy in from payload. */ | | FA_COPYIN, /*!< ... copy in from payload. */ | |
| | | | |
| skipping to change at line 100 | | skipping to change at line 99 | |
| | | | |
| /** | | /** | |
| * We pass these around as an array with a sentinel. | | * We pass these around as an array with a sentinel. | |
| */ | | */ | |
| struct rpmRelocation_s { | | struct rpmRelocation_s { | |
| char * oldPath; /*!< NULL here evals to RPMTAG_DEFAULTPREFIX, */ | | char * oldPath; /*!< NULL here evals to RPMTAG_DEFAULTPREFIX, */ | |
| char * newPath; /*!< NULL means to omit the file completely! */ | | char * newPath; /*!< NULL means to omit the file completely! */ | |
| }; | | }; | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
|
| * Unreference a file info set instance. | | | |
| * @param fi file info set | | | |
| * @param msg | | | |
| * @return NULL always | | | |
| */ | | | |
| rpmfi rpmfiUnlink (rpmfi fi, | | | |
| const char * msg); | | | |
| | | | |
| /** \ingroup rpmfi | | | |
| * Reference a file info set instance. | | * Reference a file info set instance. | |
| * @param fi file info set | | * @param fi file info set | |
|
| * @param msg | | | |
| * @return new file info set reference | | * @return new file info set reference | |
| */ | | */ | |
|
| rpmfi rpmfiLink (rpmfi fi, const char * msg); | | rpmfi rpmfiLink (rpmfi fi); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return file count from file info set. | | * Return file count from file info set. | |
| * @param fi file info set | | * @param fi file info set | |
| * @return current file count | | * @return current file count | |
| */ | | */ | |
| rpm_count_t rpmfiFC(rpmfi fi); | | rpm_count_t rpmfiFC(rpmfi fi); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return current file index from file info set. | | * Return current file index from file info set. | |
| | | | |
| skipping to change at line 214 | | skipping to change at line 203 | |
| * @param fi file info set | | * @param fi file info set | |
| * @return current file state, 0 on invalid | | * @return current file state, 0 on invalid | |
| */ | | */ | |
| rpmfileState rpmfiFState(rpmfi fi); | | rpmfileState rpmfiFState(rpmfi fi); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return digest algorithm of a file info set. | | * Return digest algorithm of a file info set. | |
| * @param fi file info set | | * @param fi file info set | |
| * @return digest algorithm of file info set, 0 on invalid | | * @return digest algorithm of file info set, 0 on invalid | |
| */ | | */ | |
|
| pgpHashAlgo rpmfiDigestAlgo(rpmfi fi); | | int rpmfiDigestAlgo(rpmfi fi); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return current file (binary) digest of file info set. | | * Return current file (binary) digest of file info set. | |
| * @param fi file info set | | * @param fi file info set | |
| * @retval algo digest hash algoritm used (pass NULL to igno
re) | | * @retval algo digest hash algoritm used (pass NULL to igno
re) | |
| * @retval diglen digest hash length (pass NULL to ignore) | | * @retval diglen digest hash length (pass NULL to ignore) | |
| * @return current file digest, NULL on invalid | | * @return current file digest, NULL on invalid | |
| */ | | */ | |
|
| const unsigned char * rpmfiFDigest(rpmfi fi, pgpHashAlgo *algo, size_t *dig
len); | | const unsigned char * rpmfiFDigest(rpmfi fi, int *algo, size_t *diglen); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return current file (hex) digest of file info set. | | * Return current file (hex) digest of file info set. | |
| * The file info set stores file digests in binary format to conserve | | * The file info set stores file digests in binary format to conserve | |
| * memory, this converts the binary data back to hex presentation used in | | * memory, this converts the binary data back to hex presentation used in | |
| * headers. | | * headers. | |
| * @param fi file info set | | * @param fi file info set | |
| * @retval algo digest hash algoritm used (pass NULL to igno
re) | | * @retval algo digest hash algoritm used (pass NULL to igno
re) | |
| * @return current file digest (malloc'ed), NULL on invalid | | * @return current file digest (malloc'ed), NULL on invalid | |
| */ | | */ | |
|
| char * rpmfiFDigestHex(rpmfi fi, pgpHashAlgo *algo); | | char * rpmfiFDigestHex(rpmfi fi, int *algo); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return current file (binary) md5 digest from file info set. | | * Return current file (binary) md5 digest from file info set. | |
| * @deprecated Use rpmfiFDigest() instead | | * @deprecated Use rpmfiFDigest() instead | |
| * @param fi file info set | | * @param fi file info set | |
| * @return current file md5 digest, NULL on invalid | | * @return current file md5 digest, NULL on invalid | |
| */ | | */ | |
| const unsigned char * rpmfiMD5(rpmfi fi) RPM_GNUC_DEPRECATED; | | const unsigned char * rpmfiMD5(rpmfi fi) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| | | | |
| skipping to change at line 383 | | skipping to change at line 372 | |
| */ | | */ | |
| rpmfi rpmfiInitD(rpmfi fi, int dx); | | rpmfi rpmfiInitD(rpmfi fi, int dx); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Destroy a file info set. | | * Destroy a file info set. | |
| * @param fi file info set | | * @param fi file info set | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| rpmfi rpmfiFree(rpmfi fi); | | rpmfi rpmfiFree(rpmfi fi); | |
| | | | |
|
| typedef enum rpmfiFlags_e { | | enum rpmfiFlags_e { | |
| RPMFI_NOHEADER = 0, | | RPMFI_NOHEADER = 0, | |
| RPMFI_KEEPHEADER = (1 << 0), | | RPMFI_KEEPHEADER = (1 << 0), | |
| RPMFI_NOFILECLASS = (1 << 1), | | RPMFI_NOFILECLASS = (1 << 1), | |
| RPMFI_NOFILEDEPS = (1 << 2), | | RPMFI_NOFILEDEPS = (1 << 2), | |
| RPMFI_NOFILELANGS = (1 << 3), | | RPMFI_NOFILELANGS = (1 << 3), | |
| RPMFI_NOFILEUSER = (1 << 4), | | RPMFI_NOFILEUSER = (1 << 4), | |
| RPMFI_NOFILEGROUP = (1 << 5), | | RPMFI_NOFILEGROUP = (1 << 5), | |
| RPMFI_NOFILEMODES = (1 << 6), | | RPMFI_NOFILEMODES = (1 << 6), | |
| RPMFI_NOFILESIZES = (1 << 7), | | RPMFI_NOFILESIZES = (1 << 7), | |
| RPMFI_NOFILECAPS = (1 << 8), | | RPMFI_NOFILECAPS = (1 << 8), | |
| | | | |
| skipping to change at line 405 | | skipping to change at line 394 | |
| RPMFI_NOFILEDIGESTS = (1 << 10), | | RPMFI_NOFILEDIGESTS = (1 << 10), | |
| RPMFI_NOFILEMTIMES = (1 << 11), | | RPMFI_NOFILEMTIMES = (1 << 11), | |
| RPMFI_NOFILERDEVS = (1 << 12), | | RPMFI_NOFILERDEVS = (1 << 12), | |
| RPMFI_NOFILEINODES = (1 << 13), | | RPMFI_NOFILEINODES = (1 << 13), | |
| RPMFI_NOFILESTATES = (1 << 14), | | RPMFI_NOFILESTATES = (1 << 14), | |
| RPMFI_NOFILECOLORS = (1 << 15), | | RPMFI_NOFILECOLORS = (1 << 15), | |
| RPMFI_NOFILEVERIFYFLAGS = (1 << 16), | | RPMFI_NOFILEVERIFYFLAGS = (1 << 16), | |
| RPMFI_NOFILEFLAGS = (1 << 17), | | RPMFI_NOFILEFLAGS = (1 << 17), | |
| RPMFI_ISBUILD = (1 << 30), /* internal */ | | RPMFI_ISBUILD = (1 << 30), /* internal */ | |
| RPMFI_ISSOURCE = (1 << 31), /* internal */ | | RPMFI_ISSOURCE = (1 << 31), /* internal */ | |
|
| } rpmfiFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmfiFlags; | |
| | | | |
| #define RPMFI_FLAGS_ERASE \ | | #define RPMFI_FLAGS_ERASE \ | |
| (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \ | | (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \ | |
| RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \ | | RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \ | |
| RPMFI_NOFILEVERIFYFLAGS) | | RPMFI_NOFILEVERIFYFLAGS) | |
| | | | |
| #define RPMFI_FLAGS_INSTALL \ | | #define RPMFI_FLAGS_INSTALL \ | |
| (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS) | | (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS) | |
| | | | |
| #define RPMFI_FLAGS_VERIFY \ | | #define RPMFI_FLAGS_VERIFY \ | |
| | | | |
| skipping to change at line 431 | | skipping to change at line 422 | |
| RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS) | | RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS) | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Create and load a file info set. | | * Create and load a file info set. | |
| * @param ts unused | | * @param ts unused | |
| * @param h header | | * @param h header | |
| * @param tagN unused | | * @param tagN unused | |
| * @param flags Flags to control what information is loaded. | | * @param flags Flags to control what information is loaded. | |
| * @return new file info set | | * @return new file info set | |
| */ | | */ | |
|
| rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, rpmfiFlags flags); | | rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return file type from mode_t. | | * Return file type from mode_t. | |
| * @param mode file mode bits (from header) | | * @param mode file mode bits (from header) | |
| * @return file type | | * @return file type | |
| */ | | */ | |
| rpmFileTypes rpmfiWhatis(rpm_mode_t mode); | | rpmFileTypes rpmfiWhatis(rpm_mode_t mode); | |
| | | | |
| /** \ingroup rpmfi | | /** \ingroup rpmfi | |
| * Return file info comparison. | | * Return file info comparison. | |
| | | | |
End of changes. 14 change blocks. |
| 23 lines changed or deleted | | 14 lines changed or added | |
|
| rpmlegacy.h | | rpmlegacy.h | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| #ifdef _RPM_4_4_COMPAT | | #ifdef _RPM_4_4_COMPAT | |
| | | | |
| /* mappings for legacy types */ | | /* mappings for legacy types */ | |
| typedef int32_t int_32 RPM_GNUC_DEPRECATED; | | typedef int32_t int_32 RPM_GNUC_DEPRECATED; | |
| typedef int16_t int_16 RPM_GNUC_DEPRECATED; | | typedef int16_t int_16 RPM_GNUC_DEPRECATED; | |
| typedef int8_t int_8 RPM_GNUC_DEPRECATED; | | typedef int8_t int_8 RPM_GNUC_DEPRECATED; | |
| typedef uint32_t uint_32 RPM_GNUC_DEPRECATED; | | typedef uint32_t uint_32 RPM_GNUC_DEPRECATED; | |
| typedef uint16_t uint_16 RPM_GNUC_DEPRECATED; | | typedef uint16_t uint_16 RPM_GNUC_DEPRECATED; | |
| typedef uint8_t uint_8 RPM_GNUC_DEPRECATED; | | typedef uint8_t uint_8 RPM_GNUC_DEPRECATED; | |
| | | | |
|
| typedef rpmTag * hTAG_t RPM_GNUC_DEPRECATED; | | typedef rpm_tag_t * hTAG_t RPM_GNUC_DEPRECATED; | |
| typedef rpmTagType * hTYP_t RPM_GNUC_DEPRECATED; | | typedef rpm_tagtype_t * hTYP_t RPM_GNUC_DEPRECATED; | |
| typedef const void * hPTR_t RPM_GNUC_DEPRECATED; | | typedef const void * hPTR_t RPM_GNUC_DEPRECATED; | |
| typedef rpm_count_t * hCNT_t RPM_GNUC_DEPRECATED; | | typedef rpm_count_t * hCNT_t RPM_GNUC_DEPRECATED; | |
| | | | |
| typedef rpmSpec Spec RPM_GNUC_DEPRECATED; | | typedef rpmSpec Spec RPM_GNUC_DEPRECATED; | |
| | | | |
| /* legacy header interfaces */ | | /* legacy header interfaces */ | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Retrieve tag value. | | * Retrieve tag value. | |
| * Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with | | * Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 48 | |
| * entry is present). | | * entry is present). | |
| * @deprecated Use headerGet() instead | | * @deprecated Use headerGet() instead | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @retval *type tag value data type (or NULL) | | * @retval *type tag value data type (or NULL) | |
| * @retval *p pointer to tag value(s) (or NULL) | | * @retval *p pointer to tag value(s) (or NULL) | |
| * @retval *c number of values (or NULL) | | * @retval *c number of values (or NULL) | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerGetEntry(Header h, rpmTag tag, | | int headerGetEntry(Header h, rpm_tag_t tag, | |
| rpmTagType * type, | | rpm_tagtype_t * type, | |
| rpm_data_t * p, | | rpm_data_t * p, | |
| rpm_count_t * c) RPM_GNUC_DEPRECATED; | | rpm_count_t * c) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Retrieve tag value using header internal array. | | * Retrieve tag value using header internal array. | |
| * Get an entry using as little extra RAM as possible to return the tag val
ue. | | * Get an entry using as little extra RAM as possible to return the tag val
ue. | |
| * This is only an issue for RPM_STRING_ARRAY_TYPE. | | * This is only an issue for RPM_STRING_ARRAY_TYPE. | |
| * @deprecated Use headerGet() instead | | * @deprecated Use headerGet() instead | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @retval *type tag value data type (or NULL) | | * @retval *type tag value data type (or NULL) | |
| * @retval *p pointer to tag value(s) (or NULL) | | * @retval *p pointer to tag value(s) (or NULL) | |
| * @retval *c number of values (or NULL) | | * @retval *c number of values (or NULL) | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerGetEntryMinMemory(Header h, rpmTag tag, | | int headerGetEntryMinMemory(Header h, rpm_tag_t tag, | |
| rpmTagType * type, | | rpm_tagtype_t * type, | |
| rpm_data_t * p, | | rpm_data_t * p, | |
| rpm_count_t * c) RPM_GNUC_DEPRECATED; | | rpm_count_t * c) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Add tag to header. | | * Add tag to header. | |
| * Duplicate tags are okay, but only defined for iteration (with the | | * Duplicate tags are okay, but only defined for iteration (with the | |
| * exceptions noted below). While you are allowed to add i18n string | | * exceptions noted below). While you are allowed to add i18n string | |
| * arrays through this function, you probably don't mean to. See | | * arrays through this function, you probably don't mean to. See | |
| * headerAddI18NString() instead. | | * headerAddI18NString() instead. | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @param type tag value data type | | * @param type tag value data type | |
| * @param p pointer to tag value(s) | | * @param p pointer to tag value(s) | |
| * @param c number of values | | * @param c number of values | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerAddEntry(Header h, rpmTag tag, rpmTagType type, | | int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, | |
| rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED; | | rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Append element to tag array in header. | | * Append element to tag array in header. | |
| * Appends item p to entry w/ tag and type as passed. Won't work on | | * Appends item p to entry w/ tag and type as passed. Won't work on | |
| * RPM_STRING_TYPE. Any pointers into header memory returned from | | * RPM_STRING_TYPE. Any pointers into header memory returned from | |
| * headerGetEntryMinMemory() for this entry are invalid after this | | * headerGetEntryMinMemory() for this entry are invalid after this | |
| * call has been made! | | * call has been made! | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @param type tag value data type | | * @param type tag value data type | |
| * @param p pointer to tag value(s) | | * @param p pointer to tag value(s) | |
| * @param c number of values | | * @param c number of values | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerAppendEntry(Header h, rpmTag tag, rpmTagType type, | | int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, | |
| rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED; | | rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Add or append element to tag array in header. | | * Add or append element to tag array in header. | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @param type tag value data type | | * @param type tag value data type | |
| * @param p pointer to tag value(s) | | * @param p pointer to tag value(s) | |
| * @param c number of values | | * @param c number of values | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type, | | int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, | |
| rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED; | | rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Modify tag in header. | | * Modify tag in header. | |
| * If there are multiple entries with this tag, the first one gets replaced
. | | * If there are multiple entries with this tag, the first one gets replaced
. | |
| * @deprecated Use headerMod() instead | | * @deprecated Use headerMod() instead | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @param type tag value data type | | * @param type tag value data type | |
| * @param p pointer to tag value(s) | | * @param p pointer to tag value(s) | |
| * @param c number of values | | * @param c number of values | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
|
| int headerModifyEntry(Header h, rpmTag tag, rpmTagType type, | | int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, | |
| rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATE
D; | | rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATE
D; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Delete tag in header. | | * Delete tag in header. | |
| * Removes all entries of type tag from the header, returns 1 if none were | | * Removes all entries of type tag from the header, returns 1 if none were | |
| * found. | | * found. | |
| * @deprecated Use headerDel() instead | | * @deprecated Use headerDel() instead | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param tag tag | | * @param tag tag | |
| * @return 0 on success, 1 on failure (INCONSISTENT) | | * @return 0 on success, 1 on failure (INCONSISTENT) | |
| */ | | */ | |
|
| int headerRemoveEntry(Header h, rpmTag tag) RPM_GNUC_DEPRECATED; | | int headerRemoveEntry(Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Return formatted output string from header tags. | | * Return formatted output string from header tags. | |
| * The returned string must be free()d. | | * The returned string must be free()d. | |
| * @deprecated Use headerFormat() instead | | * @deprecated Use headerFormat() instead | |
| * | | * | |
| * @param _h header | | * @param _h header | |
| * @param _fmt format to use | | * @param _fmt format to use | |
| * @param _tbltags array of tag name/value pairs (unused) | | * @param _tbltags array of tag name/value pairs (unused) | |
| * @param _exts chained table of formatting extensions. (unu
sed) | | * @param _exts chained table of formatting extensions. (unu
sed) | |
| | | | |
| skipping to change at line 171 | | skipping to change at line 171 | |
| * @deprecated Use headerNext() instead. | | * @deprecated Use headerNext() instead. | |
| * | | * | |
| * @param hi header tag iterator | | * @param hi header tag iterator | |
| * @retval *tag tag | | * @retval *tag tag | |
| * @retval *type tag value data type | | * @retval *type tag value data type | |
| * @retval *p pointer to tag value(s) | | * @retval *p pointer to tag value(s) | |
| * @retval *c number of values | | * @retval *c number of values | |
| * @return 1 on success, 0 on failure | | * @return 1 on success, 0 on failure | |
| */ | | */ | |
| int headerNextIterator(HeaderIterator hi, | | int headerNextIterator(HeaderIterator hi, | |
|
| rpmTag * tag, | | rpm_tag_t * tag, | |
| rpmTagType * type, | | rpm_tagtype_t * type, | |
| rpm_data_t * p, | | rpm_data_t * p, | |
| rpm_count_t * c) RPM_GNUC_DEPRECATED; | | rpm_count_t * c) RPM_GNUC_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Free data allocated when retrieved from header. | | * Free data allocated when retrieved from header. | |
| * @deprecated Use rpmtdFreeData() instead | | * @deprecated Use rpmtdFreeData() instead | |
| * | | * | |
| * @param h header | | * @param h header | |
| * @param data pointer to tag value(s) | | * @param data pointer to tag value(s) | |
| * @param type type of data (or -1 to force free) | | * @param type type of data (or -1 to force free) | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
|
| void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type) RPM_GNUC_D
EPRECATED; | | void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type) RPM_GNU
C_DEPRECATED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Free data allocated when retrieved from header. | | * Free data allocated when retrieved from header. | |
| * @deprecated Use rpmtdFreeData() instead. | | * @deprecated Use rpmtdFreeData() instead. | |
| * | | * | |
| * @param data address of data (or NULL) | | * @param data address of data (or NULL) | |
| * @param type type of data (or RPM_FORCEFREE_TYPE to force free) | | * @param type type of data (or RPM_FORCEFREE_TYPE to force free) | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
|
| void * headerFreeData(rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECATED
; | | void * headerFreeData(rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPRECA
TED; | |
| | | | |
| /** \ingroup header_legacy | | /** \ingroup header_legacy | |
| * Prototypes for headerGetEntry(), headerFreeData() etc vectors. | | * Prototypes for headerGetEntry(), headerFreeData() etc vectors. | |
| * @{ | | * @{ | |
| */ | | */ | |
|
| typedef void * (*HFD_t) (rpm_data_t data, rpmTagType type) RPM_GNUC_DEPRECA | | typedef void * (*HFD_t) (rpm_data_t data, rpm_tagtype_t type) RPM_GNUC_DEPR | |
| TED; | | ECATED; | |
| typedef int (*HGE_t) (Header h, rpmTag tag, rpmTagType * type, | | typedef int (*HGE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t * type, | |
| rpm_data_t * p, rpm_count_t * c) RPM_GNUC_DEPRECATED
; | | rpm_data_t * p, rpm_count_t * c) RPM_GNUC_DEPRECATED
; | |
|
| typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type, | | typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type, | |
| rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATE
D; | | rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATE
D; | |
|
| typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type, | | typedef int (*HME_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type, | |
| rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATE
D; | | rpm_constdata_t p, rpm_count_t c) RPM_GNUC_DEPRECATE
D; | |
|
| typedef int (*HRE_t) (Header h, rpmTag tag) RPM_GNUC_DEPRECATED; | | typedef int (*HRE_t) (Header h, rpm_tag_t tag) RPM_GNUC_DEPRECATED; | |
| /** @} */ | | /** @} */ | |
| | | | |
| /* other misc renamed / namespaced functions */ | | /* other misc renamed / namespaced functions */ | |
| /* TODO: arrange deprecation warnings on these too... */ | | /* TODO: arrange deprecation warnings on these too... */ | |
| #define isCompressed rpmFileIsCompressed | | #define isCompressed rpmFileIsCompressed | |
| #define makeTempFile rpmMkTempFile | | #define makeTempFile rpmMkTempFile | |
| #define whatis rpmfiWhatis | | #define whatis rpmfiWhatis | |
|
| #define freeFilesystems rpmFreeFilesystems | | | |
| #define tagName rpmTagGetName | | #define tagName rpmTagGetName | |
| #define tagType rpmTagGetType | | #define tagType rpmTagGetType | |
| #define tagValue rpmTagGetValue | | #define tagValue rpmTagGetValue | |
| | | | |
| #define xislower rislower | | #define xislower rislower | |
| #define xisupper risupper | | #define xisupper risupper | |
| #define xisalpha risalpha | | #define xisalpha risalpha | |
| #define xisdigit risdigit | | #define xisdigit risdigit | |
| #define xisalnum risalnum | | #define xisalnum risalnum | |
| #define xisblank risblank | | #define xisblank risblank | |
| | | | |
End of changes. 16 change blocks. |
| 22 lines changed or deleted | | 21 lines changed or added | |
|
| rpmpgp.h | | rpmpgp.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| typedef struct pgpDig_s * pgpDig; | | typedef struct pgpDig_s * pgpDig; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| */ | | */ | |
| typedef struct pgpDigParams_s * pgpDigParams; | | typedef struct pgpDigParams_s * pgpDigParams; | |
| | | | |
| typedef uint8_t pgpKeyID_t[8]; | | typedef uint8_t pgpKeyID_t[8]; | |
| typedef uint8_t pgpTime_t[4]; | | typedef uint8_t pgpTime_t[4]; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| */ | | | |
| typedef const struct pgpValTbl_s { | | | |
| int val; | | | |
| char const * const str; | | | |
| } * pgpValTbl; | | | |
| | | | |
| /** \ingroup rpmpgp | | | |
| * 4.3. Packet Tags | | * 4.3. Packet Tags | |
| * | | * | |
| * The packet tag denotes what type of packet the body holds. Note that | | * The packet tag denotes what type of packet the body holds. Note that | |
| * old format headers can only have tags less than 16, whereas new | | * old format headers can only have tags less than 16, whereas new | |
| * format headers can have tags as great as 63. | | * format headers can have tags as great as 63. | |
| */ | | */ | |
| typedef enum pgpTag_e { | | typedef enum pgpTag_e { | |
| PGPTAG_RESERVED = 0, /*!< Reserved/Invalid */ | | PGPTAG_RESERVED = 0, /*!< Reserved/Invalid */ | |
| PGPTAG_PUBLIC_SESSION_KEY = 1, /*!< Public-Key Encrypted Session Key
*/ | | PGPTAG_PUBLIC_SESSION_KEY = 1, /*!< Public-Key Encrypted Session Key
*/ | |
| PGPTAG_SIGNATURE = 2, /*!< Signature */ | | PGPTAG_SIGNATURE = 2, /*!< Signature */ | |
| | | | |
| skipping to change at line 272 | | skipping to change at line 265 | |
| typedef enum pgpHashAlgo_e { | | typedef enum pgpHashAlgo_e { | |
| PGPHASHALGO_MD5 = 1, /*!< MD5 */ | | PGPHASHALGO_MD5 = 1, /*!< MD5 */ | |
| PGPHASHALGO_SHA1 = 2, /*!< SHA1 */ | | PGPHASHALGO_SHA1 = 2, /*!< SHA1 */ | |
| PGPHASHALGO_RIPEMD160 = 3, /*!< RIPEMD160 */ | | PGPHASHALGO_RIPEMD160 = 3, /*!< RIPEMD160 */ | |
| PGPHASHALGO_MD2 = 5, /*!< MD2 */ | | PGPHASHALGO_MD2 = 5, /*!< MD2 */ | |
| PGPHASHALGO_TIGER192 = 6, /*!< TIGER192 */ | | PGPHASHALGO_TIGER192 = 6, /*!< TIGER192 */ | |
| PGPHASHALGO_HAVAL_5_160 = 7, /*!< HAVAL-5-160 */ | | PGPHASHALGO_HAVAL_5_160 = 7, /*!< HAVAL-5-160 */ | |
| PGPHASHALGO_SHA256 = 8, /*!< SHA256 */ | | PGPHASHALGO_SHA256 = 8, /*!< SHA256 */ | |
| PGPHASHALGO_SHA384 = 9, /*!< SHA384 */ | | PGPHASHALGO_SHA384 = 9, /*!< SHA384 */ | |
| PGPHASHALGO_SHA512 = 10, /*!< SHA512 */ | | PGPHASHALGO_SHA512 = 10, /*!< SHA512 */ | |
|
| | | PGPHASHALGO_SHA224 = 11, /*!< SHA224 */ | |
| } pgpHashAlgo; | | } pgpHashAlgo; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * 5.2.2. Version 3 Signature Packet Format | | * 5.2.2. Version 3 Signature Packet Format | |
| * | | * | |
| * The body of a version 3 Signature Packet contains: | | * The body of a version 3 Signature Packet contains: | |
| * - One-octet version number (3). | | * - One-octet version number (3). | |
| * - One-octet length of following hashed material. MUST be 5. | | * - One-octet length of following hashed material. MUST be 5. | |
| * - One-octet signature type. | | * - One-octet signature type. | |
| * - Four-octet creation time. | | * - Four-octet creation time. | |
| | | | |
| skipping to change at line 938 | | skipping to change at line 932 | |
| PGPVAL_PUBKEYALGO = 6, | | PGPVAL_PUBKEYALGO = 6, | |
| PGPVAL_SYMKEYALGO = 7, | | PGPVAL_SYMKEYALGO = 7, | |
| PGPVAL_COMPRESSALGO = 8, | | PGPVAL_COMPRESSALGO = 8, | |
| PGPVAL_HASHALGO = 9, | | PGPVAL_HASHALGO = 9, | |
| PGPVAL_SERVERPREFS = 10, | | PGPVAL_SERVERPREFS = 10, | |
| } pgpValType; | | } pgpValType; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Bit(s) to control digest operation. | | * Bit(s) to control digest operation. | |
| */ | | */ | |
|
| typedef enum rpmDigestFlags_e { | | enum rpmDigestFlags_e { | |
| RPMDIGEST_NONE = 0 | | RPMDIGEST_NONE = 0 | |
|
| } rpmDigestFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmDigestFlags; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Return string representation of am OpenPGP value. | | * Return string representation of am OpenPGP value. | |
| * @param type type of value | | * @param type type of value | |
| * @param val byte value to lookup | | * @param val byte value to lookup | |
| * @return string value of byte | | * @return string value of byte | |
| */ | | */ | |
| const char * pgpValString(pgpValType type, uint8_t val); | | const char * pgpValString(pgpValType type, uint8_t val); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| | | | |
| skipping to change at line 1112 | | skipping to change at line 1108 | |
| * @param octx existing digest context | | * @param octx existing digest context | |
| * @return duplicated digest context | | * @return duplicated digest context | |
| */ | | */ | |
| DIGEST_CTX rpmDigestDup(DIGEST_CTX octx); | | DIGEST_CTX rpmDigestDup(DIGEST_CTX octx); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Obtain digest length in bytes. | | * Obtain digest length in bytes. | |
| * @param hashalgo type of digest | | * @param hashalgo type of digest | |
| * @return digest length, zero on invalid algorithm | | * @return digest length, zero on invalid algorithm | |
| */ | | */ | |
|
| size_t rpmDigestLength(pgpHashAlgo hashalgo); | | size_t rpmDigestLength(int hashalgo); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Initialize digest. | | * Initialize digest. | |
| * Set bit count to 0 and buffer to mysterious initialization constants. | | * Set bit count to 0 and buffer to mysterious initialization constants. | |
| * @param hashalgo type of digest | | * @param hashalgo type of digest | |
| * @param flags bit(s) to control digest operation | | * @param flags bit(s) to control digest operation | |
| * @return digest context | | * @return digest context | |
| */ | | */ | |
|
| DIGEST_CTX rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags); | | DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Update context with next plain text buffer. | | * Update context with next plain text buffer. | |
| * @param ctx digest context | | * @param ctx digest context | |
| * @param data next data buffer | | * @param data next data buffer | |
| * @param len no. bytes of data | | * @param len no. bytes of data | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len); | | int rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len); | |
| | | | |
| | | | |
| skipping to change at line 1167 | | skipping to change at line 1163 | |
| */ | | */ | |
| rpmDigestBundle rpmDigestBundleFree(rpmDigestBundle bundle); | | rpmDigestBundle rpmDigestBundleFree(rpmDigestBundle bundle); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Add a new type of digest to a bundle. | | * Add a new type of digest to a bundle. | |
| * @param bundle digest bundle | | * @param bundle digest bundle | |
| * @param algo type of digest | | * @param algo type of digest | |
| * @param flags bit(s) to control digest operation | | * @param flags bit(s) to control digest operation | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
|
| int rpmDigestBundleAdd(rpmDigestBundle bundle, pgpHashAlgo algo, | | int rpmDigestBundleAdd(rpmDigestBundle bundle, int algo, | |
| rpmDigestFlags flags); | | rpmDigestFlags flags); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Update contexts within bundle with next plain text buffer. | | * Update contexts within bundle with next plain text buffer. | |
| * @param bundle digest bundle | | * @param bundle digest bundle | |
| * @param data next data buffer | | * @param data next data buffer | |
| * @param len no. bytes of data | | * @param len no. bytes of data | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t
len); | | int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t
len); | |
| | | | |
| skipping to change at line 1190 | | skipping to change at line 1186 | |
| * Return digest from a bundle and destroy context, see rpmDigestFinal(). | | * Return digest from a bundle and destroy context, see rpmDigestFinal(). | |
| * | | * | |
| * @param bundle digest bundle | | * @param bundle digest bundle | |
| * @param algo type of digest to return | | * @param algo type of digest to return | |
| * @retval datap address of returned digest | | * @retval datap address of returned digest | |
| * @retval lenp address of digest length | | * @retval lenp address of digest length | |
| * @param asAscii return digest as ascii string? | | * @param asAscii return digest as ascii string? | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmDigestBundleFinal(rpmDigestBundle bundle, | | int rpmDigestBundleFinal(rpmDigestBundle bundle, | |
|
| pgpHashAlgo algo, void ** datap, size_t * lenp, int asAscii); | | int algo, void ** datap, size_t * lenp, int asAscii); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Duplicate a digest context from a bundle. | | * Duplicate a digest context from a bundle. | |
| * @param bundle digest bundle | | * @param bundle digest bundle | |
| * @param algo type of digest to dup | | * @param algo type of digest to dup | |
| * @return duplicated digest context | | * @return duplicated digest context | |
| */ | | */ | |
|
| DIGEST_CTX rpmDigestBundleDupCtx(rpmDigestBundle bundle, pgpHashAlgo algo); | | DIGEST_CTX rpmDigestBundleDupCtx(rpmDigestBundle bundle, int algo); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMPGP */ | | #endif /* H_RPMPGP */ | |
| | | | |
End of changes. 9 change blocks. |
| 14 lines changed or deleted | | 10 lines changed or added | |
|
| rpmps.h | | rpmps.h | |
| #ifndef H_RPMPS | | #ifndef H_RPMPS | |
| #define H_RPMPS | | #define H_RPMPS | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
| * \file lib/rpmps.h | | * \file lib/rpmps.h | |
| * Structures and prototypes used for an "rpmps" problem set. | | * Structures and prototypes used for an "rpmps" problem set. | |
| */ | | */ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
|
| | | #include <rpm/rpmprob.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| extern int _rpmps_debug; | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * @todo Generalize filter mechanism. | | | |
| */ | | | |
| typedef enum rpmprobFilterFlags_e { | | | |
| RPMPROB_FILTER_NONE = 0, | | | |
| RPMPROB_FILTER_IGNOREOS = (1 << 0), /*!< from --ignoreos */ | | | |
| RPMPROB_FILTER_IGNOREARCH = (1 << 1), /*!< from --ignorearch */ | | | |
| RPMPROB_FILTER_REPLACEPKG = (1 << 2), /*!< from --replacepkgs */ | | | |
| RPMPROB_FILTER_FORCERELOCATE= (1 << 3), /*!< from --badreloc */ | | | |
| RPMPROB_FILTER_REPLACENEWFILES= (1 << 4), /*!< from --replacefiles */ | | | |
| RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5), /*!< from --replacefiles */ | | | |
| RPMPROB_FILTER_OLDPACKAGE = (1 << 6), /*!< from --oldpackage */ | | | |
| RPMPROB_FILTER_DISKSPACE = (1 << 7), /*!< from --ignoresize */ | | | |
| RPMPROB_FILTER_DISKNODES = (1 << 8) /*!< from --ignoresize */ | | | |
| } rpmprobFilterFlags; | | | |
| | | | |
| /** | | | |
| * Raw data for an element of a problem set. | | | |
| */ | | | |
| typedef struct rpmProblem_s * rpmProblem; | | | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
|
| * Transaction problems found while processing a transaction set/ | | * Problem set iterator | |
| */ | | */ | |
|
| typedef struct rpmps_s * rpmps; | | | |
| | | | |
| typedef struct rpmpsi_s * rpmpsi; | | typedef struct rpmpsi_s * rpmpsi; | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
|
| * Enumerate transaction set problem types. | | | |
| */ | | | |
| typedef enum rpmProblemType_e { | | | |
| RPMPROB_BADARCH, /*!< package ... is for a different architecture */ | | | |
| RPMPROB_BADOS, /*!< package ... is for a different operating system | | | |
| */ | | | |
| RPMPROB_PKG_INSTALLED, /*!< package ... is already installed */ | | | |
| RPMPROB_BADRELOCATE,/*!< path ... is not relocatable for package ... */ | | | |
| RPMPROB_REQUIRES, /*!< package ... has unsatisfied Requires: ... */ | | | |
| RPMPROB_CONFLICT, /*!< package ... has unsatisfied Conflicts: ... */ | | | |
| RPMPROB_NEW_FILE_CONFLICT, /*!< file ... conflicts between attemped ins | | | |
| talls of ... */ | | | |
| RPMPROB_FILE_CONFLICT,/*!< file ... from install of ... conflicts with | | | |
| file from package ... */ | | | |
| RPMPROB_OLDPACKAGE, /*!< package ... (which is newer than ...) i | | | |
| s already installed */ | | | |
| RPMPROB_DISKSPACE, /*!< installing package ... needs ... on the ... fil | | | |
| esystem */ | | | |
| RPMPROB_DISKNODES, /*!< installing package ... needs ... on the ... fil | | | |
| esystem */ | | | |
| } rpmProblemType; | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Create a problem item. | | | |
| * @param type type of problem | | | |
| * @param pkgNEVR package name | | | |
| * @param key filename or python object address | | | |
| * @param dn directory name | | | |
| * @param bn file base name | | | |
| * @param altNEVR related (e.g. through a dependency) package name | | | |
| * @param number generic number attribute | | | |
| * @return rpmProblem | | | |
| */ | | | |
| rpmProblem rpmProblemCreate(rpmProblemType type, | | | |
| const char * pkgNEVR, | | | |
| fnpyKey key, | | | |
| const char * dn, const char * bn, | | | |
| const char * altNEVR, | | | |
| uint64_t number); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Destroy a problem item. | | | |
| * @param prob rpm problem | | | |
| * @return rpm problem (NULL) | | | |
| */ | | | |
| rpmProblem rpmProblemFree(rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Reference an rpmProblem instance | | | |
| * @param prob rpm problem | | | |
| * @return rpm problem | | | |
| */ | | | |
| rpmProblem rpmProblemLink(rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Unreference an rpmProblem instance | | | |
| * @param prob rpm problem | | | |
| * @return rpm problem | | | |
| */ | | | |
| rpmProblem rpmProblemUnlink(rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Return package NEVR | | | |
| * @param prob rpm problem | | | |
| * @return package NEVR | | | |
| */ | | | |
| const char * rpmProblemGetPkgNEVR(const rpmProblem prob); | | | |
| /** \ingroup rpmps | | | |
| * Return related (e.g. through a dependency) package NEVR | | | |
| * @param prob rpm problem | | | |
| * @return related (e.g. through a dependency) package NEVR | | | |
| */ | | | |
| const char * rpmProblemGetAltNEVR(const rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Return type of problem (dependency, diskpace etc) | | | |
| * @param prob rpm problem | | | |
| * @return type of problem | | | |
| */ | | | |
| | | | |
| rpmProblemType rpmProblemGetType(const rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Return filename or python object address of a problem | | | |
| * @param prob rpm problem | | | |
| * @return filename or python object address | | | |
| */ | | | |
| fnpyKey rpmProblemGetKey(const rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Return a generic data string from a problem | | | |
| * @param prob rpm problem | | | |
| * @return a generic data string | | | |
| * @todo needs a better name | | | |
| */ | | | |
| const char * rpmProblemGetStr(const rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Return disk requirement (needed disk space / number of inodes) | | | |
| * depending on problem type. On problem types other than RPMPROB_DISKSPACE | | | |
| * and RPMPROB_DISKNODES return value is undefined. | | | |
| * @param prob rpm problem | | | |
| * @return disk requirement | | | |
| */ | | | |
| rpm_loff_t rpmProblemGetDiskNeed(const rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Return formatted string representation of a problem. | | | |
| * @param prob rpm problem | | | |
| * @return formatted string (malloc'd) | | | |
| */ | | | |
| char * rpmProblemString(const rpmProblem prob); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Unreference a problem set instance. | | | |
| * @param ps problem set | | | |
| * @param msg | | | |
| * @return problem set | | | |
| */ | | | |
| rpmps rpmpsUnlink (rpmps ps, | | | |
| const char * msg); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Reference a problem set instance. | | * Reference a problem set instance. | |
| * @param ps transaction set | | * @param ps transaction set | |
|
| * @param msg | | | |
| * @return new transaction set reference | | * @return new transaction set reference | |
| */ | | */ | |
|
| rpmps rpmpsLink (rpmps ps, const char * msg); | | rpmps rpmpsLink (rpmps ps); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
| * Return number of problems in set. | | * Return number of problems in set. | |
| * @param ps problem set | | * @param ps problem set | |
| * @return number of problems | | * @return number of problems | |
| */ | | */ | |
| int rpmpsNumProblems(rpmps ps); | | int rpmpsNumProblems(rpmps ps); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
| * Initialize problem set iterator. | | * Initialize problem set iterator. | |
| | | | |
| skipping to change at line 193 | | skipping to change at line 51 | |
| rpmpsi rpmpsInitIterator(rpmps ps); | | rpmpsi rpmpsInitIterator(rpmps ps); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
| * Destroy problem set iterator. | | * Destroy problem set iterator. | |
| * @param psi problem set iterator | | * @param psi problem set iterator | |
| * @return problem set iterator (NULL) | | * @return problem set iterator (NULL) | |
| */ | | */ | |
| rpmpsi rpmpsFreeIterator(rpmpsi psi); | | rpmpsi rpmpsFreeIterator(rpmpsi psi); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
|
| | | * Return next problem from iterator | |
| | | * @param psi problem set iterator | |
| | | * @return next problem (weak ref), NULL on termination | |
| | | */ | |
| | | rpmProblem rpmpsiNext(rpmpsi psi); | |
| | | | |
| | | /** \ingroup rpmps | |
| * Return next problem set iterator index | | * Return next problem set iterator index | |
| * @param psi problem set iterator | | * @param psi problem set iterator | |
| * @return iterator index, -1 on termination | | * @return iterator index, -1 on termination | |
| */ | | */ | |
| int rpmpsNextIterator(rpmpsi psi); | | int rpmpsNextIterator(rpmpsi psi); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
| * Return current problem from problem set | | * Return current problem from problem set | |
| * @param psi problem set iterator | | * @param psi problem set iterator | |
| * @return current rpmProblem | | * @return current rpmProblem | |
| | | | |
| skipping to change at line 234 | | skipping to change at line 99 | |
| void rpmpsPrint(FILE *fp, rpmps ps); | | void rpmpsPrint(FILE *fp, rpmps ps); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
| * Append a problem to current set of problems. | | * Append a problem to current set of problems. | |
| * @param ps problem set | | * @param ps problem set | |
| * @param prob rpmProblem | | * @param prob rpmProblem | |
| */ | | */ | |
| void rpmpsAppendProblem(rpmps ps, rpmProblem prob); | | void rpmpsAppendProblem(rpmps ps, rpmProblem prob); | |
| | | | |
| /** \ingroup rpmps | | /** \ingroup rpmps | |
|
| * Append a problem to current set of problems. | | * Merge problem set into another. | |
| * @param ps problem set | | * @param dest destination problem set | |
| * @param type type of problem | | * @param src source problem set | |
| * @param pkgNEVR package name | | * @return number of problems merged | |
| * @param key filename or python object address | | | |
| * @param dn directory name | | | |
| * @param bn file base name | | | |
| * @param altNEVR related (e.g. through a dependency) package name | | | |
| * @param number generic number attribute | | | |
| */ | | | |
| void rpmpsAppend(rpmps ps, rpmProblemType type, | | | |
| const char * pkgNEVR, | | | |
| fnpyKey key, | | | |
| const char * dn, const char * bn, | | | |
| const char * altNEVR, | | | |
| uint64_t number); | | | |
| | | | |
| /** \ingroup rpmps | | | |
| * Filter a problem set. | | | |
| * | | | |
| * As the problem sets are generated in an order solely dependent | | | |
| * on the ordering of the packages in the transaction, and that | | | |
| * ordering can't be changed, the problem sets must be parallel to | | | |
| * one another. Additionally, the filter set must be a subset of the | | | |
| * target set, given the operations available on transaction set. | | | |
| * This is good, as it lets us perform this trim in linear time, rather | | | |
| * then logarithmic or quadratic. | | | |
| * | | | |
| * @param ps problem set | | | |
| * @param filter problem filter (or NULL) | | | |
| * @return 0 no problems, 1 if problems remain | | | |
| */ | | */ | |
|
| int rpmpsTrim(rpmps ps, rpmps filter); | | int rpmpsMerge(rpmps dest, rpmps src); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMPS */ | | #endif /* H_RPMPS */ | |
| | | | |
End of changes. 10 change blocks. |
| 183 lines changed or deleted | | 15 lines changed or added | |
|
| rpmspec.h | | rpmspec.h | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| | | | |
| #include <rpm/rpmstring.h> /* StringBuf */ | | #include <rpm/rpmstring.h> /* StringBuf */ | |
| #include <rpm/rpmcli.h> /* for QVA_t */ | | #include <rpm/rpmcli.h> /* for QVA_t */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| */ | | */ | |
|
| typedef struct Package_s * Package; | | typedef struct Package_s * rpmSpecPkg; | |
| | | typedef struct Source * rpmSpecSrc; | |
| | | typedef struct rpmSpecIter_s * rpmSpecPkgIter; | |
| | | typedef struct rpmSpecIter_s * rpmSpecSrcIter; | |
| | | | |
|
| /** \ingroup rpmbuild | | enum rpmSourceFlags_e { | |
| */ | | RPMBUILD_ISSOURCE = (1 << 0), | |
| struct TriggerFileEntry { | | RPMBUILD_ISPATCH = (1 << 1), | |
| int index; | | RPMBUILD_ISICON = (1 << 2), | |
| char * fileName; | | RPMBUILD_ISNO = (1 << 3), | |
| char * script; | | | |
| char * prog; | | | |
| struct TriggerFileEntry * next; | | | |
| }; | | }; | |
| | | | |
|
| #define RPMBUILD_ISSOURCE (1 << 0) | | typedef rpmFlags rpmSourceFlags; | |
| #define RPMBUILD_ISPATCH (1 << 1) | | | |
| #define RPMBUILD_ISICON (1 << 2) | | | |
| #define RPMBUILD_ISNO (1 << 3) | | | |
| | | | |
| #define RPMBUILD_DEFAULT_LANG "C" | | #define RPMBUILD_DEFAULT_LANG "C" | |
| | | | |
|
| /** \ingroup rpmbuild | | enum rpmSpecFlags_e { | |
| */ | | RPMSPEC_NONE = 0, | |
| struct Source { | | RPMSPEC_ANYARCH = (1 << 0), | |
| char * fullSource; | | RPMSPEC_FORCE = (1 << 1), | |
| char * source; /* Pointer into fullSource */ | | RPMSPEC_NOLANG = (1 << 2), | |
| int flags; | | | |
| uint32_t num; | | | |
| struct Source * next; | | | |
| }; | | }; | |
| | | | |
|
| /** \ingroup rpmbuild | | typedef rpmFlags rpmSpecFlags; | |
| */ | | | |
| typedef struct ReadLevelEntry { | | | |
| int reading; | | | |
| struct ReadLevelEntry * next; | | | |
| } RLE_t; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| */ | | | |
| typedef struct OpenFileInfo { | | | |
| char * fileName; | | | |
| FILE *fp; | | | |
| int lineNum; | | | |
| char readBuf[BUFSIZ]; | | | |
| char * readPtr; | | | |
| struct OpenFileInfo * next; | | | |
| } OFI_t; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| */ | | | |
| typedef struct spectag_s { | | | |
| int t_tag; | | | |
| int t_startx; | | | |
| int t_nlines; | | | |
| char * t_lang; | | | |
| char * t_msgid; | | | |
| } * spectag; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| */ | | | |
| typedef struct spectags_s { | | | |
| spectag st_t; | | | |
| int st_nalloc; | | | |
| int st_ntags; | | | |
| } * spectags; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| */ | | | |
| typedef struct speclines_s { | | | |
| char **sl_lines; | | | |
| int sl_nalloc; | | | |
| int sl_nlines; | | | |
| } * speclines; | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * The structure used to store values parsed from a spec file. | | | |
| */ | | | |
| struct rpmSpec_s { | | | |
| char * specFile; /*!< Name of the spec file. */ | | | |
| char * buildRoot; | | | |
| char * buildSubdir; | | | |
| char * rootDir; | | | |
| | | | |
| speclines sl; | | | |
| spectags st; | | | |
| | | | |
| struct OpenFileInfo * fileStack; | | | |
| char lbuf[10*BUFSIZ]; | | | |
| char *lbufPtr; | | | |
| char nextpeekc; | | | |
| char * nextline; | | | |
| char * line; | | | |
| int lineNum; | | | |
| | | | |
| struct ReadLevelEntry * readStack; | | | |
| | | | |
| Header buildRestrictions; | | | |
| rpmSpec * BASpecs; | | | |
| const char ** BANames; | | | |
| int BACount; | | | |
| int recursing; /*!< parse is recursive? */ | | | |
| | | | |
| int force; | | | |
| int anyarch; | | | |
| | | | |
| char * passPhrase; | | | |
| int timeCheck; | | | |
| char * cookie; | | | |
| | | | |
| struct Source * sources; | | | |
| int numSources; | | | |
| int noSource; | | | |
| | | | |
| char * sourceRpmName; | | | |
| unsigned char * sourcePkgId; | | | |
| Header sourceHeader; | | | |
| rpmfi sourceCpioList; | | | |
| | | | |
| rpmMacroContext macros; | | | |
| | | | |
| StringBuf prep; /*!< %prep scriptlet. */ | | | |
| StringBuf build; /*!< %build scriptlet. */ | | | |
| StringBuf install; /*!< %install scriptlet. */ | | | |
| StringBuf check; /*!< %check scriptlet. */ | | | |
| StringBuf clean; /*!< %clean scriptlet. */ | | | |
| | | | |
| Package packages; /*!< Package list. */ | | | |
| }; | | | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
|
| * The structure used to store values for a package. | | * Destroy Spec structure. | |
| | | * @param spec spec file control structure | |
| | | * @return NULL always | |
| */ | | */ | |
|
| struct Package_s { | | rpmSpec rpmSpecFree(rpmSpec spec); | |
| Header header; | | | |
| rpmds ds; /*!< Requires: N = EVR */ | | | |
| rpmfi cpioList; | | | |
| | | | |
| struct Source * icon; | | | |
| | | | |
| int autoReq; | | | |
| int autoProv; | | | |
| | | | |
| char * preInFile; /*!< %pre scriptlet. */ | | | |
| char * postInFile; /*!< %post scriptlet. */ | | | |
| char * preUnFile; /*!< %preun scriptlet. */ | | | |
| char * postUnFile; /*!< %postun scriptlet. */ | | | |
| char * preTransFile; /*!< %pretrans scriptlet. */ | | | |
| char * postTransFile; /*!< %posttrans scriptlet. */ | | | |
| char * verifyFile; /*!< %verifyscript scriptlet. */ | | | |
| | | | |
| StringBuf specialDoc; | | | |
| char *specialDocDir; | | | |
| | | | |
|
| struct TriggerFileEntry * triggerFiles; | | /* Iterator for spec packages */ | |
| | | rpmSpecPkgIter rpmSpecPkgIterInit(rpmSpec spec); | |
| | | rpmSpecPkg rpmSpecPkgIterNext(rpmSpecPkgIter iter); | |
| | | rpmSpecPkgIter rpmSpecPkgIterFree(rpmSpecPkgIter iter); | |
| | | | |
|
| StringBuf fileFile; | | /* Getters for spec package attributes */ | |
| StringBuf fileList; /* If NULL, package will not be writ | | Header rpmSpecPkgHeader(rpmSpecPkg pkg); | |
| ten */ | | | |
| | | | |
|
| Package next; | | /* Iterator for spec sources */ | |
| }; | | rpmSpecSrcIter rpmSpecSrcIterInit(rpmSpec spec); | |
| | | rpmSpecSrc rpmSpecSrcIterNext(rpmSpecSrcIter iter); | |
| | | rpmSpecSrcIter rpmSpecSrcIterFree(rpmSpecSrcIter iter); | |
| | | | |
|
| /** \ingroup rpmbuild | | /* Getters for spec source attributes */ | |
| * Create and initialize rpmSpec structure. | | rpmSourceFlags rpmSpecSrcFlags(rpmSpecSrc src); | |
| * @return spec spec file control structure | | int rpmSpecSrcNum(rpmSpecSrc src); | |
| */ | | const char * rpmSpecSrcFilename(rpmSpecSrc src, int full); | |
| rpmSpec newSpec(void); | | | |
| | | | |
|
| /** \ingroup rpmbuild | | /* Retrieve parsed spec script section (RPMBUILD_PREP, RPMBUILD_BUILD etc) | |
| * Destroy Spec structure. | | */ | |
| * @param spec spec file control structure | | const char * rpmSpecGetSection(rpmSpec spec, int section); | |
| * @return NULL always | | | |
| */ | | | |
| rpmSpec freeSpec(rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| * Function to query spec file(s). | | * Function to query spec file(s). | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param qva parsed query/verify options | | * @param qva parsed query/verify options | |
| * @param arg query argument | | * @param arg query argument | |
| * @return 0 on success, else no. of failures | | * @return 0 on success, else no. of failures | |
| */ | | */ | |
| int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg); | | int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg); | |
| | | | |
|
| /** \ingroup rpmbuild | | | |
| */ | | | |
| struct OpenFileInfo * newOpenFileInfo(void); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * stashSt. | | | |
| * @param spec spec file control structure | | | |
| * @param h header | | | |
| * @param tag tag | | | |
| * @param lang locale | | | |
| */ | | | |
| spectag stashSt(rpmSpec spec, Header h, rpmTag tag, const char * lang); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * addSource. | | | |
| * @param spec spec file control structure | | | |
| * @param pkg package control | | | |
| * @param field field to parse | | | |
| * @param tag tag | | | |
| */ | | | |
| int addSource(rpmSpec spec, Package pkg, const char * field, rpmTag tag); | | | |
| | | | |
| /** \ingroup rpmbuild | | | |
| * parseNoSource. | | | |
| * @param spec spec file control structure | | | |
| * @param field field to parse | | | |
| * @param tag tag | | | |
| */ | | | |
| int parseNoSource(rpmSpec spec, const char * field, rpmTag tag); | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _H_SPEC_ */ | | #endif /* _H_SPEC_ */ | |
| | | | |
End of changes. 13 change blocks. |
| 187 lines changed or deleted | | 37 lines changed or added | |
|
| rpmtag.h | | rpmtag.h | |
| #ifndef _RPMTAG_H | | #ifndef _RPMTAG_H | |
| #define _RPMTAG_H | | #define _RPMTAG_H | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * Pseudo-tags used by the rpmdb and rpmgi iterator API's. | | | |
| */ | | | |
| #define RPMDBI_PACKAGES 0 /* Installed package headers | | | |
| . */ | | | |
| #define RPMDBI_DEPENDS 1 /* Dependency resolution cac | | | |
| he. */ | | | |
| #define RPMDBI_LABEL 2 /* Fingerprint search marker | | | |
| . */ | | | |
| #define RPMDBI_ADDED 3 /* Added package headers. */ | | | |
| #define RPMDBI_REMOVED 4 /* Removed package headers. | | | |
| */ | | | |
| #define RPMDBI_AVAILABLE 5 /* Available package headers | | | |
| . */ | | | |
| #define RPMDBI_HDLIST 6 /* (rpmgi) Header list. */ | | | |
| #define RPMDBI_ARGLIST 7 /* (rpmgi) Argument list. */ | | | |
| #define RPMDBI_FTSWALK 8 /* (rpmgi) File tree walk. | | | |
| */ | | | |
| | | | |
| /** | | | |
| * Header private tags. | | * Header private tags. | |
| * @note General use tags should start at 1000 (RPM's tag space starts ther
e). | | * @note General use tags should start at 1000 (RPM's tag space starts ther
e). | |
| */ | | */ | |
| #define HEADER_IMAGE 61 | | #define HEADER_IMAGE 61 | |
| #define HEADER_SIGNATURES 62 | | #define HEADER_SIGNATURES 62 | |
| #define HEADER_IMMUTABLE 63 | | #define HEADER_IMMUTABLE 63 | |
| #define HEADER_REGIONS 64 | | #define HEADER_REGIONS 64 | |
| #define HEADER_I18NTABLE 100 | | #define HEADER_I18NTABLE 100 | |
| #define HEADER_SIGBASE 256 | | #define HEADER_SIGBASE 256 | |
| #define HEADER_TAGBASE 1000 | | #define HEADER_TAGBASE 1000 | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Tags identify data in package headers. | | * Tags identify data in package headers. | |
| * @note tags should not have value 0! | | * @note tags should not have value 0! | |
|
| | | * @note all new tags should be added above 5000 | |
| */ | | */ | |
| /** @todo: Somehow supply type **/ | | /** @todo: Somehow supply type **/ | |
| typedef enum rpmTag_e { | | typedef enum rpmTag_e { | |
|
| | | RPMTAG_NOT_FOUND = -1, /*!< Unknown tag */ | |
| | | | |
| RPMTAG_HEADERIMAGE = HEADER_IMAGE, /*!< Current image.
*/ | | RPMTAG_HEADERIMAGE = HEADER_IMAGE, /*!< Current image.
*/ | |
| RPMTAG_HEADERSIGNATURES = HEADER_SIGNATURES, /*!< Signatures. */ | | RPMTAG_HEADERSIGNATURES = HEADER_SIGNATURES, /*!< Signatures. */ | |
| RPMTAG_HEADERIMMUTABLE = HEADER_IMMUTABLE, /*!< Original image.
*/ | | RPMTAG_HEADERIMMUTABLE = HEADER_IMMUTABLE, /*!< Original image.
*/ | |
| RPMTAG_HEADERREGIONS = HEADER_REGIONS, /*!< Regions. */ | | RPMTAG_HEADERREGIONS = HEADER_REGIONS, /*!< Regions. */ | |
| | | | |
| RPMTAG_HEADERI18NTABLE = HEADER_I18NTABLE, /* s[] !< I18N strin
g locales. */ | | RPMTAG_HEADERI18NTABLE = HEADER_I18NTABLE, /* s[] !< I18N strin
g locales. */ | |
| | | | |
| /* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpm
Query. */ | | /* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpm
Query. */ | |
| /* the md5 sum was broken *twice* on big endian machines */ | | /* the md5 sum was broken *twice* on big endian machines */ | |
| | | | |
| skipping to change at line 107 | | skipping to change at line 96 | |
| RPMTAG_OS = 1021, /* s legacy used int */ | | RPMTAG_OS = 1021, /* s legacy used int */ | |
| RPMTAG_ARCH = 1022, /* s legacy used int */ | | RPMTAG_ARCH = 1022, /* s legacy used int */ | |
| RPMTAG_PREIN = 1023, /* s */ | | RPMTAG_PREIN = 1023, /* s */ | |
| RPMTAG_POSTIN = 1024, /* s */ | | RPMTAG_POSTIN = 1024, /* s */ | |
| RPMTAG_PREUN = 1025, /* s */ | | RPMTAG_PREUN = 1025, /* s */ | |
| RPMTAG_POSTUN = 1026, /* s */ | | RPMTAG_POSTUN = 1026, /* s */ | |
| RPMTAG_OLDFILENAMES = 1027, /* s[] obsolete */ | | RPMTAG_OLDFILENAMES = 1027, /* s[] obsolete */ | |
| RPMTAG_FILESIZES = 1028, /* i[] */ | | RPMTAG_FILESIZES = 1028, /* i[] */ | |
| RPMTAG_FILESTATES = 1029, /* c[] */ | | RPMTAG_FILESTATES = 1029, /* c[] */ | |
| RPMTAG_FILEMODES = 1030, /* h[] */ | | RPMTAG_FILEMODES = 1030, /* h[] */ | |
|
| RPMTAG_FILEUIDS = 1031, /* i[] internal */ | | RPMTAG_FILEUIDS = 1031, /* i[] internal - obsolete */ | |
| RPMTAG_FILEGIDS = 1032, /* i[] internal */ | | RPMTAG_FILEGIDS = 1032, /* i[] internal - obsolete */ | |
| RPMTAG_FILERDEVS = 1033, /* h[] */ | | RPMTAG_FILERDEVS = 1033, /* h[] */ | |
| RPMTAG_FILEMTIMES = 1034, /* i[] */ | | RPMTAG_FILEMTIMES = 1034, /* i[] */ | |
| RPMTAG_FILEDIGESTS = 1035, /* s[] */ | | RPMTAG_FILEDIGESTS = 1035, /* s[] */ | |
| #define RPMTAG_FILEMD5S RPMTAG_FILEDIGESTS /* s[] */ | | #define RPMTAG_FILEMD5S RPMTAG_FILEDIGESTS /* s[] */ | |
| RPMTAG_FILELINKTOS = 1036, /* s[] */ | | RPMTAG_FILELINKTOS = 1036, /* s[] */ | |
| RPMTAG_FILEFLAGS = 1037, /* i[] */ | | RPMTAG_FILEFLAGS = 1037, /* i[] */ | |
| RPMTAG_ROOT = 1038, /* internal - obsolete */ | | RPMTAG_ROOT = 1038, /* internal - obsolete */ | |
| RPMTAG_FILEUSERNAME = 1039, /* s[] */ | | RPMTAG_FILEUSERNAME = 1039, /* s[] */ | |
| RPMTAG_FILEGROUPNAME = 1040, /* s[] */ | | RPMTAG_FILEGROUPNAME = 1040, /* s[] */ | |
| RPMTAG_EXCLUDE = 1041, /* internal - obsolete */ | | RPMTAG_EXCLUDE = 1041, /* internal - obsolete */ | |
| | | | |
| skipping to change at line 139 | | skipping to change at line 128 | |
| #define RPMTAG_REQUIRES RPMTAG_REQUIRENAME /* s[] */ | | #define RPMTAG_REQUIRES RPMTAG_REQUIRENAME /* s[] */ | |
| RPMTAG_REQUIREVERSION = 1050, /* s[] */ | | RPMTAG_REQUIREVERSION = 1050, /* s[] */ | |
| RPMTAG_NOSOURCE = 1051, /* i */ | | RPMTAG_NOSOURCE = 1051, /* i */ | |
| RPMTAG_NOPATCH = 1052, /* i */ | | RPMTAG_NOPATCH = 1052, /* i */ | |
| RPMTAG_CONFLICTFLAGS = 1053, /* i[] */ | | RPMTAG_CONFLICTFLAGS = 1053, /* i[] */ | |
| RPMTAG_CONFLICTNAME = 1054, /* s[] */ | | RPMTAG_CONFLICTNAME = 1054, /* s[] */ | |
| #define RPMTAG_CONFLICTS RPMTAG_CONFLICTNAME /* s[] */ | | #define RPMTAG_CONFLICTS RPMTAG_CONFLICTNAME /* s[] */ | |
| #define RPMTAG_C RPMTAG_CONFLICTNAME /* s[] */ | | #define RPMTAG_C RPMTAG_CONFLICTNAME /* s[] */ | |
| RPMTAG_CONFLICTVERSION = 1055, /* s[] */ | | RPMTAG_CONFLICTVERSION = 1055, /* s[] */ | |
| RPMTAG_DEFAULTPREFIX = 1056, /* s internal - deprecated */ | | RPMTAG_DEFAULTPREFIX = 1056, /* s internal - deprecated */ | |
|
| RPMTAG_BUILDROOT = 1057, /* s internal */ | | RPMTAG_BUILDROOT = 1057, /* s internal - obsolete */ | |
| RPMTAG_INSTALLPREFIX = 1058, /* s internal - deprecated */ | | RPMTAG_INSTALLPREFIX = 1058, /* s internal - deprecated */ | |
| RPMTAG_EXCLUDEARCH = 1059, /* s[] */ | | RPMTAG_EXCLUDEARCH = 1059, /* s[] */ | |
| RPMTAG_EXCLUDEOS = 1060, /* s[] */ | | RPMTAG_EXCLUDEOS = 1060, /* s[] */ | |
| RPMTAG_EXCLUSIVEARCH = 1061, /* s[] */ | | RPMTAG_EXCLUSIVEARCH = 1061, /* s[] */ | |
| RPMTAG_EXCLUSIVEOS = 1062, /* s[] */ | | RPMTAG_EXCLUSIVEOS = 1062, /* s[] */ | |
| RPMTAG_AUTOREQPROV = 1063, /* s internal */ | | RPMTAG_AUTOREQPROV = 1063, /* s internal */ | |
| RPMTAG_RPMVERSION = 1064, /* s */ | | RPMTAG_RPMVERSION = 1064, /* s */ | |
| RPMTAG_TRIGGERSCRIPTS = 1065, /* s[] */ | | RPMTAG_TRIGGERSCRIPTS = 1065, /* s[] */ | |
| RPMTAG_TRIGGERNAME = 1066, /* s[] */ | | RPMTAG_TRIGGERNAME = 1066, /* s[] */ | |
| RPMTAG_TRIGGERVERSION = 1067, /* s[] */ | | RPMTAG_TRIGGERVERSION = 1067, /* s[] */ | |
| | | | |
| skipping to change at line 180 | | skipping to change at line 169 | |
| RPMTAG_FILEDEVICES = 1095, /* i[] */ | | RPMTAG_FILEDEVICES = 1095, /* i[] */ | |
| RPMTAG_FILEINODES = 1096, /* i[] */ | | RPMTAG_FILEINODES = 1096, /* i[] */ | |
| RPMTAG_FILELANGS = 1097, /* s[] */ | | RPMTAG_FILELANGS = 1097, /* s[] */ | |
| RPMTAG_PREFIXES = 1098, /* s[] */ | | RPMTAG_PREFIXES = 1098, /* s[] */ | |
| RPMTAG_INSTPREFIXES = 1099, /* s[] */ | | RPMTAG_INSTPREFIXES = 1099, /* s[] */ | |
| RPMTAG_TRIGGERIN = 1100, /* internal */ | | RPMTAG_TRIGGERIN = 1100, /* internal */ | |
| RPMTAG_TRIGGERUN = 1101, /* internal */ | | RPMTAG_TRIGGERUN = 1101, /* internal */ | |
| RPMTAG_TRIGGERPOSTUN = 1102, /* internal */ | | RPMTAG_TRIGGERPOSTUN = 1102, /* internal */ | |
| RPMTAG_AUTOREQ = 1103, /* internal */ | | RPMTAG_AUTOREQ = 1103, /* internal */ | |
| RPMTAG_AUTOPROV = 1104, /* internal */ | | RPMTAG_AUTOPROV = 1104, /* internal */ | |
|
| RPMTAG_CAPABILITY = 1105, /* i legacy - obsolete */ | | RPMTAG_CAPABILITY = 1105, /* i internal - obsolete */ | |
| RPMTAG_SOURCEPACKAGE = 1106, /* i legacy - obsolete */ | | RPMTAG_SOURCEPACKAGE = 1106, /* i */ | |
| RPMTAG_OLDORIGFILENAMES = 1107, /* internal - obsolete */ | | RPMTAG_OLDORIGFILENAMES = 1107, /* internal - obsolete */ | |
| RPMTAG_BUILDPREREQ = 1108, /* internal */ | | RPMTAG_BUILDPREREQ = 1108, /* internal */ | |
| RPMTAG_BUILDREQUIRES = 1109, /* internal */ | | RPMTAG_BUILDREQUIRES = 1109, /* internal */ | |
| RPMTAG_BUILDCONFLICTS = 1110, /* internal */ | | RPMTAG_BUILDCONFLICTS = 1110, /* internal */ | |
| RPMTAG_BUILDMACROS = 1111, /* internal - unused */ | | RPMTAG_BUILDMACROS = 1111, /* internal - unused */ | |
| RPMTAG_PROVIDEFLAGS = 1112, /* i[] */ | | RPMTAG_PROVIDEFLAGS = 1112, /* i[] */ | |
| RPMTAG_PROVIDEVERSION = 1113, /* s[] */ | | RPMTAG_PROVIDEVERSION = 1113, /* s[] */ | |
| RPMTAG_OBSOLETEFLAGS = 1114, /* i[] */ | | RPMTAG_OBSOLETEFLAGS = 1114, /* i[] */ | |
| RPMTAG_OBSOLETEVERSION = 1115, /* s[] */ | | RPMTAG_OBSOLETEVERSION = 1115, /* s[] */ | |
| RPMTAG_DIRINDEXES = 1116, /* i[] */ | | RPMTAG_DIRINDEXES = 1116, /* i[] */ | |
| | | | |
| skipping to change at line 206 | | skipping to change at line 195 | |
| RPMTAG_ORIGDIRNAMES = 1121, /* s[] relocation */ | | RPMTAG_ORIGDIRNAMES = 1121, /* s[] relocation */ | |
| RPMTAG_OPTFLAGS = 1122, /* s */ | | RPMTAG_OPTFLAGS = 1122, /* s */ | |
| RPMTAG_DISTURL = 1123, /* s */ | | RPMTAG_DISTURL = 1123, /* s */ | |
| RPMTAG_PAYLOADFORMAT = 1124, /* s */ | | RPMTAG_PAYLOADFORMAT = 1124, /* s */ | |
| RPMTAG_PAYLOADCOMPRESSOR = 1125, /* s */ | | RPMTAG_PAYLOADCOMPRESSOR = 1125, /* s */ | |
| RPMTAG_PAYLOADFLAGS = 1126, /* s */ | | RPMTAG_PAYLOADFLAGS = 1126, /* s */ | |
| RPMTAG_INSTALLCOLOR = 1127, /* i transaction color when
installed */ | | RPMTAG_INSTALLCOLOR = 1127, /* i transaction color when
installed */ | |
| RPMTAG_INSTALLTID = 1128, /* i */ | | RPMTAG_INSTALLTID = 1128, /* i */ | |
| RPMTAG_REMOVETID = 1129, /* i */ | | RPMTAG_REMOVETID = 1129, /* i */ | |
| RPMTAG_SHA1RHN = 1130, /* internal - obsolete */ | | RPMTAG_SHA1RHN = 1130, /* internal - obsolete */ | |
|
| RPMTAG_RHNPLATFORM = 1131, /* s deprecated */ | | RPMTAG_RHNPLATFORM = 1131, /* s internal - obsolete */ | |
| RPMTAG_PLATFORM = 1132, /* s */ | | RPMTAG_PLATFORM = 1132, /* s */ | |
| RPMTAG_PATCHESNAME = 1133, /* s[] deprecated placeholder (SuSE)
*/ | | RPMTAG_PATCHESNAME = 1133, /* s[] deprecated placeholder (SuSE)
*/ | |
| RPMTAG_PATCHESFLAGS = 1134, /* i[] deprecated placeholde
r (SuSE) */ | | RPMTAG_PATCHESFLAGS = 1134, /* i[] deprecated placeholde
r (SuSE) */ | |
| RPMTAG_PATCHESVERSION = 1135, /* s[] deprecated placeholder (SuSE)
*/ | | RPMTAG_PATCHESVERSION = 1135, /* s[] deprecated placeholder (SuSE)
*/ | |
| RPMTAG_CACHECTIME = 1136, /* i internal - obsolete */ | | RPMTAG_CACHECTIME = 1136, /* i internal - obsolete */ | |
| RPMTAG_CACHEPKGPATH = 1137, /* s internal - obsolete */ | | RPMTAG_CACHEPKGPATH = 1137, /* s internal - obsolete */ | |
| RPMTAG_CACHEPKGSIZE = 1138, /* i internal - obsolete */ | | RPMTAG_CACHEPKGSIZE = 1138, /* i internal - obsolete */ | |
| RPMTAG_CACHEPKGMTIME = 1139, /* i internal - obsolete */ | | RPMTAG_CACHEPKGMTIME = 1139, /* i internal - obsolete */ | |
| RPMTAG_FILECOLORS = 1140, /* i[] */ | | RPMTAG_FILECOLORS = 1140, /* i[] */ | |
| RPMTAG_FILECLASS = 1141, /* i[] */ | | RPMTAG_FILECLASS = 1141, /* i[] */ | |
| | | | |
| skipping to change at line 271 | | skipping to change at line 260 | |
| RPMTAG_BUILDPLATFORMS = 1183, /* s[] (unimplemented) */ | | RPMTAG_BUILDPLATFORMS = 1183, /* s[] (unimplemented) */ | |
| RPMTAG_PACKAGECOLOR = 1184, /* i (unimplemented) */ | | RPMTAG_PACKAGECOLOR = 1184, /* i (unimplemented) */ | |
| RPMTAG_PACKAGEPREFCOLOR = 1185, /* i (unimplemented) */ | | RPMTAG_PACKAGEPREFCOLOR = 1185, /* i (unimplemented) */ | |
| RPMTAG_XATTRSDICT = 1186, /* s[] (unimplemented) */ | | RPMTAG_XATTRSDICT = 1186, /* s[] (unimplemented) */ | |
| RPMTAG_FILEXATTRSX = 1187, /* i[] (unimplemented) */ | | RPMTAG_FILEXATTRSX = 1187, /* i[] (unimplemented) */ | |
| RPMTAG_DEPATTRSDICT = 1188, /* s[] (unimplemented) */ | | RPMTAG_DEPATTRSDICT = 1188, /* s[] (unimplemented) */ | |
| RPMTAG_CONFLICTATTRSX = 1189, /* i[] (unimplemented) */ | | RPMTAG_CONFLICTATTRSX = 1189, /* i[] (unimplemented) */ | |
| RPMTAG_OBSOLETEATTRSX = 1190, /* i[] (unimplemented) */ | | RPMTAG_OBSOLETEATTRSX = 1190, /* i[] (unimplemented) */ | |
| RPMTAG_PROVIDEATTRSX = 1191, /* i[] (unimplemented) */ | | RPMTAG_PROVIDEATTRSX = 1191, /* i[] (unimplemented) */ | |
| RPMTAG_REQUIREATTRSX = 1192, /* i[] (unimplemented) */ | | RPMTAG_REQUIREATTRSX = 1192, /* i[] (unimplemented) */ | |
|
| RPMTAG_BUILDPROVIDES = 1193, /* internal */ | | RPMTAG_BUILDPROVIDES = 1193, /* internal (unimplemented) */ | |
| RPMTAG_BUILDOBSOLETES = 1194, /* internal */ | | RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */ | |
| RPMTAG_DBINSTANCE = 1195, /* i extension */ | | RPMTAG_DBINSTANCE = 1195, /* i extension */ | |
| RPMTAG_NVRA = 1196, /* s extension */ | | RPMTAG_NVRA = 1196, /* s extension */ | |
|
| | | /* tags 1997-4999 reserved */ | |
| RPMTAG_FILENAMES = 5000, /* s[] extension */ | | RPMTAG_FILENAMES = 5000, /* s[] extension */ | |
| RPMTAG_FILEPROVIDE = 5001, /* s[] extension */ | | RPMTAG_FILEPROVIDE = 5001, /* s[] extension */ | |
| RPMTAG_FILEREQUIRE = 5002, /* s[] extension */ | | RPMTAG_FILEREQUIRE = 5002, /* s[] extension */ | |
|
| RPMTAG_FSNAMES = 5003, /* s[] extension */ | | RPMTAG_FSNAMES = 5003, /* s[] (unimplemented) */ | |
| RPMTAG_FSSIZES = 5004, /* l[] extension */ | | RPMTAG_FSSIZES = 5004, /* l[] (unimplemented) */ | |
| RPMTAG_TRIGGERCONDS = 5005, /* s[] extension */ | | RPMTAG_TRIGGERCONDS = 5005, /* s[] extension */ | |
| RPMTAG_TRIGGERTYPE = 5006, /* s[] extension */ | | RPMTAG_TRIGGERTYPE = 5006, /* s[] extension */ | |
| RPMTAG_ORIGFILENAMES = 5007, /* s[] extension */ | | RPMTAG_ORIGFILENAMES = 5007, /* s[] extension */ | |
| RPMTAG_LONGFILESIZES = 5008, /* l[] */ | | RPMTAG_LONGFILESIZES = 5008, /* l[] */ | |
| RPMTAG_LONGSIZE = 5009, /* l */ | | RPMTAG_LONGSIZE = 5009, /* l */ | |
| RPMTAG_FILECAPS = 5010, /* s[] */ | | RPMTAG_FILECAPS = 5010, /* s[] */ | |
| RPMTAG_FILEDIGESTALGO = 5011, /* i file digest algorithm */ | | RPMTAG_FILEDIGESTALGO = 5011, /* i file digest algorithm */ | |
| RPMTAG_BUGURL = 5012, /* s */ | | RPMTAG_BUGURL = 5012, /* s */ | |
| RPMTAG_EVR = 5013, /* s extension */ | | RPMTAG_EVR = 5013, /* s extension */ | |
| RPMTAG_NVR = 5014, /* s extension */ | | RPMTAG_NVR = 5014, /* s extension */ | |
| RPMTAG_NEVR = 5015, /* s extension */ | | RPMTAG_NEVR = 5015, /* s extension */ | |
| RPMTAG_NEVRA = 5016, /* s extension */ | | RPMTAG_NEVRA = 5016, /* s extension */ | |
| RPMTAG_HEADERCOLOR = 5017, /* i extension */ | | RPMTAG_HEADERCOLOR = 5017, /* i extension */ | |
| RPMTAG_VERBOSE = 5018, /* i extension */ | | RPMTAG_VERBOSE = 5018, /* i extension */ | |
| RPMTAG_EPOCHNUM = 5019, /* i extension */ | | RPMTAG_EPOCHNUM = 5019, /* i extension */ | |
|
| | | RPMTAG_PREINFLAGS = 5020, /* i */ | |
| | | RPMTAG_POSTINFLAGS = 5021, /* i */ | |
| | | RPMTAG_PREUNFLAGS = 5022, /* i */ | |
| | | RPMTAG_POSTUNFLAGS = 5023, /* i */ | |
| | | RPMTAG_PRETRANSFLAGS = 5024, /* i */ | |
| | | RPMTAG_POSTTRANSFLAGS = 5025, /* i */ | |
| | | RPMTAG_VERIFYSCRIPTFLAGS = 5026, /* i */ | |
| | | RPMTAG_TRIGGERSCRIPTFLAGS = 5027, /* i[] */ | |
| | | RPMTAG_COLLECTIONS = 5029, /* s[] list of collections */ | |
| | | RPMTAG_POLICYNAMES = 5030, /* s[] */ | |
| | | RPMTAG_POLICYTYPES = 5031, /* s[] */ | |
| | | RPMTAG_POLICYTYPESINDEXES = 5032, /* i[] */ | |
| | | RPMTAG_POLICYFLAGS = 5033, /* i[] */ | |
| | | RPMTAG_VCS = 5034, /* s */ | |
| | | RPMTAG_ORDERNAME = 5035, /* s[] */ | |
| | | RPMTAG_ORDERVERSION = 5036, /* s[] */ | |
| | | RPMTAG_ORDERFLAGS = 5037, /* i[] */ | |
| | | | |
| RPMTAG_FIRSTFREE_TAG /*!< internal */ | | RPMTAG_FIRSTFREE_TAG /*!< internal */ | |
| } rpmTag; | | } rpmTag; | |
| | | | |
| #define RPMTAG_EXTERNAL_TAG 1000000 | | #define RPMTAG_EXTERNAL_TAG 1000000 | |
|
| #define RPMTAG_NOT_FOUND -1 | | | |
| | | /** \ingroup rpmtag | |
| | | * Rpm database index tags. | |
| | | */ | |
| | | typedef enum rpmDbiTag_e { | |
| | | RPMDBI_PACKAGES = 0, /* Installed package headers. */ | |
| | | RPMDBI_LABEL = 2, /* NEVRA label pseudo index */ | |
| | | RPMDBI_NAME = RPMTAG_NAME, | |
| | | RPMDBI_BASENAMES = RPMTAG_BASENAMES, | |
| | | RPMDBI_GROUP = RPMTAG_GROUP, | |
| | | RPMDBI_REQUIRENAME = RPMTAG_REQUIRENAME, | |
| | | RPMDBI_PROVIDENAME = RPMTAG_PROVIDENAME, | |
| | | RPMDBI_CONFLICTNAME = RPMTAG_CONFLICTNAME, | |
| | | RPMDBI_OBSOLETENAME = RPMTAG_OBSOLETENAME, | |
| | | RPMDBI_TRIGGERNAME = RPMTAG_TRIGGERNAME, | |
| | | RPMDBI_DIRNAMES = RPMTAG_DIRNAMES, | |
| | | RPMDBI_INSTALLTID = RPMTAG_INSTALLTID, | |
| | | RPMDBI_SIGMD5 = RPMTAG_SIGMD5, | |
| | | RPMDBI_SHA1HEADER = RPMTAG_SHA1HEADER, | |
| | | } rpmDbiTag; | |
| | | | |
| /** \ingroup signature | | /** \ingroup signature | |
| * Tags found in signature header from package. | | * Tags found in signature header from package. | |
| */ | | */ | |
| typedef enum rpmSigTag_e { | | typedef enum rpmSigTag_e { | |
| RPMSIGTAG_SIZE = 1000, /*!< internal Header+Payload size (32bit) in
bytes. */ | | RPMSIGTAG_SIZE = 1000, /*!< internal Header+Payload size (32bit) in
bytes. */ | |
| RPMSIGTAG_LEMD5_1 = 1001, /*!< internal Broken MD5, take 1 @deprecated
legacy. */ | | RPMSIGTAG_LEMD5_1 = 1001, /*!< internal Broken MD5, take 1 @deprecated
legacy. */ | |
| RPMSIGTAG_PGP = 1002, /*!< internal PGP 2.6.3 signature. */ | | RPMSIGTAG_PGP = 1002, /*!< internal PGP 2.6.3 signature. */ | |
| RPMSIGTAG_LEMD5_2 = 1003, /*!< internal Broken MD5, take 2 @deprecated
legacy. */ | | RPMSIGTAG_LEMD5_2 = 1003, /*!< internal Broken MD5, take 2 @deprecated
legacy. */ | |
| RPMSIGTAG_MD5 = 1004, /*!< internal MD5 signature. */ | | RPMSIGTAG_MD5 = 1004, /*!< internal MD5 signature. */ | |
| | | | |
| skipping to change at line 374 | | skipping to change at line 400 | |
| /*!<@todo Implement, kinda like RPM_STRING_ARRAY_TYPE for known (but vari
able) | | /*!<@todo Implement, kinda like RPM_STRING_ARRAY_TYPE for known (but vari
able) | |
| length binary data. */ | | length binary data. */ | |
| RPM_XREF_TYPE = -12 | | RPM_XREF_TYPE = -12 | |
| /*!<@todo Implement, intent is to to carry a (???,tagNum,valNum) cross | | /*!<@todo Implement, intent is to to carry a (???,tagNum,valNum) cross | |
| reference to retrieve data from other tags. */ | | reference to retrieve data from other tags. */ | |
| } rpmSubTagType; | | } rpmSubTagType; | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * * Identify how to return the header data type. | | * * Identify how to return the header data type. | |
| * */ | | * */ | |
|
| typedef enum rpmTagReturnType_e { | | enum rpmTagReturnType_e { | |
| RPM_ANY_RETURN_TYPE = 0, | | RPM_ANY_RETURN_TYPE = 0, | |
| RPM_SCALAR_RETURN_TYPE = 0x00010000, | | RPM_SCALAR_RETURN_TYPE = 0x00010000, | |
| RPM_ARRAY_RETURN_TYPE = 0x00020000, | | RPM_ARRAY_RETURN_TYPE = 0x00020000, | |
| RPM_MAPPING_RETURN_TYPE = 0x00040000, | | RPM_MAPPING_RETURN_TYPE = 0x00040000, | |
| RPM_MASK_RETURN_TYPE = 0xffff0000 | | RPM_MASK_RETURN_TYPE = 0xffff0000 | |
|
| } rpmTagReturnType; | | }; | |
| | | | |
| | | typedef rpmFlags rpmTagReturnType; | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Return tag name from value. | | * Return tag name from value. | |
| * @param tag tag value | | * @param tag tag value | |
| * @return tag name, "(unknown)" on not found | | * @return tag name, "(unknown)" on not found | |
| */ | | */ | |
|
| const char * rpmTagGetName(rpmTag tag); | | const char * rpmTagGetName(rpmTagVal tag); | |
| | | | |
| | | /** \ingroup rpmtag | |
| | | * Return tag data type from value. | |
| | | * @param tag tag value | |
| | | * @return tag data type + return type, RPM_NULL_TYPE on not fo | |
| | | und. | |
| | | */ | |
| | | rpmTagType rpmTagGetType(rpmTagVal tag); | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Return tag data type from value. | | * Return tag data type from value. | |
| * @param tag tag value | | * @param tag tag value | |
| * @return tag data type, RPM_NULL_TYPE on not found. | | * @return tag data type, RPM_NULL_TYPE on not found. | |
| */ | | */ | |
|
| rpmTagType rpmTagGetType(rpmTag tag); | | rpmTagType rpmTagGetTagType(rpmTagVal tag); | |
| | | | |
| | | /** \ingroup rpmtag | |
| | | * Return tag data type from value. | |
| | | * @param tag tag value | |
| | | * @return tag data return type, RPM_NULL_TYPE on not found. | |
| | | */ | |
| | | rpmTagReturnType rpmTagGetReturnType(rpmTagVal tag); | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Return tag data class from value. | | * Return tag data class from value. | |
| * @param tag tag value | | * @param tag tag value | |
| * @return tag data class, RPM_NULL_CLASS on not found. | | * @return tag data class, RPM_NULL_CLASS on not found. | |
| */ | | */ | |
|
| rpmTagClass rpmTagGetClass(rpmTag tag); | | rpmTagClass rpmTagGetClass(rpmTagVal tag); | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Return tag value from name. | | * Return tag value from name. | |
| * @param tagstr name of tag | | * @param tagstr name of tag | |
| * @return tag value, -1 on not found | | * @return tag value, -1 on not found | |
| */ | | */ | |
|
| rpmTag rpmTagGetValue(const char * tagstr); | | rpmTagVal rpmTagGetValue(const char * tagstr); | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Return data class of type | | * Return data class of type | |
| * @param type tag type | | * @param type tag type | |
| * @return data class, RPM_NULL_CLASS on unknown. | | * @return data class, RPM_NULL_CLASS on unknown. | |
| */ | | */ | |
| rpmTagClass rpmTagTypeGetClass(rpmTagType type); | | rpmTagClass rpmTagTypeGetClass(rpmTagType type); | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Return known rpm tag names, sorted by name. | | * Return known rpm tag names, sorted by name. | |
| | | | |
End of changes. 18 change blocks. |
| 36 lines changed or deleted | | 73 lines changed or added | |
|
| rpmtd.h | | rpmtd.h | |
| #ifndef _RPMTD_H | | #ifndef _RPMTD_H | |
| #define _RPMTD_H | | #define _RPMTD_H | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/argv.h> | | #include <rpm/argv.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| typedef enum rpmtdFlags_e { | | enum rpmtdFlags_e { | |
| RPMTD_NONE = 0, | | RPMTD_NONE = 0, | |
| RPMTD_ALLOCED = (1 << 0), /* was memory allocated? */ | | RPMTD_ALLOCED = (1 << 0), /* was memory allocated? */ | |
| RPMTD_PTR_ALLOCED = (1 << 1), /* were array pointers allocated? */ | | RPMTD_PTR_ALLOCED = (1 << 1), /* were array pointers allocated? */ | |
| RPMTD_IMMUTABLE = (1 << 2), /* header data or modifiable? */ | | RPMTD_IMMUTABLE = (1 << 2), /* header data or modifiable? */ | |
| RPMTD_ARGV = (1 << 3), /* string array is NULL-terminated?
*/ | | RPMTD_ARGV = (1 << 3), /* string array is NULL-terminated?
*/ | |
|
| } rpmtdFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmtdFlags; | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Container for rpm tag data (from headers or extensions). | | * Container for rpm tag data (from headers or extensions). | |
| * @todo Make this opaque (at least outside rpm itself) | | * @todo Make this opaque (at least outside rpm itself) | |
| */ | | */ | |
| struct rpmtd_s { | | struct rpmtd_s { | |
|
| rpmTag tag; /* rpm tag of this data entry*/ | | rpm_tag_t tag; /* rpm tag of this data entry*/ | |
| rpmTagType type; /* data type */ | | rpm_tagtype_t type; /* data type */ | |
| rpm_count_t count; /* number of entries */ | | rpm_count_t count; /* number of entries */ | |
| rpm_data_t data; /* pointer to actual data */ | | rpm_data_t data; /* pointer to actual data */ | |
| rpmtdFlags flags; /* flags on memory allocation etc */ | | rpmtdFlags flags; /* flags on memory allocation etc */ | |
| int ix; /* iteration index */ | | int ix; /* iteration index */ | |
| }; | | }; | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Create new tag data container | | * Create new tag data container | |
| * @return New, initialized tag data container. | | * @return New, initialized tag data container. | |
| */ | | */ | |
| | | | |
| skipping to change at line 71 | | skipping to change at line 73 | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @return Number of entries in contained data. | | * @return Number of entries in contained data. | |
| */ | | */ | |
| rpm_count_t rpmtdCount(rpmtd td); | | rpm_count_t rpmtdCount(rpmtd td); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Retrieve tag of the container. | | * Retrieve tag of the container. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @return Rpm tag. | | * @return Rpm tag. | |
| */ | | */ | |
|
| rpmTag rpmtdTag(rpmtd td); | | rpmTagVal rpmtdTag(rpmtd td); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Retrieve type of the container. | | * Retrieve type of the container. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @return Rpm tag type. | | * @return Rpm tag type. | |
| */ | | */ | |
| rpmTagType rpmtdType(rpmtd td); | | rpmTagType rpmtdType(rpmtd td); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Retrieve class of the container. | | * Retrieve class of the container. | |
| | | | |
| skipping to change at line 219 | | skipping to change at line 221 | |
| RPMTD_FORMAT_XML = 8, /* xml format (any type) */ | | RPMTD_FORMAT_XML = 8, /* xml format (any type) */ | |
| RPMTD_FORMAT_OCTAL = 9, /* octal format (int types) */ | | RPMTD_FORMAT_OCTAL = 9, /* octal format (int types) */ | |
| RPMTD_FORMAT_HEX = 10, /* hex format (int types) */ | | RPMTD_FORMAT_HEX = 10, /* hex format (int types) */ | |
| RPMTD_FORMAT_DATE = 11, /* date format (int types) */ | | RPMTD_FORMAT_DATE = 11, /* date format (int types) */ | |
| RPMTD_FORMAT_DAY = 12, /* day format (int types) */ | | RPMTD_FORMAT_DAY = 12, /* day format (int types) */ | |
| RPMTD_FORMAT_SHESCAPE = 13, /* shell escaped (any type) */ | | RPMTD_FORMAT_SHESCAPE = 13, /* shell escaped (any type) */ | |
| RPMTD_FORMAT_ARRAYSIZE = 14, /* size of contained array (any type
) */ | | RPMTD_FORMAT_ARRAYSIZE = 14, /* size of contained array (any type
) */ | |
| RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */ | | RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */ | |
| RPMTD_FORMAT_FSTATE = 16, /* file states (int types) *
/ | | RPMTD_FORMAT_FSTATE = 16, /* file states (int types) *
/ | |
| RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int ty
pes) */ | | RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int ty
pes) */ | |
|
| | | RPMTD_FORMAT_EXPAND = 18, /* macro expansion (string t | |
| | | ypes) */ | |
| | | RPMTD_FORMAT_FSTATUS = 19, /* file verify status (int types) */ | |
| } rpmtdFormats; | | } rpmtdFormats; | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Format data from tag container to string presentation of given format. | | * Format data from tag container to string presentation of given format. | |
| * Return malloced string presentation of current data in container, | | * Return malloced string presentation of current data in container, | |
| * converting from integers etc as necessary. On array types, data from | | * converting from integers etc as necessary. On array types, data from | |
| * current iteration index is used for formatting. | | * current iteration index is used for formatting. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param fmt Format to apply | | * @param fmt Format to apply | |
| * @param errmsg Error message from conversion (or NULL) | | * @param errmsg Error message from conversion (or NULL) | |
| | | | |
| skipping to change at line 242 | | skipping to change at line 246 | |
| char *rpmtdFormat(rpmtd td, rpmtdFormats fmt, const char *errmsg); | | char *rpmtdFormat(rpmtd td, rpmtdFormats fmt, const char *errmsg); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Set container tag and type. | | * Set container tag and type. | |
| * For empty container, any valid tag can be set. If the container has | | * For empty container, any valid tag can be set. If the container has | |
| * data, changing is only permitted to tag of same type. | | * data, changing is only permitted to tag of same type. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag New tag | | * @param tag New tag | |
| * @return 1 on success, 0 on error | | * @return 1 on success, 0 on error | |
| */ | | */ | |
|
| int rpmtdSetTag(rpmtd td, rpmTag tag); | | int rpmtdSetTag(rpmtd td, rpmTagVal tag); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from uint8_t pointer. | | * Construct tag container from uint8_t pointer. | |
| * Tag type is checked to be of compatible type (CHAR, INT8 or BIN). | | * Tag type is checked to be of compatible type (CHAR, INT8 or BIN). | |
| * For non-array types (BIN is a special case of INT8 array) | | * For non-array types (BIN is a special case of INT8 array) | |
| * count must be exactly 1. | | * count must be exactly 1. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param data Pointer to uint8_t (value or array) | | * @param data Pointer to uint8_t (value or array) | |
| * @param count Number of entries | | * @param count Number of entries | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromUint8(rpmtd td, rpmTag tag, uint8_t *data, rpm_count_t count); | | int rpmtdFromUint8(rpmtd td, rpmTagVal tag, uint8_t *data, rpm_count_t coun
t); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from uint16_t pointer. | | * Construct tag container from uint16_t pointer. | |
| * Tag type is checked to be of INT16 type. For non-array types count | | * Tag type is checked to be of INT16 type. For non-array types count | |
| * must be exactly 1. | | * must be exactly 1. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param data Pointer to uint16_t (value or array) | | * @param data Pointer to uint16_t (value or array) | |
| * @param count Number of entries | | * @param count Number of entries | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromUint16(rpmtd td, rpmTag tag, uint16_t *data, rpm_count_t count
); | | int rpmtdFromUint16(rpmtd td, rpmTagVal tag, uint16_t *data, rpm_count_t co
unt); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from uint32_t pointer. | | * Construct tag container from uint32_t pointer. | |
| * Tag type is checked to be of INT32 type. For non-array types count | | * Tag type is checked to be of INT32 type. For non-array types count | |
| * must be exactly 1. | | * must be exactly 1. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param data Pointer to uint32_t (value or array) | | * @param data Pointer to uint32_t (value or array) | |
| * @param count Number of entries | | * @param count Number of entries | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromUint32(rpmtd td, rpmTag tag, uint32_t *data, rpm_count_t count
); | | int rpmtdFromUint32(rpmtd td, rpmTagVal tag, uint32_t *data, rpm_count_t co
unt); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from uint64_t pointer. | | * Construct tag container from uint64_t pointer. | |
| * Tag type is checked to be of INT64 type. For non-array types count | | * Tag type is checked to be of INT64 type. For non-array types count | |
| * must be exactly 1. | | * must be exactly 1. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param data Pointer to uint64_t (value or array) | | * @param data Pointer to uint64_t (value or array) | |
| * @param count Number of entries | | * @param count Number of entries | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromUint64(rpmtd td, rpmTag tag, uint64_t *data, rpm_count_t count
); | | int rpmtdFromUint64(rpmtd td, rpmTagVal tag, uint64_t *data, rpm_count_t co
unt); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from a string. | | * Construct tag container from a string. | |
| * Tag type is checked to be of string type. | | * Tag type is checked to be of string type. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param data String to use | | * @param data String to use | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromString(rpmtd td, rpmTag tag, const char *data); | | int rpmtdFromString(rpmtd td, rpmTagVal tag, const char *data); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from a string array. | | * Construct tag container from a string array. | |
| * Tag type is checked to be of string or string array type. For non-array | | * Tag type is checked to be of string or string array type. For non-array | |
| * types count must be exactly 1. | | * types count must be exactly 1. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param data Pointer to string array | | * @param data Pointer to string array | |
| * @param count Number of entries | | * @param count Number of entries | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromStringArray(rpmtd td, rpmTag tag, const char **data, rpm_count
_t count); | | int rpmtdFromStringArray(rpmtd td, rpmTagVal tag, const char **data, rpm_co
unt_t count); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from ARGV_t array. | | * Construct tag container from ARGV_t array. | |
| * Tag type is checked to be of string array type and array is checked | | * Tag type is checked to be of string array type and array is checked | |
| * to be non-empty. | | * to be non-empty. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param argv ARGV array | | * @param argv ARGV array | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromArgv(rpmtd td, rpmTag tag, ARGV_t argv); | | int rpmtdFromArgv(rpmtd td, rpmTagVal tag, ARGV_t argv); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Construct tag container from ARGI_t array. | | * Construct tag container from ARGI_t array. | |
| * Tag type is checked to be of integer array type and array is checked | | * Tag type is checked to be of integer array type and array is checked | |
| * to be non-empty. | | * to be non-empty. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @param tag Rpm tag to construct | | * @param tag Rpm tag to construct | |
| * @param argi ARGI array | | * @param argi ARGI array | |
| * @return 1 on success, 0 on error (eg wrong type) | | * @return 1 on success, 0 on error (eg wrong type) | |
| */ | | */ | |
|
| int rpmtdFromArgi(rpmtd td, rpmTag tag, ARGI_t argi); | | int rpmtdFromArgi(rpmtd td, rpmTagVal tag, ARGI_t argi); | |
| | | | |
| /* \ingroup rpmtd | | /* \ingroup rpmtd | |
| * Perform deep copy of container. | | * Perform deep copy of container. | |
| * Create a modifiable copy of tag data container (on string arrays each | | * Create a modifiable copy of tag data container (on string arrays each | |
| * string is separately allocated) | | * string is separately allocated) | |
| * @todo Only string arrays types are supported currently | | * @todo Only string arrays types are supported currently | |
| * @param td Container to copy | | * @param td Container to copy | |
| * @return New container or NULL on error | | * @return New container or NULL on error | |
| */ | | */ | |
| rpmtd rpmtdDup(rpmtd td); | | rpmtd rpmtdDup(rpmtd td); | |
| | | | |
End of changes. 14 change blocks. |
| 14 lines changed or deleted | | 19 lines changed or added | |
|
| rpmte.h | | rpmte.h | |
| #ifndef H_RPMTE | | #ifndef H_RPMTE | |
| #define H_RPMTE | | #define H_RPMTE | |
| | | | |
| /** \ingroup rpmts rpmte | | /** \ingroup rpmts rpmte | |
| * \file lib/rpmte.h | | * \file lib/rpmte.h | |
| * Structures used for an "rpmte" transaction element. | | * Structures used for an "rpmte" transaction element. | |
| */ | | */ | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
|
| | | #include <rpm/argv.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| /** | | | |
| */ | | | |
| extern int _rpmte_debug; | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Transaction element ordering chain linkage. | | | |
| */ | | | |
| typedef struct tsortInfo_s * tsortInfo; | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Transaction element iterator. | | | |
| */ | | | |
| typedef struct rpmtsi_s * rpmtsi; | | | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Transaction element type. | | * Transaction element type. | |
| */ | | */ | |
| typedef enum rpmElementType_e { | | typedef enum rpmElementType_e { | |
| TR_ADDED = (1 << 0), /*!< Package will be installed. */ | | TR_ADDED = (1 << 0), /*!< Package will be installed. */ | |
| TR_REMOVED = (1 << 1) /*!< Package will be removed. */ | | TR_REMOVED = (1 << 1) /*!< Package will be removed. */ | |
| } rpmElementType; | | } rpmElementType; | |
| | | | |
|
| /** \ingroup rpmte | | typedef rpmFlags rpmElementTypes; | |
| * Destroy a transaction element. | | | |
| * @param te transaction element | | | |
| * @return NULL always | | | |
| */ | | | |
| rpmte rpmteFree(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Create a transaction element. | | | |
| * @param ts transaction set | | | |
| * @param h header | | | |
| * @param type TR_ADDED/TR_REMOVED | | | |
| * @param key (TR_ADDED) package retrieval key (e.g. file name) | | | |
| * @param relocs (TR_ADDED) package file relocations | | | |
| * @param dboffset unused | | | |
| * @return new transaction element | | | |
| */ | | | |
| rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, | | | |
| fnpyKey key, | | | |
| rpmRelocation * relocs, | | | |
| int dboffset); | | | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve header from transaction element. | | * Retrieve header from transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
|
| * @return header | | * @return header (new reference) | |
| */ | | */ | |
| Header rpmteHeader(rpmte te); | | Header rpmteHeader(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Save header into transaction element. | | * Save header into transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @param h header | | * @param h header | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| Header rpmteSetHeader(rpmte te, Header h); | | Header rpmteSetHeader(rpmte te, Header h); | |
| | | | |
| skipping to change at line 169 | | skipping to change at line 136 | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve size in bytes of package file. | | * Retrieve size in bytes of package file. | |
| * @todo Signature header is estimated at 256b. | | * @todo Signature header is estimated at 256b. | |
| * @param te transaction element | | * @param te transaction element | |
| * @return size in bytes of package file. | | * @return size in bytes of package file. | |
| */ | | */ | |
| rpm_loff_t rpmtePkgFileSize(rpmte te); | | rpm_loff_t rpmtePkgFileSize(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Retrieve dependency tree depth of transaction element. | | | |
| * @param te transaction element | | | |
| * @return depth | | | |
| */ | | | |
| int rpmteDepth(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Set dependency tree depth of transaction element. | | | |
| * @param te transaction element | | | |
| * @param ndepth new depth | | | |
| * @return previous depth | | | |
| */ | | | |
| int rpmteSetDepth(rpmte te, int ndepth); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Retrieve dependency tree breadth of transaction element. | | | |
| * @param te transaction element | | | |
| * @return breadth | | | |
| */ | | | |
| int rpmteBreadth(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Set dependency tree breadth of transaction element. | | | |
| * @param te transaction element | | | |
| * @param nbreadth new breadth | | | |
| * @return previous breadth | | | |
| */ | | | |
| int rpmteSetBreadth(rpmte te, int nbreadth); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Retrieve tsort no. of predecessors of transaction element. | | | |
| * @param te transaction element | | | |
| * @return no. of predecessors | | | |
| */ | | | |
| int rpmteNpreds(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Set tsort no. of predecessors of transaction element. | | | |
| * @param te transaction element | | | |
| * @param npreds new no. of predecessors | | | |
| * @return previous no. of predecessors | | | |
| */ | | | |
| int rpmteSetNpreds(rpmte te, int npreds); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Retrieve tree index of transaction element. | | | |
| * @param te transaction element | | | |
| * @return tree index | | | |
| */ | | | |
| int rpmteTree(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Set tree index of transaction element. | | | |
| * @param te transaction element | | | |
| * @param ntree new tree index | | | |
| * @return previous tree index | | | |
| */ | | | |
| int rpmteSetTree(rpmte te, int ntree); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Retrieve parent transaction element. | | * Retrieve parent transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @return parent transaction element | | * @return parent transaction element | |
| */ | | */ | |
| rpmte rpmteParent(rpmte te); | | rpmte rpmteParent(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Set parent transaction element. | | * Set parent transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @param pte new parent transaction element | | * @param pte new parent transaction element | |
| * @return previous parent transaction element | | * @return previous parent transaction element | |
| */ | | */ | |
| rpmte rpmteSetParent(rpmte te, rpmte pte); | | rpmte rpmteSetParent(rpmte te, rpmte pte); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Retrieve number of children of transaction element. | | * Return problem set info of transaction element. | |
| * @param te transaction element | | | |
| * @return tree index | | | |
| */ | | | |
| int rpmteDegree(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Set number of children of transaction element. | | | |
| * @param te transaction element | | | |
| * @param ndegree new number of children | | | |
| * @return previous number of children | | | |
| */ | | | |
| int rpmteSetDegree(rpmte te, int ndegree); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Retrieve tsort info for transaction element. | | | |
| * @param te transaction element | | | |
| * @return tsort info | | | |
| */ | | | |
| tsortInfo rpmteTSI(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Destroy tsort info of transaction element. | | | |
| * @param te transaction element | | * @param te transaction element | |
|
| | | * @return problem set (or NULL if none) | |
| */ | | */ | |
|
| void rpmteFreeTSI(rpmte te); | | rpmps rpmteProblems(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Initialize tsort info of transaction element. | | * Destroy problem set info of transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| */ | | */ | |
|
| void rpmteNewTSI(rpmte te); | | void rpmteCleanProblems(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Destroy dependency set info of transaction element. | | * Destroy dependency set info of transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| */ | | */ | |
| void rpmteCleanDS(rpmte te); | | void rpmteCleanDS(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Set dependent element of TR_REMOVED transaction element. | | * Set dependent element of TR_REMOVED transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| | | | |
| skipping to change at line 326 | | skipping to change at line 212 | |
| const char * rpmteNEVR(rpmte te); | | const char * rpmteNEVR(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve name-[epoch:]version-release.arch string from transaction eleme
nt. | | * Retrieve name-[epoch:]version-release.arch string from transaction eleme
nt. | |
| * @param te transaction element | | * @param te transaction element | |
| * @return name-[epoch:]version-release.arch string | | * @return name-[epoch:]version-release.arch string | |
| */ | | */ | |
| const char * rpmteNEVRA(rpmte te); | | const char * rpmteNEVRA(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Retrieve file handle from transaction element. | | | |
| * @param te transaction element | | | |
| * @return file handle | | | |
| */ | | | |
| FD_t rpmteFd(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Retrieve key from transaction element. | | * Retrieve key from transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @return key | | * @return key | |
| */ | | */ | |
| fnpyKey rpmteKey(rpmte te); | | fnpyKey rpmteKey(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Return failed status of transaction element. | | * Return failure status of transaction element. | |
| | | * If the element itself failed, this is 1, larger count means one of | |
| | | * it's parents failed. | |
| * @param te transaction element | | * @param te transaction element | |
|
| * @return 1 if transaction element (or its parents) failed | | * @return number of failures for this transaction element | |
| */ | | */ | |
| int rpmteFailed(rpmte te); | | int rpmteFailed(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve dependency tag set from transaction element. | | * Retrieve dependency tag set from transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @param tag dependency tag | | * @param tag dependency tag | |
| * @return dependency tag set | | * @return dependency tag set | |
| */ | | */ | |
|
| rpmds rpmteDS(rpmte te, rpmTag tag); | | rpmds rpmteDS(rpmte te, rpmTagVal tag); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve file info tag set from transaction element. | | * Retrieve file info tag set from transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @return file info tag set | | * @return file info tag set | |
| */ | | */ | |
| rpmfi rpmteFI(rpmte te); | | rpmfi rpmteFI(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Calculate transaction element dependency colors/refs from file info. | | * Retrieve list of collections | |
| * @param te transaction element | | * @param te transaction element | |
|
| * @param tag dependency tag (RPMTAG_PROVIDENAME, RPMTAG_REQUIRENA | | * @return list of collections | |
| ME) | | | |
| */ | | | |
| void rpmteColorDS(rpmte te, rpmTag tag); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Return transaction element index. | | | |
| * @param tsi transaction element iterator | | | |
| * @return transaction element index | | | |
| */ | | | |
| int rpmtsiOc(rpmtsi tsi); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Destroy transaction element iterator. | | | |
| * @param tsi transaction element iterator | | | |
| * @return NULL always | | | |
| */ | | | |
| rpmtsi rpmtsiFree(rpmtsi tsi); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Create transaction element iterator. | | | |
| * @param ts transaction set | | | |
| * @return transaction element iterator | | | |
| */ | | */ | |
|
| rpmtsi rpmtsiInit(rpmts ts); | | ARGV_const_t rpmteCollections(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Return next transaction element of type. | | * Determine a transaction element is part of a collection | |
| * @param tsi transaction element iterator | | * @param te transaction element | |
| * @param type transaction element type selector (0 for any) | | * @param collname collection name | |
| * @return next transaction element of type, NULL on terminatio | | * @return 1 if collname is part of a collection, 0 if not | |
| n | | | |
| */ | | */ | |
|
| rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type); | | int rpmteHasCollection(rpmte te, const char * collname); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMTE */ | | #endif /* H_RPMTE */ | |
| | | | |
End of changes. 19 change blocks. |
| 163 lines changed or deleted | | 21 lines changed or added | |
|
| rpmts.h | | rpmts.h | |
| | | | |
| skipping to change at line 12 | | skipping to change at line 12 | |
| #define H_RPMTS | | #define H_RPMTS | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * \file lib/rpmts.h | | * \file lib/rpmts.h | |
| * Structures and prototypes used for an "rpmts" transaction set. | | * Structures and prototypes used for an "rpmts" transaction set. | |
| */ | | */ | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
|
| | | #include <rpm/rpmte.h> | |
| #include <rpm/rpmps.h> | | #include <rpm/rpmps.h> | |
| #include <rpm/rpmsw.h> | | #include <rpm/rpmsw.h> | |
| #include <rpm/rpmpgp.h> | | #include <rpm/rpmpgp.h> | |
| #include <rpm/rpmfi.h> | | #include <rpm/rpmfi.h> | |
| #include <rpm/rpmcallback.h> | | #include <rpm/rpmcallback.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| extern int _rpmts_debug; | | | |
| extern int _rpmts_stats; | | extern int _rpmts_stats; | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Bit(s) to control rpmtsRun() operation. | | * Bit(s) to control rpmtsRun() operation. | |
| */ | | */ | |
|
| typedef enum rpmtransFlags_e { | | enum rpmtransFlags_e { | |
| RPMTRANS_FLAG_NONE = 0, | | RPMTRANS_FLAG_NONE = 0, | |
| RPMTRANS_FLAG_TEST = (1 << 0), /*!< from --test */ | | RPMTRANS_FLAG_TEST = (1 << 0), /*!< from --test */ | |
| RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), /*!< don't process payload *
/ | | RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), /*!< don't process payload *
/ | |
| RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), /*!< from --noscripts */ | | RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), /*!< from --noscripts */ | |
| RPMTRANS_FLAG_JUSTDB = (1 << 3), /*!< from --justdb */ | | RPMTRANS_FLAG_JUSTDB = (1 << 3), /*!< from --justdb */ | |
| RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), /*!< from --notriggers */ | | RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), /*!< from --notriggers */ | |
| RPMTRANS_FLAG_NODOCS = (1 << 5), /*!< from --excludedocs */ | | RPMTRANS_FLAG_NODOCS = (1 << 5), /*!< from --excludedocs */ | |
| RPMTRANS_FLAG_ALLFILES = (1 << 6), /*!< from --allfiles */ | | RPMTRANS_FLAG_ALLFILES = (1 << 6), /*!< from --allfiles */ | |
|
| RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), /*!< @todo Document. */ | | /* bit 7 unused */ | |
| RPMTRANS_FLAG_NOCONTEXTS = (1 << 8), /*!< from --nocontexts */ | | RPMTRANS_FLAG_NOCONTEXTS = (1 << 8), /*!< from --nocontexts */ | |
|
| RPMTRANS_FLAG_DIRSTASH = (1 << 9), /*!< obsolete, unused */ | | /* bits 9-15 unused */ | |
| RPMTRANS_FLAG_REPACKAGE = (1 << 10), /*!< obsolete, unused */ | | | |
| | | | |
| RPMTRANS_FLAG_PKGCOMMIT = (1 << 11), | | | |
| RPMTRANS_FLAG_PKGUNDO = (1 << 12), | | | |
| RPMTRANS_FLAG_COMMIT = (1 << 13), | | | |
| RPMTRANS_FLAG_UNDO = (1 << 14), | | | |
| RPMTRANS_FLAG_REVERSE = (1 << 15), | | | |
| | | | |
| RPMTRANS_FLAG_NOTRIGGERPREIN= (1 << 16), /*!< from --notriggerprein *
/ | | RPMTRANS_FLAG_NOTRIGGERPREIN= (1 << 16), /*!< from --notriggerprein *
/ | |
| RPMTRANS_FLAG_NOPRE = (1 << 17), /*!< from --nopre */ | | RPMTRANS_FLAG_NOPRE = (1 << 17), /*!< from --nopre */ | |
| RPMTRANS_FLAG_NOPOST = (1 << 18), /*!< from --nopost */ | | RPMTRANS_FLAG_NOPOST = (1 << 18), /*!< from --nopost */ | |
| RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19), /*!< from --notriggerin */ | | RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19), /*!< from --notriggerin */ | |
| RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), /*!< from --notriggerun */ | | RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), /*!< from --notriggerun */ | |
| RPMTRANS_FLAG_NOPREUN = (1 << 21), /*!< from --nopreun */ | | RPMTRANS_FLAG_NOPREUN = (1 << 21), /*!< from --nopreun */ | |
| RPMTRANS_FLAG_NOPOSTUN = (1 << 22), /*!< from --nopostun */ | | RPMTRANS_FLAG_NOPOSTUN = (1 << 22), /*!< from --nopostun */ | |
| RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), /*!< from --notriggerpostun
*/ | | RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), /*!< from --notriggerpostun
*/ | |
|
| RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), | | /* bits 24-25 unused */ | |
| RPMTRANS_FLAG_APPLYONLY = (1 << 25), | | RPMTRANS_FLAG_NOCOLLECTIONS = (1 << 26), /*!< from --nocollec | |
| | | tions */ | |
| RPMTRANS_FLAG_NOMD5 = (1 << 27), /*!< from --nomd5 */ | | RPMTRANS_FLAG_NOMD5 = (1 << 27), /*!< from --nomd5 */ | |
| RPMTRANS_FLAG_NOFILEDIGEST = (1 << 27), /*!< from --nofiledigest (al
ias to --nomd5) */ | | RPMTRANS_FLAG_NOFILEDIGEST = (1 << 27), /*!< from --nofiledigest (al
ias to --nomd5) */ | |
|
| RPMTRANS_FLAG_NOSUGGEST = (1 << 28), /*!< from --nosuggest */ | | /* bits 28-29 unused */ | |
| RPMTRANS_FLAG_ADDINDEPS = (1 << 29), /*!< from --aid */ | | | |
| RPMTRANS_FLAG_NOCONFIGS = (1 << 30), /*!< from --noconfigs */ | | RPMTRANS_FLAG_NOCONFIGS = (1 << 30), /*!< from --noconfigs */ | |
| RPMTRANS_FLAG_DEPLOOPS = (1 << 31) /*!< from --deploops */ | | RPMTRANS_FLAG_DEPLOOPS = (1 << 31) /*!< from --deploops */ | |
|
| } rpmtransFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmtransFlags; | |
| | | | |
| #define _noTransScripts \ | | #define _noTransScripts \ | |
| ( RPMTRANS_FLAG_NOPRE | \ | | ( RPMTRANS_FLAG_NOPRE | \ | |
| RPMTRANS_FLAG_NOPOST | \ | | RPMTRANS_FLAG_NOPOST | \ | |
| RPMTRANS_FLAG_NOPREUN | \ | | RPMTRANS_FLAG_NOPREUN | \ | |
| RPMTRANS_FLAG_NOPOSTUN \ | | RPMTRANS_FLAG_NOPOSTUN \ | |
| ) | | ) | |
| | | | |
| #define _noTransTriggers \ | | #define _noTransTriggers \ | |
| ( RPMTRANS_FLAG_NOTRIGGERPREIN | \ | | ( RPMTRANS_FLAG_NOTRIGGERPREIN | \ | |
| RPMTRANS_FLAG_NOTRIGGERIN | \ | | RPMTRANS_FLAG_NOTRIGGERIN | \ | |
| RPMTRANS_FLAG_NOTRIGGERUN | \ | | RPMTRANS_FLAG_NOTRIGGERUN | \ | |
| RPMTRANS_FLAG_NOTRIGGERPOSTUN \ | | RPMTRANS_FLAG_NOTRIGGERPOSTUN \ | |
| ) | | ) | |
| | | | |
|
| | | /* Avoid unnecessary breakage for stuff referring to these unused flags */ | |
| | | #define RPMTRANS_FLAG_NOPAYLOAD 0 | |
| | | #define RPMTRANS_FLAG_APPLYONLY 0 | |
| | | #define RPMTRANS_FLAG_KEEPOBSOLETE 0 | |
| | | #define RPMTRANS_FLAG_DIRSTASH 0 | |
| | | #define RPMTRANS_FLAG_REPACKAGE 0 | |
| | | #define RPMTRANS_FLAG_PKGCOMMIT 0 | |
| | | #define RPMTRANS_FLAG_PKGUNDO 0 | |
| | | #define RPMTRANS_FLAG_COMMIT 0 | |
| | | #define RPMTRANS_FLAG_UNDO 0 | |
| | | #define RPMTRANS_FLAG_REVERSE 0 | |
| | | #define RPMTRANS_FLAG_NOSUGGEST 0 | |
| | | #define RPMTRANS_FLAG_ADDINDEPS 0 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Bit(s) to control digest and signature verification. | | * Bit(s) to control digest and signature verification. | |
| */ | | */ | |
|
| typedef enum rpmVSFlags_e { | | enum rpmVSFlags_e { | |
| RPMVSF_DEFAULT = 0, | | RPMVSF_DEFAULT = 0, | |
| RPMVSF_NOHDRCHK = (1 << 0), | | RPMVSF_NOHDRCHK = (1 << 0), | |
| RPMVSF_NEEDPAYLOAD = (1 << 1), | | RPMVSF_NEEDPAYLOAD = (1 << 1), | |
| /* bit(s) 2-7 unused */ | | /* bit(s) 2-7 unused */ | |
| RPMVSF_NOSHA1HEADER = (1 << 8), | | RPMVSF_NOSHA1HEADER = (1 << 8), | |
| RPMVSF_NOMD5HEADER = (1 << 9), /* unimplemented */ | | RPMVSF_NOMD5HEADER = (1 << 9), /* unimplemented */ | |
| RPMVSF_NODSAHEADER = (1 << 10), | | RPMVSF_NODSAHEADER = (1 << 10), | |
| RPMVSF_NORSAHEADER = (1 << 11), /* unimplemented */ | | RPMVSF_NORSAHEADER = (1 << 11), /* unimplemented */ | |
| /* bit(s) 12-15 unused */ | | /* bit(s) 12-15 unused */ | |
| RPMVSF_NOSHA1 = (1 << 16), /* unimplemented */ | | RPMVSF_NOSHA1 = (1 << 16), /* unimplemented */ | |
| RPMVSF_NOMD5 = (1 << 17), | | RPMVSF_NOMD5 = (1 << 17), | |
| RPMVSF_NODSA = (1 << 18), | | RPMVSF_NODSA = (1 << 18), | |
| RPMVSF_NORSA = (1 << 19) | | RPMVSF_NORSA = (1 << 19) | |
| /* bit(s) 16-31 unused */ | | /* bit(s) 16-31 unused */ | |
|
| } rpmVSFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmVSFlags; | |
| | | | |
| #define _RPMVSF_NODIGESTS \ | | #define _RPMVSF_NODIGESTS \ | |
| ( RPMVSF_NOSHA1HEADER | \ | | ( RPMVSF_NOSHA1HEADER | \ | |
| RPMVSF_NOMD5HEADER | \ | | RPMVSF_NOMD5HEADER | \ | |
| RPMVSF_NOSHA1 | \ | | RPMVSF_NOSHA1 | \ | |
| RPMVSF_NOMD5 ) | | RPMVSF_NOMD5 ) | |
| | | | |
| #define _RPMVSF_NOSIGNATURES \ | | #define _RPMVSF_NOSIGNATURES \ | |
| ( RPMVSF_NODSAHEADER | \ | | ( RPMVSF_NODSAHEADER | \ | |
| RPMVSF_NORSAHEADER | \ | | RPMVSF_NORSAHEADER | \ | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 199 | |
| * | | * | |
| * - setup the rpm root dir via rpmtsSetRoot(). | | * - setup the rpm root dir via rpmtsSetRoot(). | |
| * - setup the rpm notify callback via rpmtsSetNotifyCallback(). | | * - setup the rpm notify callback via rpmtsSetNotifyCallback(). | |
| * - setup the rpm transaction flags via rpmtsSetFlags(). | | * - setup the rpm transaction flags via rpmtsSetFlags(). | |
| * | | * | |
| * Additionally, though not required you may want to: | | * Additionally, though not required you may want to: | |
| * | | * | |
| * - setup the rpm verify signature flags via rpmtsSetVSFlags(). | | * - setup the rpm verify signature flags via rpmtsSetVSFlags(). | |
| * | | * | |
| * @param ts transaction set | | * @param ts transaction set | |
|
| * @param okProbs previously known problems (or NULL) | | * @param okProbs unused | |
| * @param ignoreSet bits to filter problem types | | * @param ignoreSet bits to filter problem types | |
| * @return 0 on success, -1 on error, >0 with newProbs set | | * @return 0 on success, -1 on error, >0 with newProbs set | |
| */ | | */ | |
| int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet); | | int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Unreference a transaction instance. | | | |
| * @param ts transaction set | | | |
| * @param msg | | | |
| * @return NULL always | | | |
| */ | | | |
| rpmts rpmtsUnlink (rpmts ts, | | | |
| const char * msg); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Reference a transaction set instance. | | * Reference a transaction set instance. | |
| * @param ts transaction set | | * @param ts transaction set | |
|
| * @param msg | | | |
| * @return new transaction set reference | | * @return new transaction set reference | |
| */ | | */ | |
|
| rpmts rpmtsLink (rpmts ts, const char * msg); | | rpmts rpmtsLink (rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Close the database used by the transaction. | | * Close the database used by the transaction. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmtsCloseDB(rpmts ts); | | int rpmtsCloseDB(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Open the database used by the transaction. | | * Open the database used by the transaction. | |
| | | | |
| skipping to change at line 271 | | skipping to change at line 269 | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Verify the database used by the transaction. | | * Verify the database used by the transaction. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmtsVerifyDB(rpmts ts); | | int rpmtsVerifyDB(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Return transaction database iterator. | | * Return transaction database iterator. | |
| * @param ts transaction set | | * @param ts transaction set | |
|
| * @param rpmtag rpm tag | | * @param rpmtag database index tag | |
| * @param keyp key data (NULL for sequential access) | | * @param keyp key data (NULL for sequential access) | |
| * @param keylen key data length (0 will use strlen(keyp)) | | * @param keylen key data length (0 will use strlen(keyp)) | |
| * @return NULL on failure | | * @return NULL on failure | |
| */ | | */ | |
|
| rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, | | rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, | |
| const void * keyp, size_t keylen); | | const void * keyp, size_t keylen); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Retrieve pubkey from rpm database. | | | |
| * @param ts rpm transaction | | | |
| * @param dig OpenPGP packet container | | | |
| * @return RPMRC_OK on success, RPMRC_NOKEY if not found | | | |
| */ | | | |
| rpmRC rpmtsFindPubkey(rpmts ts, pgpDig dig) RPM_GNUC_DEPRECATED; | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Import public key packet(s). | | * Import public key packet(s). | |
| * @todo Implicit --update policy for gpg-pubkey headers. | | * @todo Implicit --update policy for gpg-pubkey headers. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param pkt pgp pubkey packet(s) | | * @param pkt pgp pubkey packet(s) | |
| * @param pktlen pgp pubkey length | | * @param pktlen pgp pubkey length | |
| * @return RPMRC_OK/RPMRC_FAIL | | * @return RPMRC_OK/RPMRC_FAIL | |
| */ | | */ | |
| rpmRC rpmtsImportPubkey(rpmts ts, const unsigned char * pkt, size_t pktlen)
; | | rpmRC rpmtsImportPubkey(rpmts ts, const unsigned char * pkt, size_t pktlen)
; | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| | | | |
| skipping to change at line 329 | | skipping to change at line 319 | |
| * @param solveData dependency solver callback data (opaque) | | * @param solveData dependency solver callback data (opaque) | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| int rpmtsSetSolveCallback(rpmts ts, | | int rpmtsSetSolveCallback(rpmts ts, | |
| int (*solve) (rpmts ts, rpmds ds, const void * data), | | int (*solve) (rpmts ts, rpmds ds, const void * data), | |
| const void * solveData); | | const void * solveData); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Return current transaction set problems. | | * Return current transaction set problems. | |
| * @param ts transaction set | | * @param ts transaction set | |
|
| * @return current problem set (or NULL) | | * @return current problem set (or NULL if no problems) | |
| */ | | */ | |
| rpmps rpmtsProblems(rpmts ts); | | rpmps rpmtsProblems(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Clean current transaction problem set. | | * Clean current transaction problem set. | |
| * @param ts transaction set | | * @param ts transaction set | |
| */ | | */ | |
| void rpmtsCleanProblems(rpmts ts); | | void rpmtsCleanProblems(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| | | | |
| skipping to change at line 389 | | skipping to change at line 379 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Set transaction rootDir, i.e. path to chroot(2). | | * Set transaction rootDir, i.e. path to chroot(2). | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param rootDir new transaction rootDir (or NULL) | | * @param rootDir new transaction rootDir (or NULL) | |
| * @return 0 on success, -1 on error (invalid rootDir) | | * @return 0 on success, -1 on error (invalid rootDir) | |
| */ | | */ | |
| int rpmtsSetRootDir(rpmts ts, const char * rootDir); | | int rpmtsSetRootDir(rpmts ts, const char * rootDir); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Get transaction currDir, i.e. current directory before chroot(2). | | | |
| * @param ts transaction set | | | |
| * @return transaction currDir | | | |
| */ | | | |
| const char * rpmtsCurrDir(rpmts ts); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Set transaction currDir, i.e. current directory before chroot(2). | | | |
| * @param ts transaction set | | | |
| * @param currDir new transaction currDir (or NULL) | | | |
| */ | | | |
| void rpmtsSetCurrDir(rpmts ts, const char * currDir); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Get transaction script file handle, i.e. stdout/stderr on scriptlet exec
ution | | * Get transaction script file handle, i.e. stdout/stderr on scriptlet exec
ution | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return transaction script file handle | | * @return transaction script file handle | |
| */ | | */ | |
| FD_t rpmtsScriptFd(rpmts ts); | | FD_t rpmtsScriptFd(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Set transaction script file handle, i.e. stdout/stderr on scriptlet exec
ution | | * Set transaction script file handle, i.e. stdout/stderr on scriptlet exec
ution | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param scriptFd new script file handle (or NULL) | | * @param scriptFd new script file handle (or NULL) | |
| */ | | */ | |
| void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd); | | void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Get selinuxEnabled flag, i.e. is SE linux enabled? | | | |
| * @param ts transaction set | | | |
| * @return selinuxEnabled flag | | | |
| */ | | | |
| int rpmtsSELinuxEnabled(rpmts ts); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Get chrootDone flag, i.e. has chroot(2) been performed? | | | |
| * @param ts transaction set | | | |
| * @return chrootDone flag | | | |
| */ | | | |
| int rpmtsChrootDone(rpmts ts); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Set chrootDone flag, i.e. has chroot(2) been performed? | | | |
| * @param ts transaction set | | | |
| * @param chrootDone new chrootDone flag | | | |
| * @return previous chrootDone flag | | | |
| */ | | | |
| int rpmtsSetChrootDone(rpmts ts, int chrootDone); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Get transaction id, i.e. transaction time stamp. | | * Get transaction id, i.e. transaction time stamp. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return transaction id | | * @return transaction id | |
| */ | | */ | |
| rpm_tid_t rpmtsGetTid(rpmts ts); | | rpm_tid_t rpmtsGetTid(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Set transaction id, i.e. transaction time stamp. | | * Set transaction id, i.e. transaction time stamp. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param tid new transaction id | | * @param tid new transaction id | |
| | | | |
| skipping to change at line 510 | | skipping to change at line 464 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Set transaction flags, i.e. bits that control rpmtsRun(). | | * Set transaction flags, i.e. bits that control rpmtsRun(). | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param transFlags new transaction flags | | * @param transFlags new transaction flags | |
| * @return previous transaction flags | | * @return previous transaction flags | |
| */ | | */ | |
| rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags); | | rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Get spec control structure from transaction set. | | | |
| * @param ts transaction set | | | |
| * @return spec control structure | | | |
| */ | | | |
| rpmSpec rpmtsSpec(rpmts ts); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Set a spec control structure in transaction set. | | | |
| * @param ts transaction set | | | |
| * @param spec new spec control structure | | | |
| * @return previous spec control structure | | | |
| */ | | | |
| rpmSpec rpmtsSetSpec(rpmts ts, rpmSpec spec); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Retrieve color bits of transaction set. | | * Retrieve color bits of transaction set. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return color bits | | * @return color bits | |
| */ | | */ | |
| rpm_color_t rpmtsColor(rpmts ts); | | rpm_color_t rpmtsColor(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Retrieve prefered file color | | * Retrieve prefered file color | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return color bits | | * @return color bits | |
| | | | |
| skipping to change at line 563 | | skipping to change at line 502 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Retrieve operation timestamp from a transaction set. | | * Retrieve operation timestamp from a transaction set. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param opx operation timestamp index | | * @param opx operation timestamp index | |
| * @return pointer to operation timestamp. | | * @return pointer to operation timestamp. | |
| */ | | */ | |
| rpmop rpmtsOp(rpmts ts, rpmtsOpX opx); | | rpmop rpmtsOp(rpmts ts, rpmtsOpX opx); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| | | * Get the plugins associated with a transaction set | |
| | | * @param ts transaction set | |
| | | * @return plugins | |
| | | */ | |
| | | rpmPlugins rpmtsPlugins(rpmts ts); | |
| | | | |
| | | /** \ingroup rpmts | |
| * Set transaction notify callback function and argument. | | * Set transaction notify callback function and argument. | |
| * | | * | |
| * @warning This call must be made before rpmtsRun() for | | * @warning This call must be made before rpmtsRun() for | |
| * install/upgrade/freshen to function correctly. | | * install/upgrade/freshen to function correctly. | |
| * | | * | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param notify progress callback | | * @param notify progress callback | |
| * @param notifyData progress callback private data | | * @param notifyData progress callback private data | |
| * @return 0 on success | | * @return 0 on success | |
| */ | | */ | |
| | | | |
| skipping to change at line 609 | | skipping to change at line 555 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Add package to be erased to transaction set. | | * Add package to be erased to transaction set. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param h header | | * @param h header | |
| * @param dboffset ununsed | | * @param dboffset ununsed | |
| * @return 0 on success, 1 on error (not installed) | | * @return 0 on success, 1 on error (not installed) | |
| */ | | */ | |
| int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset); | | int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset); | |
| | | | |
|
| | | /** \ingroup rpmte | |
| | | * Destroy transaction element iterator. | |
| | | * @param tsi transaction element iterator | |
| | | * @return NULL always | |
| | | */ | |
| | | rpmtsi rpmtsiFree(rpmtsi tsi); | |
| | | | |
| | | /** \ingroup rpmte | |
| | | * Create transaction element iterator. | |
| | | * @param ts transaction set | |
| | | * @return transaction element iterator | |
| | | */ | |
| | | rpmtsi rpmtsiInit(rpmts ts); | |
| | | | |
| | | /** \ingroup rpmte | |
| | | * Return next transaction element of type. | |
| | | * @param tsi transaction element iterator | |
| | | * @param types transaction element type selector (0 for any | |
| | | ) | |
| | | * @return next transaction element of type, NULL on terminatio | |
| | | n | |
| | | */ | |
| | | rpmte rpmtsiNext(rpmtsi tsi, rpmElementTypes types); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMTS */ | | #endif /* H_RPMTS */ | |
| | | | |
End of changes. 24 change blocks. |
| 94 lines changed or deleted | | 65 lines changed or added | |
|
| rpmvf.h | | rpmvf.h | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| */ | | */ | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmvf | | /** \ingroup rpmvf | |
| * Bit(s) for rpmVerifyFile() attributes and result. | | * Bit(s) for rpmVerifyFile() attributes and result. | |
| */ | | */ | |
|
| typedef enum rpmVerifyAttrs_e { | | enum rpmVerifyAttrs_e { | |
| RPMVERIFY_NONE = 0, /*!< */ | | RPMVERIFY_NONE = 0, /*!< */ | |
| RPMVERIFY_MD5 = (1 << 0), /*!< from %verify(md5) - obsolete */ | | RPMVERIFY_MD5 = (1 << 0), /*!< from %verify(md5) - obsolete */ | |
| RPMVERIFY_FILEDIGEST= (1 << 0), /*!< from %verify(filedigest) */ | | RPMVERIFY_FILEDIGEST= (1 << 0), /*!< from %verify(filedigest) */ | |
| RPMVERIFY_FILESIZE = (1 << 1), /*!< from %verify(size) */ | | RPMVERIFY_FILESIZE = (1 << 1), /*!< from %verify(size) */ | |
| RPMVERIFY_LINKTO = (1 << 2), /*!< from %verify(link) */ | | RPMVERIFY_LINKTO = (1 << 2), /*!< from %verify(link) */ | |
| RPMVERIFY_USER = (1 << 3), /*!< from %verify(user) */ | | RPMVERIFY_USER = (1 << 3), /*!< from %verify(user) */ | |
| RPMVERIFY_GROUP = (1 << 4), /*!< from %verify(group) */ | | RPMVERIFY_GROUP = (1 << 4), /*!< from %verify(group) */ | |
| RPMVERIFY_MTIME = (1 << 5), /*!< from %verify(mtime) */ | | RPMVERIFY_MTIME = (1 << 5), /*!< from %verify(mtime) */ | |
| RPMVERIFY_MODE = (1 << 6), /*!< from %verify(mode) */ | | RPMVERIFY_MODE = (1 << 6), /*!< from %verify(mode) */ | |
| RPMVERIFY_RDEV = (1 << 7), /*!< from %verify(rdev) */ | | RPMVERIFY_RDEV = (1 << 7), /*!< from %verify(rdev) */ | |
| RPMVERIFY_CAPS = (1 << 8), /*!< from %verify(caps) */ | | RPMVERIFY_CAPS = (1 << 8), /*!< from %verify(caps) */ | |
| /* bits 9-14 unused, reserved for rpmVerifyAttrs */ | | /* bits 9-14 unused, reserved for rpmVerifyAttrs */ | |
| RPMVERIFY_CONTEXTS = (1 << 15), /*!< verify: from --nocontexts */ | | RPMVERIFY_CONTEXTS = (1 << 15), /*!< verify: from --nocontexts */ | |
| /* bits 16-22 used in rpmVerifyFlags */ | | /* bits 16-22 used in rpmVerifyFlags */ | |
| /* bits 23-27 used in rpmQueryFlags */ | | /* bits 23-27 used in rpmQueryFlags */ | |
| RPMVERIFY_READLINKFAIL= (1 << 28), /*!< readlink failed */ | | RPMVERIFY_READLINKFAIL= (1 << 28), /*!< readlink failed */ | |
| RPMVERIFY_READFAIL = (1 << 29), /*!< file read failed */ | | RPMVERIFY_READFAIL = (1 << 29), /*!< file read failed */ | |
| RPMVERIFY_LSTATFAIL = (1 << 30), /*!< lstat failed */ | | RPMVERIFY_LSTATFAIL = (1 << 30), /*!< lstat failed */ | |
| RPMVERIFY_LGETFILECONFAIL = (1 << 31) /*!< lgetfilecon failed */ | | RPMVERIFY_LGETFILECONFAIL = (1 << 31) /*!< lgetfilecon failed */ | |
|
| } rpmVerifyAttrs; | | }; | |
| | | | |
| | | typedef rpmFlags rpmVerifyAttrs; | |
| | | | |
| #define RPMVERIFY_ALL ~(RPMVERIFY_NONE) | | #define RPMVERIFY_ALL ~(RPMVERIFY_NONE) | |
| #define RPMVERIFY_FAILURES \ | | #define RPMVERIFY_FAILURES \ | |
| (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_
LGETFILECONFAIL) | | (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_
LGETFILECONFAIL) | |
| | | | |
| /** \ingroup rpmvf | | /** \ingroup rpmvf | |
| * Bit(s) to control rpmVerify() operation | | * Bit(s) to control rpmVerify() operation | |
| */ | | */ | |
|
| typedef enum rpmVerifyFlags_e { | | enum rpmVerifyFlags_e { | |
| VERIFY_DEFAULT = 0, /*!< */ | | VERIFY_DEFAULT = 0, /*!< */ | |
| VERIFY_MD5 = (1 << 0), /*!< from --nomd5 - obsolete */ | | VERIFY_MD5 = (1 << 0), /*!< from --nomd5 - obsolete */ | |
| VERIFY_FILEDIGEST = (1 << 0), /*!< from --nofiledigest */ | | VERIFY_FILEDIGEST = (1 << 0), /*!< from --nofiledigest */ | |
| VERIFY_SIZE = (1 << 1), /*!< from --nosize */ | | VERIFY_SIZE = (1 << 1), /*!< from --nosize */ | |
| VERIFY_LINKTO = (1 << 2), /*!< from --nolinkto */ | | VERIFY_LINKTO = (1 << 2), /*!< from --nolinkto */ | |
| VERIFY_USER = (1 << 3), /*!< from --nouser */ | | VERIFY_USER = (1 << 3), /*!< from --nouser */ | |
| VERIFY_GROUP = (1 << 4), /*!< from --nogroup */ | | VERIFY_GROUP = (1 << 4), /*!< from --nogroup */ | |
| VERIFY_MTIME = (1 << 5), /*!< from --nomtime */ | | VERIFY_MTIME = (1 << 5), /*!< from --nomtime */ | |
| VERIFY_MODE = (1 << 6), /*!< from --nomode */ | | VERIFY_MODE = (1 << 6), /*!< from --nomode */ | |
| VERIFY_RDEV = (1 << 7), /*!< from --nodev */ | | VERIFY_RDEV = (1 << 7), /*!< from --nodev */ | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 75 | |
| VERIFY_DIGEST = (1 << 19), /*!< verify: from --nodigest */ | | VERIFY_DIGEST = (1 << 19), /*!< verify: from --nodigest */ | |
| VERIFY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */ | | VERIFY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */ | |
| VERIFY_PATCHES = (1 << 21), /*!< verify: from --nopatches */ | | VERIFY_PATCHES = (1 << 21), /*!< verify: from --nopatches */ | |
| VERIFY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */ | | VERIFY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */ | |
| VERIFY_FOR_LIST = (1 << 23), /*!< query: from --list */ | | VERIFY_FOR_LIST = (1 << 23), /*!< query: from --list */ | |
| VERIFY_FOR_STATE = (1 << 24), /*!< query: from --state */ | | VERIFY_FOR_STATE = (1 << 24), /*!< query: from --state */ | |
| VERIFY_FOR_DOCS = (1 << 25), /*!< query: from --docfiles */ | | VERIFY_FOR_DOCS = (1 << 25), /*!< query: from --docfiles */ | |
| VERIFY_FOR_CONFIG = (1 << 26), /*!< query: from --configfiles */ | | VERIFY_FOR_CONFIG = (1 << 26), /*!< query: from --configfiles */ | |
| VERIFY_FOR_DUMPFILES= (1 << 27) /*!< query: from --dump */ | | VERIFY_FOR_DUMPFILES= (1 << 27) /*!< query: from --dump */ | |
| /* bits 28-31 used in rpmVerifyAttrs */ | | /* bits 28-31 used in rpmVerifyAttrs */ | |
|
| } rpmVerifyFlags; | | }; | |
| | | | |
| | | typedef rpmFlags rpmVerifyFlags; | |
| | | | |
| #define VERIFY_ATTRS \ | | #define VERIFY_ATTRS \ | |
| ( VERIFY_FILEDIGEST | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_
GROUP | \ | | ( VERIFY_FILEDIGEST | VERIFY_SIZE | VERIFY_LINKTO | VERIFY_USER | VERIFY_
GROUP | \ | |
| VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS | VERIFY_CAP
S ) | | VERIFY_MTIME | VERIFY_MODE | VERIFY_RDEV | VERIFY_CONTEXTS | VERIFY_CAP
S ) | |
| #define VERIFY_ALL \ | | #define VERIFY_ALL \ | |
| ( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGE
ST |\ | | ( VERIFY_ATTRS | VERIFY_FILES | VERIFY_DEPS | VERIFY_SCRIPT | VERIFY_DIGE
ST |\ | |
| VERIFY_SIGNATURE | VERIFY_HDRCHK ) | | VERIFY_SIGNATURE | VERIFY_HDRCHK ) | |
| | | | |
| /** \ingroup rpmvf | | /** \ingroup rpmvf | |
| * Verify file attributes (including digest). | | * Verify file attributes (including digest). | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 9 lines changed or added | |
|