| header.h | | header.h | |
| | | | |
| skipping to change at line 311 | | skipping to change at line 311 | |
| HeaderIterator headerFreeIterator(HeaderIterator hi); | | HeaderIterator headerFreeIterator(HeaderIterator hi); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Create header tag iterator. | | * Create header tag iterator. | |
| * @param h header | | * @param h header | |
| * @return header tag iterator | | * @return header tag iterator | |
| */ | | */ | |
| HeaderIterator headerInitIterator(Header h); | | HeaderIterator headerInitIterator(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
|
| * Return next tag from header. | | * Return next tag contents from header. | |
| * @param hi header tag iterator | | * @param hi header tag iterator | |
| * @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. | |
| | | * @param hi header tag iterator | |
| | | * @return next tag, RPMTAG_NOT_FOUND to stop iteration | |
| | | */ | |
| | | rpmTag headerNextTag(HeaderIterator hi); | |
| | | | |
| | | /** \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 | |
| int headerNVR(Header h, | | int headerNVR(Header h, | |
| const char ** np, | | const char ** np, | |
| const char ** vp, | | const char ** vp, | |
| const char ** rp); | | const char ** rp); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return name, epoch, version, release, arch strings from header. | | * Return name, epoch, version, release, arch strings from header. | |
| * @param h header | | * @param h header | |
| * @retval *np name pointer (or NULL) | | * @retval *np name pointer (or NULL) | |
| * @retval *ep epoch pointer (or NULL) | | * @retval *ep epoch 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) | |
| * @retval *ap arch pointer (or NULL) | | * @retval *ap arch pointer (or NULL) | |
| * @return 0 always | | * @return 0 always | |
| */ | | */ | |
|
| | | RPM_GNUC_DEPRECATED | |
| int headerNEVRA(Header h, | | int headerNEVRA(Header h, | |
| const char ** np, | | const char ** np, | |
| uint32_t ** ep, | | uint32_t ** ep, | |
| const char ** vp, | | const char ** vp, | |
| const char ** rp, | | const char ** rp, | |
| const char ** ap); | | const char ** ap); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return (malloc'd) header name-version-release string. | | * Return (malloc'd) header name-version-release string. | |
| * @param h header | | * @param h header | |
| * @retval np name tag value | | * @retval np name tag value | |
| * @return name-version-release string | | * @return name-version-release string | |
| */ | | */ | |
|
| | | RPM_GNUC_DEPRECATED | |
| char * headerGetNEVR(Header h, const char ** np ); | | char * headerGetNEVR(Header h, const char ** np ); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Return (malloc'd) header name-version-release.arch string. | | * Return (malloc'd) header name-version-release.arch string. | |
| * @param h header | | * @param h header | |
| * @retval np name tag value | | * @retval np name tag value | |
| * @return name-version-release string | | * @return name-version-release string | |
| */ | | */ | |
|
| | | RPM_GNUC_DEPRECATED | |
| char * headerGetNEVRA(Header h, const char ** np ); | | char * headerGetNEVRA(Header h, const char ** np ); | |
| | | | |
| /* \ingroup header | | /* \ingroup header | |
| * Return (malloc'd) header (epoch:)version-release string. | | * Return (malloc'd) header (epoch:)version-release string. | |
| * @param h header | | * @param h header | |
| * @retval np name tag value (or NULL) | | * @retval np name tag value (or NULL) | |
| * @return (epoch:)version-release string | | * @return (epoch:)version-release string | |
| */ | | */ | |
|
| | | 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 | |
| | | * @param h header | |
| | | * @param tag tag to retrieve | |
| | | * @return string pointer (malloced) or NULL on failure | |
| | | */ | |
| | | char * headerGetAsString(Header h, rpmTag tag); | |
| | | | |
| | | /** \ingroup header | |
| | | * Return a simple string tag from header | |
| | | * @param h header | |
| | | * @param tag tag to retrieve | |
| | | * @return string pointer (to header memory) or NULL on failure | |
| | | */ | |
| | | const char * headerGetString(Header h, rpmTag tag); | |
| | | | |
| | | /* \ingroup header | |
| | | * Return a simple number tag (or extension) from header | |
| | | * @param h header | |
| | | * @param tag tag to retrieve | |
| | | * @return numeric tag value or 0 on failure | |
| | | */ | |
| | | uint64_t headerGetNumber(Header h, rpmTag tag); | |
| | | | |
| | | /** \ingroup header | |
| * Return header color. | | * Return header color. | |
| * @param h header | | * @param h header | |
| * @return header color | | * @return header color | |
| */ | | */ | |
|
| | | RPM_GNUC_DEPRECATED | |
| rpm_color_t headerGetColor(Header h); | | rpm_color_t headerGetColor(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Check if header is a source or binary package header | | * Check if header is a source or binary package header | |
| * @param h header | | * @param h header | |
| * @return 0 == binary, 1 == source | | * @return 0 == binary, 1 == source | |
| */ | | */ | |
| int headerIsSource(Header h); | | int headerIsSource(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| | | | |
End of changes. 9 change blocks. |
| 1 lines changed or deleted | | 38 lines changed or added | |
|
| rpmbuild.h | | rpmbuild.h | |
| | | | |
| skipping to change at line 238 | | skipping to change at line 238 | |
| int parsePreamble(rpmSpec spec, int initialPackage); | | int parsePreamble(rpmSpec spec, int initialPackage); | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| * Parse %%prep section of a spec file. | | * Parse %%prep section of a spec file. | |
| * @param spec spec file control structure | | * @param spec spec file control structure | |
| * @return >= 0 next rpmParseState, < 0 on error | | * @return >= 0 next rpmParseState, < 0 on error | |
| */ | | */ | |
| int parsePrep(rpmSpec spec); | | int parsePrep(rpmSpec spec); | |
| | | | |
| /** \ingroup rpmbuild | | /** \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. | | * Parse dependency relations from spec file and/or autogenerated output bu
ffer. | |
| * @param spec spec file control structure | | * @param spec spec file control structure | |
| * @param pkg package control structure | | * @param pkg package control structure | |
| * @param field text to parse (e.g. "foo < 0:1.2-3, bar = 5:
6.7") | | * @param field text to parse (e.g. "foo < 0:1.2-3, bar = 5:
6.7") | |
| * @param tagN tag, identifies type of dependency | | * @param tagN tag, identifies type of dependency | |
| * @param index (0 always) | | * @param index (0 always) | |
| * @param tagflags dependency flags already known from context | | * @param tagflags dependency flags already known from context | |
| * @return RPMRC_OK on success, RPMRC_FAIL on failure | | * @return RPMRC_OK on success, RPMRC_FAIL on failure | |
| */ | | */ | |
| rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char * field, rpmTag tagN
, | | rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char * field, rpmTag tagN
, | |
| | | | |
| skipping to change at line 335 | | skipping to change at line 345 | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| * Add dependency to header, filtering duplicates. | | * Add dependency to header, filtering duplicates. | |
| * @param spec spec file control structure | | * @param spec spec file control structure | |
| * @param h header | | * @param h header | |
| * @param tagN tag, identifies type of dependency | | * @param tagN tag, identifies type of dependency | |
| * @param N (e.g. Requires: foo < 0:1.2-3, "foo") | | * @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 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 Flags (e.g. Requires: foo < 0:1.2-3, both "Require
s:" and "<") | |
| * @param index (0 always) | | * @param index (0 always) | |
|
| * @return 0 always | | * @return 0 on success, 1 on error | |
| */ | | */ | |
| int addReqProv(rpmSpec spec, Header h, rpmTag tagN, | | int addReqProv(rpmSpec spec, Header h, rpmTag tagN, | |
| const char * N, const char * EVR, rpmsenseFlags Flags, | | const char * N, const char * EVR, rpmsenseFlags Flags, | |
| uint32_t index); | | uint32_t index); | |
| | | | |
| /** \ingroup rpmbuild | | /** \ingroup rpmbuild | |
| * Add rpmlib feature dependency. | | * Add rpmlib feature dependency. | |
| * @param h header | | * @param h header | |
| * @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo
) | | * @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo
) | |
| * @param featureEVR rpm feature epoch/version/release | | * @param featureEVR rpm feature epoch/version/release | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 12 lines changed or added | |
|
| rpmpgp.h | | rpmpgp.h | |
| | | | |
| skipping to change at line 26 | | skipping to change at line 26 | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/rpmstring.h> | | #include <rpm/rpmstring.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| */ | | */ | |
| typedef struct DIGEST_CTX_s * DIGEST_CTX; | | typedef struct DIGEST_CTX_s * DIGEST_CTX; | |
|
| | | typedef struct rpmDigestBundle_s * rpmDigestBundle; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| */ | | */ | |
| 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]; | |
| | | | |
| skipping to change at line 921 | | skipping to change at line 922 | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| */ | | */ | |
| typedef enum pgpArmorKey_e { | | typedef enum pgpArmorKey_e { | |
| PGPARMORKEY_VERSION = 1, /*!< Version: */ | | PGPARMORKEY_VERSION = 1, /*!< Version: */ | |
| PGPARMORKEY_COMMENT = 2, /*!< Comment: */ | | PGPARMORKEY_COMMENT = 2, /*!< Comment: */ | |
| PGPARMORKEY_MESSAGEID = 3, /*!< MessageID: */ | | PGPARMORKEY_MESSAGEID = 3, /*!< MessageID: */ | |
| PGPARMORKEY_HASH = 4, /*!< Hash: */ | | PGPARMORKEY_HASH = 4, /*!< Hash: */ | |
| PGPARMORKEY_CHARSET = 5 /*!< Charset: */ | | PGPARMORKEY_CHARSET = 5 /*!< Charset: */ | |
| } pgpArmorKey; | | } pgpArmorKey; | |
| | | | |
|
| | | typedef enum pgpValType_e { | |
| | | PGPVAL_TAG = 1, | |
| | | PGPVAL_ARMORBLOCK = 2, | |
| | | PGPVAL_ARMORKEY = 3, | |
| | | PGPVAL_SIGTYPE = 4, | |
| | | PGPVAL_SUBTYPE = 5, | |
| | | PGPVAL_PUBKEYALGO = 6, | |
| | | PGPVAL_SYMKEYALGO = 7, | |
| | | PGPVAL_COMPRESSALGO = 8, | |
| | | PGPVAL_HASHALGO = 9, | |
| | | PGPVAL_SERVERPREFS = 10, | |
| | | } pgpValType; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Bit(s) to control digest operation. | | * Bit(s) to control digest operation. | |
| */ | | */ | |
| typedef enum rpmDigestFlags_e { | | typedef enum rpmDigestFlags_e { | |
| RPMDIGEST_NONE = 0 | | RPMDIGEST_NONE = 0 | |
| } rpmDigestFlags; | | } rpmDigestFlags; | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| | | * Return string representation of am OpenPGP value. | |
| | | * @param type type of value | |
| | | * @param val byte value to lookup | |
| | | * @return string value of byte | |
| | | */ | |
| | | const char * pgpValString(pgpValType type, uint8_t val); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| * Return (native-endian) integer from big-endian representation. | | * Return (native-endian) integer from big-endian representation. | |
| * @param s pointer to big-endian integer | | * @param s pointer to big-endian integer | |
| * @param nbytes no. of bytes | | * @param nbytes no. of bytes | |
| * @return native-endian integer | | * @return native-endian integer | |
| */ | | */ | |
| static inline | | static inline | |
| unsigned int pgpGrab(const uint8_t *s, size_t nbytes) | | unsigned int pgpGrab(const uint8_t *s, size_t nbytes) | |
| { | | { | |
| size_t i = 0; | | size_t i = 0; | |
| size_t nb = (nbytes <= sizeof(i) ? nbytes : sizeof(i)); | | size_t nb = (nbytes <= sizeof(i) ? nbytes : sizeof(i)); | |
| | | | |
| skipping to change at line 1013 | | skipping to change at line 1035 | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Parse armored OpenPGP packets from a file. | | * Parse armored OpenPGP packets from a file. | |
| * @param fn file name | | * @param fn file name | |
| * @retval pkt dearmored OpenPGP packet(s) (malloced) | | * @retval pkt dearmored OpenPGP packet(s) (malloced) | |
| * @retval pktlen dearmored OpenPGP packet(s) length in bytes | | * @retval pktlen dearmored OpenPGP packet(s) length in bytes | |
| * @return type of armor found | | * @return type of armor found | |
| */ | | */ | |
| pgpArmor pgpReadPkts(const char * fn, uint8_t ** pkt, size_t * pktlen); | | pgpArmor pgpReadPkts(const char * fn, uint8_t ** pkt, size_t * pktlen); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| | | * Parse armored OpenPGP packets from memory. | |
| | | * @param armor armored OpenPGP packet string | |
| | | * @retval pkt dearmored OpenPGP packet(s) (malloced) | |
| | | * @retval pktlen dearmored OpenPGP packet(s) length in bytes | |
| | | * @return type of armor found | |
| | | */ | |
| | | pgpArmor pgpParsePkts(const char *armor, uint8_t ** pkt, size_t * pktlen); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| * Wrap a OpenPGP packets in ascii armor for transport. | | * Wrap a OpenPGP packets in ascii armor for transport. | |
| * @param atype type of armor | | * @param atype type of armor | |
| * @param s binary pkt data | | * @param s binary pkt data | |
| * @param ns binary pkt data length | | * @param ns binary pkt data length | |
| * @return formatted string | | * @return formatted string | |
| */ | | */ | |
| char * pgpArmorWrap(int atype, const unsigned char * s, size_t ns); | | char * pgpArmorWrap(int atype, const unsigned char * s, size_t ns); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| * Create a container for parsed OpenPGP packates. | | * Create a container for parsed OpenPGP packet(s). | |
| * @return container | | * @return container | |
| */ | | */ | |
| pgpDig pgpNewDig(void); | | pgpDig pgpNewDig(void); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Release (malloc'd) data from container. | | * Release (malloc'd) data from container. | |
| * @param dig container | | * @param dig container | |
| */ | | */ | |
| void pgpCleanDig(pgpDig dig); | | void pgpCleanDig(pgpDig dig); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| * Destroy a container for parsed OpenPGP packates. | | * Destroy a container for parsed OpenPGP packet(s). | |
| * @param dig container | | * @param dig container | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| pgpDig pgpFreeDig(pgpDig dig); | | pgpDig pgpFreeDig(pgpDig dig); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| | | * Verify a PGP signature. | |
| | | * @param dig container | |
| | | * @param hashctx digest context | |
| | | * @return RPMRC_OK on success | |
| | | */ | |
| | | rpmRC pgpVerifySig(pgpDig dig, DIGEST_CTX hashctx); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Return a string identification of a PGP signature/pubkey. | |
| | | * @param digp signature/pubkey container | |
| | | * @return string describing the item and parameters | |
| | | */ | |
| | | char *pgpIdentItem(pgpDigParams digp); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| * Perform cryptography initialization. | | * Perform cryptography initialization. | |
| * It must be called before any cryptography can be used within rpm. | | * It must be called before any cryptography can be used within rpm. | |
| * It's not normally necessary to call it directly as it's called in | | * It's not normally necessary to call it directly as it's called in | |
| * general rpm initialization routines. | | * general rpm initialization routines. | |
| * @return 0 on success, -1 on failure | | * @return 0 on success, -1 on failure | |
| */ | | */ | |
| int rpmInitCrypto(void); | | int rpmInitCrypto(void); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Shutdown cryptography | | * Shutdown cryptography | |
| | | | |
| skipping to change at line 1101 | | skipping to change at line 1147 | |
| * @param ctx digest context | | * @param ctx digest context | |
| * @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 rpmDigestFinal(DIGEST_CTX ctx, | | int rpmDigestFinal(DIGEST_CTX ctx, | |
| void ** datap, | | void ** datap, | |
| size_t * lenp, int asAscii); | | size_t * lenp, int asAscii); | |
| | | | |
|
| | | /** \ingroup rpmpgp | |
| | | * Create a new digest bundle. | |
| | | * @return New digest bundle | |
| | | */ | |
| | | rpmDigestBundle rpmDigestBundleNew(void); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Free a digest bundle and all contained digest contexts. | |
| | | * @param bundle digest bundle | |
| | | * @return NULL always | |
| | | */ | |
| | | rpmDigestBundle rpmDigestBundleFree(rpmDigestBundle bundle); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Add a new type of digest to a bundle. | |
| | | * @param bundle digest bundle | |
| | | * @param algo type of digest | |
| | | * @param flags bit(s) to control digest operation | |
| | | * @return 0 on success | |
| | | */ | |
| | | int rpmDigestBundleAdd(rpmDigestBundle bundle, pgpHashAlgo algo, | |
| | | rpmDigestFlags flags); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Update contexts within bundle with next plain text buffer. | |
| | | * @param bundle digest bundle | |
| | | * @param data next data buffer | |
| | | * @param len no. bytes of data | |
| | | * @return 0 on success | |
| | | */ | |
| | | int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t | |
| | | len); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Return digest from a bundle and destroy context, see rpmDigestFinal(). | |
| | | * | |
| | | * @param bundle digest bundle | |
| | | * @param algo type of digest to return | |
| | | * @retval datap address of returned digest | |
| | | * @retval lenp address of digest length | |
| | | * @param asAscii return digest as ascii string? | |
| | | * @return 0 on success | |
| | | */ | |
| | | int rpmDigestBundleFinal(rpmDigestBundle bundle, | |
| | | pgpHashAlgo algo, void ** datap, size_t * lenp, int asAscii); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Duplicate a digest context from a bundle. | |
| | | * @param bundle digest bundle | |
| | | * @param algo type of digest to dup | |
| | | * @return duplicated digest context | |
| | | */ | |
| | | DIGEST_CTX rpmDigestBundleDupCtx(rpmDigestBundle bundle, pgpHashAlgo algo); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMPGP */ | | #endif /* H_RPMPGP */ | |
| | | | |
End of changes. 8 change blocks. |
| 2 lines changed or deleted | | 102 lines changed or added | |
|
| rpmtag.h | | rpmtag.h | |
| | | | |
| skipping to change at line 131 | | skipping to change at line 131 | |
| RPMTAG_SOURCERPM = 1044, /* s */ | | RPMTAG_SOURCERPM = 1044, /* s */ | |
| RPMTAG_FILEVERIFYFLAGS = 1045, /* i[] */ | | RPMTAG_FILEVERIFYFLAGS = 1045, /* i[] */ | |
| RPMTAG_ARCHIVESIZE = 1046, /* i */ | | RPMTAG_ARCHIVESIZE = 1046, /* i */ | |
| RPMTAG_PROVIDENAME = 1047, /* s[] */ | | RPMTAG_PROVIDENAME = 1047, /* s[] */ | |
| #define RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* s[] */ | | #define RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* s[] */ | |
| #define RPMTAG_P RPMTAG_PROVIDENAME /* s[] */ | | #define RPMTAG_P RPMTAG_PROVIDENAME /* s[] */ | |
| RPMTAG_REQUIREFLAGS = 1048, /* i[] */ | | RPMTAG_REQUIREFLAGS = 1048, /* i[] */ | |
| RPMTAG_REQUIRENAME = 1049, /* s[] */ | | RPMTAG_REQUIRENAME = 1049, /* s[] */ | |
| #define RPMTAG_REQUIRES RPMTAG_REQUIRENAME /* s[] */ | | #define RPMTAG_REQUIRES RPMTAG_REQUIRENAME /* s[] */ | |
| RPMTAG_REQUIREVERSION = 1050, /* s[] */ | | RPMTAG_REQUIREVERSION = 1050, /* s[] */ | |
|
| RPMTAG_NOSOURCE = 1051, /* i internal */ | | RPMTAG_NOSOURCE = 1051, /* i */ | |
| RPMTAG_NOPATCH = 1052, /* i internal */ | | 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 */ | |
| 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[] */ | |
| | | | |
| skipping to change at line 249 | | skipping to change at line 249 | |
| RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimpl
emented) */ | | RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimpl
emented) */ | |
| RPMTAG_CVSID = 1163, /* s (unimplemented) */ | | RPMTAG_CVSID = 1163, /* s (unimplemented) */ | |
| #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ | | #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ | |
| RPMTAG_BLINKPKGID = 1164, /* s[] (unimplemented) */ | | RPMTAG_BLINKPKGID = 1164, /* s[] (unimplemented) */ | |
| RPMTAG_BLINKHDRID = 1165, /* s[] (unimplemented) */ | | RPMTAG_BLINKHDRID = 1165, /* s[] (unimplemented) */ | |
| RPMTAG_BLINKNEVRA = 1166, /* s[] (unimplemented) */ | | RPMTAG_BLINKNEVRA = 1166, /* s[] (unimplemented) */ | |
| RPMTAG_FLINKPKGID = 1167, /* s[] (unimplemented) */ | | RPMTAG_FLINKPKGID = 1167, /* s[] (unimplemented) */ | |
| RPMTAG_FLINKHDRID = 1168, /* s[] (unimplemented) */ | | RPMTAG_FLINKHDRID = 1168, /* s[] (unimplemented) */ | |
| RPMTAG_FLINKNEVRA = 1169, /* s[] (unimplemented) */ | | RPMTAG_FLINKNEVRA = 1169, /* s[] (unimplemented) */ | |
| RPMTAG_PACKAGEORIGIN = 1170, /* s (unimplemented) */ | | RPMTAG_PACKAGEORIGIN = 1170, /* s (unimplemented) */ | |
|
| RPMTAG_TRIGGERPREIN = 1171, /* internal (unimplemented)
*/ | | RPMTAG_TRIGGERPREIN = 1171, /* internal */ | |
| RPMTAG_BUILDSUGGESTS = 1172, /* internal (unimplemented) */ | | RPMTAG_BUILDSUGGESTS = 1172, /* internal (unimplemented) */ | |
| RPMTAG_BUILDENHANCES = 1173, /* internal (unimplemented) */ | | RPMTAG_BUILDENHANCES = 1173, /* internal (unimplemented) */ | |
| RPMTAG_SCRIPTSTATES = 1174, /* i[] scriptlet exit codes
(unimplemented) */ | | RPMTAG_SCRIPTSTATES = 1174, /* i[] scriptlet exit codes
(unimplemented) */ | |
| RPMTAG_SCRIPTMETRICS = 1175, /* i[] scriptlet execution times (un
implemented) */ | | RPMTAG_SCRIPTMETRICS = 1175, /* i[] scriptlet execution times (un
implemented) */ | |
| RPMTAG_BUILDCPUCLOCK = 1176, /* i (unimplemented) */ | | RPMTAG_BUILDCPUCLOCK = 1176, /* i (unimplemented) */ | |
| RPMTAG_FILEDIGESTALGOS = 1177, /* i[] (unimplemented) */ | | RPMTAG_FILEDIGESTALGOS = 1177, /* i[] (unimplemented) */ | |
| RPMTAG_VARIANTS = 1178, /* s[] (unimplemented) */ | | RPMTAG_VARIANTS = 1178, /* s[] (unimplemented) */ | |
| RPMTAG_XMAJOR = 1179, /* i (unimplemented) */ | | RPMTAG_XMAJOR = 1179, /* i (unimplemented) */ | |
| RPMTAG_XMINOR = 1180, /* i (unimplemented) */ | | RPMTAG_XMINOR = 1180, /* i (unimplemented) */ | |
| RPMTAG_REPOTAG = 1181, /* s (unimplemented) */ | | RPMTAG_REPOTAG = 1181, /* s (unimplemented) */ | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 273 | |
| 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 */ | |
| RPMTAG_BUILDOBSOLETES = 1194, /* internal */ | | RPMTAG_BUILDOBSOLETES = 1194, /* internal */ | |
|
| | | RPMTAG_DBINSTANCE = 1195, /* i extension */ | |
| | | RPMTAG_NVRA = 1196, /* s extension */ | |
| 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[] extension */ | |
| RPMTAG_FSSIZES = 5004, /* l[] extension */ | | RPMTAG_FSSIZES = 5004, /* l[] extension */ | |
| 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_EVR = 5013, /* s extension */ | |
| | | RPMTAG_NVR = 5014, /* s extension */ | |
| | | RPMTAG_NEVR = 5015, /* s extension */ | |
| | | RPMTAG_NEVRA = 5016, /* s extension */ | |
| | | RPMTAG_HEADERCOLOR = 5017, /* i extension */ | |
| | | RPMTAG_VERBOSE = 5018, /* i extension */ | |
| | | RPMTAG_EPOCHNUM = 5019, /* i extension */ | |
| | | | |
| 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 | | #define RPMTAG_NOT_FOUND -1 | |
| | | | |
| /** \ingroup signature | | /** \ingroup signature | |
| * Tags found in signature header from package. | | * Tags found in signature header from package. | |
| */ | | */ | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 13 lines changed or added | |
|
| rpmtd.h | | rpmtd.h | |
| | | | |
| skipping to change at line 205 | | skipping to change at line 205 | |
| * @return Value of current iteration item as uint64_t, | | * @return Value of current iteration item as uint64_t, | |
| * 0 for non-numeric types (error) | | * 0 for non-numeric types (error) | |
| */ | | */ | |
| uint64_t rpmtdGetNumber(rpmtd td); | | uint64_t rpmtdGetNumber(rpmtd td); | |
| | | | |
| typedef enum rpmtdFormats_e { | | typedef enum rpmtdFormats_e { | |
| RPMTD_FORMAT_STRING = 0, /* plain string (any type) *
/ | | RPMTD_FORMAT_STRING = 0, /* plain string (any type) *
/ | |
| RPMTD_FORMAT_ARMOR = 1, /* ascii armor format (bin types) */ | | RPMTD_FORMAT_ARMOR = 1, /* ascii armor format (bin types) */ | |
| RPMTD_FORMAT_BASE64 = 2, /* base64 encoding (bin type
s) */ | | RPMTD_FORMAT_BASE64 = 2, /* base64 encoding (bin type
s) */ | |
| RPMTD_FORMAT_PGPSIG = 3, /* pgp/gpg signature (bin ty
pes) */ | | RPMTD_FORMAT_PGPSIG = 3, /* pgp/gpg signature (bin ty
pes) */ | |
|
| RPMTD_FORMAT_DEPFLAGS = 4, /* dependency flags (int32 types) */ | | RPMTD_FORMAT_DEPFLAGS = 4, /* dependency flags (int types) */ | |
| RPMTD_FORMAT_FFLAGS = 5, /* file flags (int32 types) | | RPMTD_FORMAT_FFLAGS = 5, /* file flags (int types) */ | |
| */ | | RPMTD_FORMAT_PERMS = 6, /* permission string (int types) */ | |
| RPMTD_FORMAT_PERMS = 6, /* permission string (int32 types) * | | RPMTD_FORMAT_TRIGGERTYPE = 7, /* trigger types (int types) */ | |
| / | | | |
| RPMTD_FORMAT_TRIGGERTYPE = 7, /* trigger types */ | | | |
| RPMTD_FORMAT_XML = 8, /* xml format (any type) */ | | RPMTD_FORMAT_XML = 8, /* xml format (any type) */ | |
|
| RPMTD_FORMAT_OCTAL = 9, /* octal format (int32 types) */ | | RPMTD_FORMAT_OCTAL = 9, /* octal format (int types) */ | |
| RPMTD_FORMAT_HEX = 10, /* hex format (int32 types) */ | | RPMTD_FORMAT_HEX = 10, /* hex format (int types) */ | |
| RPMTD_FORMAT_DATE = 11, /* date format (int32 types) */ | | RPMTD_FORMAT_DATE = 11, /* date format (int types) */ | |
| RPMTD_FORMAT_DAY = 12, /* day format (int32 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 (int32 types) */ | | RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */ | |
| | | RPMTD_FORMAT_FSTATE = 16, /* file states (int types) * | |
| | | / | |
| | | RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int ty | |
| | | pes) */ | |
| } 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) | |
| | | | |
End of changes. 3 change blocks. |
| 11 lines changed or deleted | | 13 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/rpmal.h> | | #include <rpm/rpmtypes.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| */ | | */ | |
| extern int _rpmte_debug; | | extern int _rpmte_debug; | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| rpmte rpmteFree(rpmte te); | | rpmte rpmteFree(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Create a transaction element. | | * Create a transaction element. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param h header | | * @param h header | |
| * @param type TR_ADDED/TR_REMOVED | | * @param type TR_ADDED/TR_REMOVED | |
| * @param key (TR_ADDED) package retrieval key (e.g. file name) | | * @param key (TR_ADDED) package retrieval key (e.g. file name) | |
| * @param relocs (TR_ADDED) package file relocations | | * @param relocs (TR_ADDED) package file relocations | |
| * @param dboffset unused | | * @param dboffset unused | |
|
| * @param pkgKey associated added package (if any) | | | |
| * @return new transaction element | | * @return new transaction element | |
| */ | | */ | |
| rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, | | rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, | |
| fnpyKey key, | | fnpyKey key, | |
| rpmRelocation * relocs, | | rpmRelocation * relocs, | |
|
| int dboffset, | | int dboffset); | |
| rpmalKey pkgKey); | | | |
| | | | |
| /** \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 | |
| */ | | */ | |
| Header rpmteHeader(rpmte te); | | Header rpmteHeader(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Save header into transaction element. | | * Save header into transaction element. | |
| | | | |
| skipping to change at line 286 | | skipping to change at line 284 | |
| */ | | */ | |
| void rpmteNewTSI(rpmte te); | | void rpmteNewTSI(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 | |
|
| * Retrieve pkgKey of TR_ADDED transaction element. | | * Set dependent element of TR_REMOVED transaction element. | |
| * @param te transaction element | | | |
| * @return pkgKey | | | |
| */ | | | |
| rpmalKey rpmteAddedKey(rpmte te); | | | |
| | | | |
| /** \ingroup rpmte | | | |
| * Set pkgKey of TR_ADDED transaction element. | | | |
| * @param te transaction element | | * @param te transaction element | |
|
| * @param npkgKey new pkgKey | | * @param depends dependent transaction element | |
| * @return previous pkgKey | | | |
| */ | | */ | |
|
| rpmalKey rpmteSetAddedKey(rpmte te, | | void rpmteSetDependsOn(rpmte te, rpmte depends); | |
| rpmalKey npkgKey); | | | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
|
| * Retrieve dependent pkgKey of TR_REMOVED transaction element. | | * Retrieve dependent element of TR_REMOVED transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
|
| * @return dependent pkgKey | | * @return dependent transaction element | |
| */ | | */ | |
|
| rpmalKey rpmteDependsOnKey(rpmte te); | | rpmte rpmteDependsOn(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve rpmdb instance of TR_REMOVED transaction element. | | * Retrieve rpmdb instance of TR_REMOVED transaction element. | |
| * @param te transaction element | | * @param te transaction element | |
| * @return rpmdb instance | | * @return rpmdb instance | |
| */ | | */ | |
| int rpmteDBOffset(rpmte te); | | int rpmteDBOffset(rpmte te); | |
| | | | |
| /** \ingroup rpmte | | /** \ingroup rpmte | |
| * Retrieve [epoch:]version-release string from transaction element. | | * Retrieve [epoch:]version-release string from transaction element. | |
| | | | |
End of changes. 9 change blocks. |
| 19 lines changed or deleted | | 8 lines changed or added | |
|
| rpmts.h | | rpmts.h | |
| | | | |
| skipping to change at line 374 | | skipping to change at line 374 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Set verify signatures flag(s). | | * Set verify signatures flag(s). | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param vsflags new verify signatures flags | | * @param vsflags new verify signatures flags | |
| * @return previous value | | * @return previous value | |
| */ | | */ | |
| rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags); | | rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Set index of 1st element of successors. | | | |
| * @param ts transaction set | | | |
| * @param first new index of 1st element of successors | | | |
| * @return previous value | | | |
| */ | | | |
| int rpmtsUnorderedSuccessors(rpmts ts, int first); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Get transaction rootDir, i.e. path to chroot(2). | | * Get transaction rootDir, i.e. path to chroot(2). | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return transaction rootDir | | * @return transaction rootDir | |
| */ | | */ | |
| const char * rpmtsRootDir(rpmts ts); | | const char * rpmtsRootDir(rpmts ts); | |
| | | | |
| /** \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) | |
| | | | |
| skipping to change at line 469 | | skipping to change at line 461 | |
| rpm_tid_t rpmtsSetTid(rpmts ts, rpm_tid_t tid); | | rpm_tid_t rpmtsSetTid(rpmts ts, rpm_tid_t tid); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Get transaction set database handle. | | * Get transaction set database handle. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @return transaction database handle | | * @return transaction database handle | |
| */ | | */ | |
| rpmdb rpmtsGetRdb(rpmts ts); | | rpmdb rpmtsGetRdb(rpmts ts); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| * Initialize disk space info for each and every mounted file systems. | | | |
| * @param ts transaction set | | | |
| * @return 0 on success | | | |
| */ | | | |
| int rpmtsInitDSI(const rpmts ts); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Update disk space info for a file. | | | |
| * @param ts transaction set | | | |
| * @param dev mount point device | | | |
| * @param fileSize long (64bit) file size | | | |
| * @param prevSize previous long file size (if upgrading) | | | |
| * @param fixupSize long size difference | | | |
| * @param action file disposition | | | |
| */ | | | |
| void rpmtsUpdateDSI(const rpmts ts, dev_t dev, | | | |
| rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSi | | | |
| ze, | | | |
| rpmFileAction action); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Check a transaction element for disk space problems. | | | |
| * @param ts transaction set | | | |
| * @param te current transaction element | | | |
| */ | | | |
| void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te); | | | |
| | | | |
| /** \ingroup rpmts | | | |
| * Perform transaction progress notify callback. | | * Perform transaction progress notify callback. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param te current transaction element | | * @param te current transaction element | |
| * @param what type of call back | | * @param what type of call back | |
| * @param amount current value | | * @param amount current value | |
| * @param total final value | | * @param total final value | |
| * @return callback dependent pointer | | * @return callback dependent pointer | |
| */ | | */ | |
| void * rpmtsNotify(rpmts ts, rpmte te, | | void * rpmtsNotify(rpmts ts, rpmte te, | |
| rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); | | rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); | |
| | | | |
| skipping to change at line 582 | | skipping to change at line 547 | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
| * Set color bits of transaction set. | | * Set color bits of transaction set. | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param color new color bits | | * @param color new color bits | |
| * @return previous color bits | | * @return previous color bits | |
| */ | | */ | |
| rpm_color_t rpmtsSetColor(rpmts ts, rpm_color_t color); | | rpm_color_t rpmtsSetColor(rpmts ts, rpm_color_t color); | |
| | | | |
| /** \ingroup rpmts | | /** \ingroup rpmts | |
|
| | | * Set prefered file color | |
| | | * @param ts transaction set | |
| | | * @param color new color bits | |
| | | * @return previous color bits | |
| | | */ | |
| | | rpm_color_t rpmtsSetPrefColor(rpmts ts, rpm_color_t color); | |
| | | | |
| | | /** \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 | |
| * Set transaction notify callback function and argument. | | * Set transaction notify callback function and argument. | |
| * | | * | |
| | | | |
| skipping to change at line 632 | | skipping to change at line 605 | |
| */ | | */ | |
| int rpmtsAddInstallElement(rpmts ts, Header h, | | int rpmtsAddInstallElement(rpmts ts, Header h, | |
| const fnpyKey key, int upgrade, | | const fnpyKey key, int upgrade, | |
| rpmRelocation * relocs); | | rpmRelocation * relocs); | |
| | | | |
| /** \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 | | * @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 rpmts | | | |
| * Retrieve keys from ordered transaction set. | | | |
| * @todo Removed packages have no keys, returned as interleaved NULL pointe | | | |
| rs. | | | |
| * @param ts transaction set | | | |
| * @retval ep address of returned element array pointer (or NULL) | | | |
| * @retval nep address of no. of returned elements (or NULL) | | | |
| * @return 0 always | | | |
| */ | | | |
| int rpmtsGetKeys(rpmts ts, | | | |
| fnpyKey ** ep, | | | |
| int * nep); | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMTS */ | | #endif /* H_RPMTS */ | |
| | | | |
End of changes. 5 change blocks. |
| 50 lines changed or deleted | | 9 lines changed or added | |
|
| rpmutil.h | | rpmutil.h | |
| #ifndef _RPMUTIL_H | | #ifndef _RPMUTIL_H | |
| #define _RPMUTIL_H | | #define _RPMUTIL_H | |
| | | | |
|
| | | #include <unistd.h> | |
| | | | |
| /* | | /* | |
| * Miscellanous utility macros: | | * Miscellanous utility macros: | |
| * - portability wrappers for various gcc extensions like __attribute__() | | * - portability wrappers for various gcc extensions like __attribute__() | |
| * - ... | | * - ... | |
| * | | * | |
| * Copied from glib, names replaced to avoid clashing with glib. | | * Copied from glib, names replaced to avoid clashing with glib. | |
| * | | * | |
| */ | | */ | |
| | | | |
| /* Here we provide RPM_GNUC_EXTENSION as an alias for __extension__, | | /* Here we provide RPM_GNUC_EXTENSION as an alias for __extension__, | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 37 | |
| #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) | | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) | |
| #define RPM_GNUC_PURE \ | | #define RPM_GNUC_PURE \ | |
| __attribute__((__pure__)) | | __attribute__((__pure__)) | |
| #define RPM_GNUC_MALLOC \ | | #define RPM_GNUC_MALLOC \ | |
| __attribute__((__malloc__)) | | __attribute__((__malloc__)) | |
| #else | | #else | |
| #define RPM_GNUC_PURE | | #define RPM_GNUC_PURE | |
| #define RPM_GNUC_MALLOC | | #define RPM_GNUC_MALLOC | |
| #endif | | #endif | |
| | | | |
|
| | | #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) | |
| | | #define RPM_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) | |
| | | #define RPM_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) | |
| | | #else | |
| | | #define RPM_GNUC_ALLOC_SIZE(x) | |
| | | #define RPM_GNUC_ALLOC_SIZE2(x,y) | |
| | | #endif | |
| | | | |
| #if __GNUC__ >= 4 | | #if __GNUC__ >= 4 | |
| #define RPM_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) | | #define RPM_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) | |
| #else | | #else | |
| #define RPM_GNUC_NULL_TERMINATED | | #define RPM_GNUC_NULL_TERMINATED | |
| #endif | | #endif | |
| | | | |
| #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | |
| #define RPM_GNUC_PRINTF( format_idx, arg_idx ) \ | | #define RPM_GNUC_PRINTF( format_idx, arg_idx ) \ | |
| __attribute__((__format__ (__printf__, format_idx, arg_idx))) | | __attribute__((__format__ (__printf__, format_idx, arg_idx))) | |
| #define RPM_GNUC_SCANF( format_idx, arg_idx ) \ | | #define RPM_GNUC_SCANF( format_idx, arg_idx ) \ | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 84 | |
| #endif /* !__GNUC__ */ | | #endif /* !__GNUC__ */ | |
| | | | |
| #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | |
| #define RPM_GNUC_DEPRECATED \ | | #define RPM_GNUC_DEPRECATED \ | |
| __attribute__((__deprecated__)) | | __attribute__((__deprecated__)) | |
| #else | | #else | |
| #define RPM_GNUC_DEPRECATED | | #define RPM_GNUC_DEPRECATED | |
| #endif /* __GNUC__ */ | | #endif /* __GNUC__ */ | |
| | | | |
| #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) | | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) | |
|
| # define RPM_GNUC_MAY_ALIAS __attribute__((may_alias)) | | #define RPM_GNUC_MAY_ALIAS __attribute__((may_alias)) | |
| | | #define RPM_GNUC_NONNULL( ... ) \ | |
| | | __attribute__((__nonnull__ (__VA_ARGS__))) | |
| #else | | #else | |
|
| # define RPM_GNUC_MAY_ALIAS | | #define RPM_GNUC_MAY_ALIAS | |
| | | #define RPM_GNUC_NONNULL( ... ) | |
| #endif | | #endif | |
| | | | |
| #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | |
| #define RPM_GNUC_WARN_UNUSED_RESULT \ | | #define RPM_GNUC_WARN_UNUSED_RESULT \ | |
| __attribute__((warn_unused_result)) | | __attribute__((warn_unused_result)) | |
| #else | | #else | |
| #define RPM_GNUC_WARN_UNUSED_RESULT | | #define RPM_GNUC_WARN_UNUSED_RESULT | |
| #endif /* __GNUC__ */ | | #endif /* __GNUC__ */ | |
| | | | |
| #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) | | #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 114 | |
| | | | |
| /* Guard C code in headers, while including them from C++ */ | | /* Guard C code in headers, while including them from C++ */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| # define RPM_BEGIN_DECLS extern "C" { | | # define RPM_BEGIN_DECLS extern "C" { | |
| # define RPM_END_DECLS } | | # define RPM_END_DECLS } | |
| #else | | #else | |
| # define RPM_BEGIN_DECLS | | # define RPM_BEGIN_DECLS | |
| # define RPM_END_DECLS | | # define RPM_END_DECLS | |
| #endif | | #endif | |
| | | | |
|
| | | /* Rpm specific allocators which never return NULL but terminate on failure | |
| | | */ | |
| | | RPM_GNUC_MALLOC RPM_GNUC_ALLOC_SIZE(1) | |
| | | void * rmalloc(size_t size); | |
| | | | |
| | | RPM_GNUC_MALLOC RPM_GNUC_ALLOC_SIZE2(1,2) | |
| | | void * rcalloc(size_t nmemb, size_t size); | |
| | | | |
| | | RPM_GNUC_ALLOC_SIZE(2) | |
| | | void * rrealloc(void *ptr, size_t size); | |
| | | | |
| | | char * rstrdup(const char *str); | |
| | | | |
| | | /* Rpm specific free() which returns NULL */ | |
| | | void * rfree(void *ptr); | |
| | | | |
| | | /** \ingroup rpmutil | |
| | | * Memory allocation failure callback prototype. When registered through | |
| | | * rpmSetMemFail(), this gets called if memory allocation through rmalloc() | |
| | | * and friends fails. If the application can somehow recover memory here, | |
| | | * it can return a newly allocated memory block of requested size, otherwis | |
| | | e | |
| | | * it must return NULL after performing it's own shutdown deeds or | |
| | | * terminate itself. | |
| | | * @param size Size of allocation request in bytes | |
| | | * @param data User data (or NULL) | |
| | | * @return Allocated memory block of requested size or NULL | |
| | | */ | |
| | | typedef void * (*rpmMemFailFunc) (size_t size, void *data); | |
| | | | |
| | | /** \ingroup rpmutil | |
| | | * Set memory allocation failure callback. | |
| | | * @param func Allocation failure callback function | |
| | | * @param data User data (or NULL) | |
| | | * @return Previous callback function | |
| | | */ | |
| | | void * rpmSetMemFail(rpmMemFailFunc func, void *data); | |
| | | | |
| #endif /* _RPMUTIL_H */ | | #endif /* _RPMUTIL_H */ | |
| | | | |
End of changes. 5 change blocks. |
| 2 lines changed or deleted | | 53 lines changed or added | |
|