Files | |
file | formats.c |
file | hdrinline.h |
file | header.c |
file | header.h |
An rpm header carries all information about a package. | |
file | header_internal.c |
file | header_internal.h |
file | package.c |
file | rpmlib.h |
In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not. | |
Data Structures | |
struct | headerToken_s |
Typedefs | |
typedef const char * | errmsg_t |
typedef int_32 * | hTAG_t |
typedef headerToken_s * | Header |
typedef headerIterator_s * | HeaderIterator |
typedef headerTagTableEntry_s * | headerTagTableEntry |
typedef char *(* | headerTagFormatFunction )(int_32 type, const void *data, char *formatPrefix, int padding, int element) |
typedef int(* | headerTagTagFunction )(Header h, hTYP_t type, hPTR_t *data, hCNT_t count, int *freeData) |
typedef headerSprintfExtension_s * | headerSprintfExtension |
typedef enum rpmTagType_e | rpmTagType |
typedef enum rpmSubTagType_e | rpmSubTagType |
typedef Header(* | HDRnew )(void) |
typedef Header(* | HDRfree )(Header h) |
typedef Header(* | HDRlink )(Header h) |
typedef Header(* | HDRunlink )(Header h) |
typedef void(* | HDRsort )(Header h) |
typedef void(* | HDRunsort )(Header h) |
typedef unsigned int(* | HDRsizeof )(Header h, enum hMagic magicp) |
typedef void *(* | HDRunload )(Header h) |
typedef Header(* | HDRreload )(Header h, int tag) |
typedef Header(* | HDRcopy )(Header h) |
typedef Header(* | HDRload )(void *uh) |
typedef Header(* | HDRcopyload )(const void *uh) |
typedef Header(* | HDRread )(FD_t fd, enum hMagic magicp) |
typedef int(* | HDRwrite )(FD_t fd, Header h, enum hMagic magicp) |
typedef int(* | HDRisentry )(Header h, int_32 tag) |
typedef void *(* | HDRfreetag )(Header h, const void *data, rpmTagType type) |
typedef int(* | HDRget )(Header h, int_32 tag, hTYP_t type, void **p, hCNT_t c) |
typedef int(* | HDRgetmin )(Header h, int_32 tag, hTYP_t type, hPTR_t *p, hCNT_t c) |
typedef int(* | HDRadd )(Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
typedef int(* | HDRappend )(Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
typedef int(* | HDRaddorappend )(Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
typedef int(* | HDRaddi18n )(Header h, int_32 tag, const char *string, const char *lang) |
typedef int(* | HDRmodify )(Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
typedef int(* | HDRremove )(Header h, int_32 tag) |
typedef char *(* | HDRsprintf )(Header h, const char *fmt, const struct headerTagTableEntry_s *tags, const struct headerSprintfExtension_s *extensions, errmsg_t *errmsg) |
typedef void(* | HDRcopytags )(Header headerFrom, Header headerTo, hTAG_t tagstocopy) |
typedef HeaderIterator(* | HDRfreeiter )(HeaderIterator hi) |
typedef HeaderIterator(* | HDRinititer )(Header h) |
typedef int(* | HDRnextiter )(HeaderIterator hi, hTAG_t tag, hTYP_t type, hPTR_t *p, hCNT_t c) |
typedef HV_s * | HV_t |
typedef entryInfo_s * | entryInfo |
typedef indexEntry_s * | indexEntry |
typedef sprintfTag_s * | sprintfTag |
typedef rpmec_s * | rpmec |
typedef sprintfToken_s * | sprintfToken |
Enumerations | |
enum | headerSprintfExtensionType { HEADER_EXT_LAST = 0, HEADER_EXT_FORMAT, HEADER_EXT_MORE, HEADER_EXT_TAG } |
enum | hMagic { HEADER_MAGIC_NO = 0, HEADER_MAGIC_YES = 1 } |
enum | rpmTagType_e { RPM_NULL_TYPE = 0, RPM_CHAR_TYPE = 1, RPM_INT8_TYPE = 2, RPM_INT16_TYPE = 3, RPM_INT32_TYPE = 4, RPM_STRING_TYPE = 6, RPM_BIN_TYPE = 7, RPM_STRING_ARRAY_TYPE = 8, RPM_I18NSTRING_TYPE } |
enum | rpmSubTagType_e { RPM_REGION_TYPE = -10, RPM_BIN_ARRAY_TYPE = -11, RPM_XREF_TYPE = -12 } |
Functions | |
int | headerNVR (Header h, const char **np, const char **vp, const char **rp) |
int | headerNEVRA (Header h, const char **np, const char **ep, const char **vp, const char **rp, const char **ap) |
void | headerMergeLegacySigs (Header h, const Header sigh) |
Header | headerRegenSigHeader (const Header h, int noArchiveSize) |
int | rpmHeaderGetEntry (Header h, int_32 tag, int_32 *type, void **p, int_32 *c) |
HV_t | h2hv (Header h) |
Header | headerNew (void) |
Header | headerFree (Header h) |
Header | headerLink (Header h) |
Header | headerUnlink (Header h) |
void | headerSort (Header h) |
void | headerUnsort (Header h) |
unsigned int | headerSizeof (Header h, enum hMagic magicp) |
void * | headerUnload (Header h) |
Header | headerReload (Header h, int tag) |
Header | headerCopy (Header h) |
Header | headerLoad (void *uh) |
Header | headerCopyLoad (const void *uh) |
Header | headerRead (FD_t fd, enum hMagic magicp) |
int | headerWrite (FD_t fd, Header h, enum hMagic magicp) |
int | headerIsEntry (Header h, int_32 tag) |
void * | headerFreeTag (Header h, const void *data, rpmTagType type) |
int | headerGetEntry (Header h, int_32 tag, hTYP_t type, void **p, hCNT_t c) |
int | headerGetEntryMinMemory (Header h, int_32 tag, hTYP_t type, hPTR_t *p, hCNT_t c) |
int | headerAddEntry (Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
int | headerAppendEntry (Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
int | headerAddOrAppendEntry (Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
int | headerAddI18NString (Header h, int_32 tag, const char *string, const char *lang) |
int | headerModifyEntry (Header h, int_32 tag, int_32 type, const void *p, int_32 c) |
int | headerRemoveEntry (Header h, int_32 tag) |
char * | headerSprintf (Header h, const char *fmt, const struct headerTagTableEntry_s *tbltags, const struct headerSprintfExtension_s *extensions, errmsg_t *errmsg) |
void | headerCopyTags (Header headerFrom, Header headerTo, hTAG_t tagstocopy) |
HeaderIterator | headerFreeIterator (HeaderIterator hi) |
HeaderIterator | headerInitIterator (Header h) |
int | headerNextIterator (HeaderIterator hi, hTAG_t tag, hTYP_t type, hPTR_t *p, hCNT_t c) |
int | regionSwab (indexEntry entry, int il, int dl, entryInfo pe, unsigned char *dataStart, const unsigned char *dataEnd, int regionid) |
void * | doHeaderUnload (Header h, int *lengthPtr) |
int | copyEntry (const indexEntry entry, hTYP_t type, hPTR_t *p, hCNT_t c, int minMem) |
void * | headerFreeData (const void *data, rpmTagType type) |
char ** | headerGetLangs (Header h) |
int | headerGetRawEntry (Header h, int_32 tag, hTYP_t type, hPTR_t *p, hCNT_t c) |
int | headerUsageCount (Header h) |
void | headerDump (Header h, FILE *f, int flags, const struct headerTagTableEntry_s *tags) |
Variables | |
HV_s * | hdrVec = &hdrVec1 |
unsigned char | header_magic [8] |
int | typeAlign [16] |
int | typeSizes [16] |
size_t | headerMaxbytes = (32*1024*1024) |
const struct headerSprintfExtension_s | headerDefaultFormats [] |
|
Description of tag data. Definition at line 25 of file header_internal.h. |
|
Definition at line 104 of file header.h. Referenced by hdrSprintf(), and headerSprintf(). |
|
Add tag to header. Duplicate tags are okay, but only defined for iteration (with the exceptions noted below). While you are allowed to add i18n string arrays through this function, you probably don't mean to. See headerAddI18NString() instead.
|
|
Add locale specific tag to header. A NULL lang is interpreted as the C locale. Here are the rules: * - If the tag isn't in the header, it's added with the passed string * as new value. * - If the tag occurs multiple times in entry, which tag is affected * by the operation is undefined. * - If the tag is in the header w/ this language, the entry is * *replaced* (like headerModifyEntry()). *
|
|
Add or 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 RPM_STRING_TYPE. Any pointers into header memory returned from headerGetEntryMinMemory() for this entry are invalid after this call has been made!
|
|
Duplicate a header.
|
|
Make a copy and convert header to in-memory representation.
|
|
Duplicate tag values from one header into another.
|
|
Dereference a header instance.
|
|
Destroy header tag iterator.
|
|
Free data allocated when retrieved from header.
|
|
Retrieve tag value. Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE entry is present).
|
|
Retrieve tag value using header internal array. Get an entry using as little extra RAM as possible to return the tag value. This is only an issue for RPM_STRING_ARRAY_TYPE.
|
|
Create header tag iterator.
|
|
Check if tag is in header.
|
|
Reference a header instance.
|
|
Convert header to in-memory representation.
|
|
Modify tag in header. If there are multiple entries with this tag, the first one gets replaced.
|
|
Create new (empty) header instance.
|
|
Return next tag from header.
|
|
Read (and load) header from file handle.
|
|
Convert header to on-disk representation, and then reload. This is used to insure that all header data is in one chunk.
|
|
Delete tag in header. Removes all entries of type tag from the header, returns 1 if none were found.
|
|
Return size of on-disk header representation in bytes.
|
|
Sort tags in header.
|
|
Return formatted output string from header tags. The returned string must be free()d.
|
|
Dereference a header instance.
|
|
Convert header to on-disk representation.
|
|
Restore tags in header to original ordering.
|
|
Write (with unload) header to file handle.
|
|
|
|
|
|
Define header tag output formats. |
|
HEADER_EXT_TAG format function prototype. This will only ever be passed RPM_INT32_TYPE or RPM_STRING_TYPE to help keep things simple.
|
|
Associate tag names with numeric values. |
|
HEADER_EXT_FORMAT format function prototype. This is allowed to fail, which indicates the tag doesn't exist.
Definition at line 168 of file header.h. Referenced by getExtension(). |
|
Definition at line 108 of file header.h. Referenced by headerCopyTags(), headerNextIterator(), and intGetEntry(). |
|
Header method vectors. |
|
A single tag from a Header. Definition at line 43 of file header_internal.h. |
|
Extension cache. Definition at line 95 of file header_internal.h. |
|
New rpm data types under consideration/development. These data types may (or may not) be added to rpm at some point. In order to avoid incompatibility with legacy versions of rpm, these data (sub-)types are introduced into the header by overloading RPM_BIN_TYPE, with the binary value of the tag a 16 byte image of what should/will be in the header index, followed by per-tag private data. |
|
The basic types of data in tags from headers. Referenced by addReqProv(), compressFilelist(), descriptionTag(), fileclassTag(), filenamesTag(), fileprovideTag(), filerequireTag(), fssizesTag(), groupTag(), handleOneTrigger(), handlePreambleTag(), headerFreeTag(), i18nTag(), IDTXglob(), IDTXload(), instprefixTag(), isMemberInEntry(), mireSkip(), providePackageNVR(), relocateFileList(), rpmdbAdd(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRemove(), rpmdsNew(), rpmfiBuildFNames(), rpmInstallLoadMacros(), runImmedTriggers(), runInstScript(), runScript(), summaryTag(), timeCheck(), triggercondsTag(), and triggertypeTag(). |
|
Definition at line 75 of file header_internal.h. |
|
Definition at line 107 of file header_internal.h. |
|
|
|
Include calculation for 8 bytes of (magic, 0)? Definition at line 204 of file header.h. Referenced by headerRead(), headerSizeof(), and headerWrite(). |
|
New rpm data types under consideration/development. These data types may (or may not) be added to rpm at some point. In order to avoid incompatibility with legacy versions of rpm, these data (sub-)types are introduced into the header by overloading RPM_BIN_TYPE, with the binary value of the tag a 16 byte image of what should/will be in the header index, followed by per-tag private data. |
|
The basic types of data in tags from headers. |
|
Retrieve data from header entry.
Definition at line 1409 of file header.c. References entryInfo_s::count, indexEntry_s::data, ENTRY_IS_REGION, hCNT_t, HEADER_IMAGE, hPTR_t, hTYP_t, indexEntry_s::info, int_32, indexEntry_s::length, entryInfo_s::offset, indexEntry_s::rdlen, REGION_TAG_COUNT, regionSwab(), RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, entryInfo_s::tag, entryInfo_s::type, and xmalloc(). Referenced by headerGetRawEntry(), headerNextIterator(), and intGetEntry(). |
|
Definition at line 617 of file header.c. References _free(), entryInfo_s::count, indexEntry_s::data, ENTRY_IS_REGION, headerToken_s::flags, hdrchkData, hdrchkTags, HEADERFLAG_LEGACY, HEADERFLAG_SORTED, headerSort(), headerUnsort(), headerToken_s::index, headerToken_s::indexUsed, indexEntry_s::info, int_16, int_32, indexEntry_s::length, entryInfo_s::offset, indexEntry_s::rdlen, regionSwab(), RPM_INT16_TYPE, RPM_INT32_TYPE, entryInfo_s::tag, entryInfo_s::type, typeSizes, and xmalloc(). Referenced by headerReload(), headerUnload(), and headerWrite(). |
|
Definition at line 22 of file hdrinline.h. Referenced by headerAddEntry(), headerAddI18NString(), headerAddOrAppendEntry(), headerAppendEntry(), headerCopy(), headerFree(), headerFreeTag(), headerGetEntry(), headerGetEntryMinMemory(), headerIsEntry(), headerLink(), headerModifyEntry(), headerReload(), headerRemoveEntry(), headerSizeof(), headerSort(), headerSprintf(), headerUnlink(), headerUnload(), headerUnsort(), and headerWrite(). |
|
Add tag to header. Duplicate tags are okay, but only defined for iteration (with the exceptions noted below). While you are allowed to add i18n string arrays through this function, you probably don't mean to. See headerAddI18NString() instead.
Definition at line 315 of file hdrinline.h. References h2hv(), HV_s::hdradd, and int_32. |
|
Add locale specific tag to header. A NULL lang is interpreted as the C locale. Here are the rules: * - If the tag isn't in the header, it's added with the passed string * as new value. * - If the tag occurs multiple times in entry, which tag is affected * by the operation is undefined. * - If the tag is in the header w/ this language, the entry is * *replaced* (like headerModifyEntry()). *
Definition at line 382 of file hdrinline.h. References h2hv(), HV_s::hdraddi18n, and int_32. |
|
Add or append element to tag array in header.
Definition at line 354 of file hdrinline.h. References h2hv(), HV_s::hdraddorappend, and int_32. |
|
Append element to tag array in header. 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 headerGetEntryMinMemory() for this entry are invalid after this call has been made!
Definition at line 336 of file hdrinline.h. References h2hv(), HV_s::hdrappend, and int_32. |
|
Duplicate a header.
Definition at line 163 of file hdrinline.h. References h2hv(), and HV_s::hdrcopy. |
|
Make a copy and convert header to in-memory representation.
Definition at line 187 of file hdrinline.h. References HV_s::hdrcopyload. |
|
Duplicate tag values from one header into another.
Definition at line 451 of file hdrinline.h. References HV_s::hdrcopytags, and hTAG_t. |
|
Dump a header in human readable format (for debugging).
Definition at line 35 of file header_internal.c. References _, entryInfo_s::count, indexEntry_s::data, HEADER_DUMP_INLINE, headerToken_s::index, headerToken_s::indexUsed, indexEntry_s::info, int_16, int_32, int_8, headerTagTableEntry_s::name, entryInfo_s::offset, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, entryInfo_s::tag, entryInfo_s::type, and headerTagTableEntry_s::val. Referenced by main(). |
|
Dereference a header instance.
Definition at line 47 of file hdrinline.h. References h2hv(), and HV_s::hdrfree. |
|
Free data allocated when retrieved from header.
Definition at line 701 of file header.h. Referenced by formatValue(), getSignid(), headerCopy(), headerCopyTags(), initSourceHeader(), makeHDRSignature(), readFile(), rhnUnload(), rpmInstall(), rpmMergeHeaders(), rpmpsmStage(), rpmReadPackageFile(), rpmReSign(), rpmtsCleanDig(), rpmtsFindPubkey(), and rpmtsSetSig(). |
|
Destroy header tag iterator.
Definition at line 466 of file hdrinline.h. References HV_s::hdrfreeiter. |
|
Free data allocated when retrieved from header.
Definition at line 247 of file hdrinline.h. References h2hv(), HV_s::hdrfreetag, and rpmTagType. |
|
Retrieve tag value. Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE entry is present).
Definition at line 268 of file hdrinline.h. References h2hv(), hCNT_t, HV_s::hdrget, hTYP_t, and int_32. |
|
Retrieve tag value using header internal array. Get an entry using as little extra RAM as possible to return the tag value. This is only an issue for RPM_STRING_ARRAY_TYPE.
Definition at line 290 of file hdrinline.h. References h2hv(), hCNT_t, HV_s::hdrgetmin, hPTR_t, hTYP_t, and int_32. |
|
Return array of locales found in header. The array is terminated with a NULL sentinel.
Definition at line 13 of file header_internal.c. References HEADER_I18NTABLE, headerGetRawEntry(), and xcalloc(). |
|
Retrieve tag value with type match. If *type is RPM_NULL_TYPE any type will match, otherwise only *type will match.
Referenced by headerGetLangs(). |
|
Create header tag iterator.
Definition at line 478 of file hdrinline.h. References HV_s::hdrinititer. |
|
Check if tag is in header.
Definition at line 230 of file hdrinline.h. References h2hv(), HV_s::hdrisentry, and int_32. |
|
Reference a header instance.
Definition at line 62 of file hdrinline.h. References h2hv(), and HV_s::hdrlink. |
|
Convert header to in-memory representation.
Definition at line 175 of file hdrinline.h. References HV_s::hdrload. |
|
Translate and merge legacy signature tags into header.
Definition at line 98 of file package.c. References HAE_t, hdrchkData, hdrchkType, HEADER_SIGBASE, HEADER_TAGBASE, headerFreeIterator(), headerInitIterator(), headerIsEntry(), headerNextIterator(), HFD_t, int_32, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, RPMTAG_ARCHIVESIZE, RPMTAG_SIGGPG, RPMTAG_SIGLEMD5_1, RPMTAG_SIGLEMD5_2, RPMTAG_SIGMD5, RPMTAG_SIGPGP, RPMTAG_SIGPGP5, and RPMTAG_SIGSIZE. Referenced by rpmReadPackageFile(), and writeRPM(). |
|
Modify tag in header. If there are multiple entries with this tag, the first one gets replaced.
Definition at line 400 of file hdrinline.h. References h2hv(), HV_s::hdrmodify, and int_32. |
|
Return name, epoch, version, release, arch strings from header.
Definition at line 34 of file hdrNVR.c. References headerGetEntry(), RPM_STRING_TYPE, RPMTAG_ARCH, RPMTAG_NAME, RPMTAG_RELEASE, and RPMTAG_VERSION. |
|
Create new (empty) header instance.
Definition at line 35 of file hdrinline.h. References HV_s::hdrnew. Referenced by headerCopy(), headerCopyWithConvert(), initSourceHeader(), newPackage(), newSpec(), rpmcliImportPubkey(), rpmNewSignature(), rpmpsmStage(), and rpmReSign(). |
|
Return next tag from header.
Definition at line 494 of file hdrinline.h. References hCNT_t, HV_s::hdrnextiter, hPTR_t, hTAG_t, and hTYP_t. |
|
Return name, version, release strings from header.
Definition at line 9 of file hdrNVR.c. References headerGetEntry(), RPM_STRING_TYPE, RPMTAG_NAME, RPMTAG_RELEASE, and RPMTAG_VERSION. Referenced by doSetupMacro(), genSourceRpmName(), handleOneTrigger(), hGetNEVR(), i18nTag(), lookupPackage(), packageBinaries(), parseForSimple(), parsePreamble(), parseSpec(), printNewSpecfile(), processBinaryFiles(), providePackageNVR(), rpmdbRebuild(), rpmdbRemove(), rpmdsNVRMatchesDep(), rpmdsThis(), rpmInstall(), rpmtsCallback(), runScript(), and writeRPM(). |
|
Read (and load) header from file handle.
Definition at line 200 of file hdrinline.h. References HV_s::hdrread, and hMagic. |
|
Regenerate signature header.
Definition at line 178 of file package.c. References HEADER_SIGBASE, HEADER_TAGBASE, headerAddEntry(), headerFreeIterator(), headerInitIterator(), headerIsEntry(), headerNextIterator(), HFD_t, int_32, rpmNewSignature(), RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_SIZE, RPMTAG_ARCHIVESIZE, RPMTAG_DSAHEADER, RPMTAG_RSAHEADER, RPMTAG_SHA1HEADER, RPMTAG_SIGGPG, RPMTAG_SIGLEMD5_1, RPMTAG_SIGLEMD5_2, RPMTAG_SIGMD5, RPMTAG_SIGPGP, RPMTAG_SIGPGP5, and RPMTAG_SIGSIZE. Referenced by rpmpsmStage(). |
|
Convert header to on-disk representation, and then reload. This is used to insure that all header data is in one chunk.
Definition at line 149 of file hdrinline.h. References h2hv(), and HV_s::hdrreload. |
|
Delete tag in header. Removes all entries of type tag from the header, returns 1 if none were found.
Definition at line 417 of file hdrinline.h. References h2hv(), HV_s::hdrremove, and int_32. |
|
Return size of on-disk header representation in bytes.
Definition at line 120 of file hdrinline.h. References h2hv(), HV_s::hdrsizeof, and hMagic. |
|
Sort tags in header.
Definition at line 89 of file hdrinline.h. References h2hv(), and HV_s::hdrsort. |
|
Return formatted output string from header tags. The returned string must be free()d.
Definition at line 435 of file hdrinline.h. References errmsg_t, h2hv(), and HV_s::hdrsprintf. |
|
Dereference a header instance.
Definition at line 74 of file hdrinline.h. References h2hv(), and HV_s::hdrunlink. |
|
Convert header to on-disk representation.
Definition at line 135 of file hdrinline.h. References h2hv(), and HV_s::hdrunload. |
|
Restore tags in header to original ordering.
Definition at line 103 of file hdrinline.h. References h2hv(), and HV_s::hdrunsort. |
|
Return header reference count.
Definition at line 186 of file header_internal.h. References headerToken_s::nrefs. |
|
Write (with unload) header to file handle.
Definition at line 214 of file hdrinline.h. References h2hv(), HV_s::hdrwrite, and hMagic. |
|
Swap int_32 and int_16 arrays within header region. This code is way more twisty than I would like. A bug with RPM_I18NSTRING_TYPE in rpm-2.5.x (fixed in August 1998) causes the offset and length of elements in a header region to disagree regarding the total length of the region data. The "fix" is to compute the size using both offset and length and return the larger of the two numbers as the size of the region. Kinda like computing left and right Riemann sums of the data elements to determine the size of a data structure, go figger :-). There's one other twist if a header region tag is in the set to be swabbed, as the data for a header region is located after all other tag data.
Definition at line 483 of file header.c. References entryInfo_s::count, indexEntry_s::data, dataLength(), hdrchkAlign, hdrchkData, hdrchkType, HEADER_I18NTABLE, HEADER_IMAGE, indexEntry_s::info, int_16, int_32, indexEntry_s::length, entryInfo_s::offset, indexEntry_s::rdlen, REGION_TAG_COUNT, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, entryInfo_s::tag, entryInfo_s::type, and typeSizes. Referenced by copyEntry(), doHeaderUnload(), and headerLoad(). |
|
Retrieve tag info from header. This is a "dressed" entry to headerGetEntry to do: 1) DIRNAME/BASENAME/DIRINDICES -> FILENAMES tag conversions. 2) i18n lookaside (if enabled).
Definition at line 398 of file misc.c. References headerGetEntry(), headerSprintf(), int_32, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, rpmfiBuildFNames(), RPMTAG_BASENAMES, RPMTAG_DESCRIPTION, RPMTAG_GROUP, RPMTAG_OLDFILENAMES, RPMTAG_SUMMARY, stpcpy(), and tagName(). Referenced by hdr_subscript(). |
|
Header methods for rpm headers. |
|
Initial value: { 0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00 } Definition at line 47 of file header.c. Referenced by headerRead(), and headerWrite(). |
|
Supported default header tag output formats. |
|
Maximum no. of bytes permitted in a header. Definition at line 101 of file header.c. Referenced by headerCopyLoad(), and headerRead(). |
|
Initial value: { 1, 1, 1, 2, 4, 8, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 } |
|
Initial value: { 0, 1, 1, 2, 4, -1, -1, 1, -1, -1, 0, 0, 0, 0, 0, 0 } Definition at line 78 of file header.c. Referenced by dataLength(), doHeaderUnload(), headerSizeof(), and regionSwab(). |