HEADER. -
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
typedef const char * errmsg_t
typedef int_32 * hTAG_t
typedef headerToken * Header
typedef headerIteratorS * 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(* HDRhdrread )(FD_t fd, enum hMagic magicp)
typedef int(* HDRhdrwrite )(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 *(* HDRhdrsprintf )(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 * entryInfo
typedef indexEntry * indexEntry
typedef sprintfTag * sprintfTag
typedef extensionCache * extensionCache
typedef sprintfToken * sprintfToken
enum headerSprintfExtenstionType { 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 }
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, char *dataStart, 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)
int headerNVR (Header h, const char **np, const char **vp, const char **rp)
void headerMergeLegacySigs (Header h, const Header sig)
Header headerRegenSigHeader (const Header h)
HV_s * hdrVec = &hdrVec1
unsigned char header_magic [8]
size_t headerMaxbytes = (32*1024*1024)
int typeSizes []
const struct headerSprintfExtension_s headerDefaultFormats []
Description of tag data.
Definition at line 25 of file header_internal.h.
Definition at line 110 of file header.h.
Referenced by headerSprintf(), parseExpression(), and parseFormat().
Definition at line 83 of file header_internal.h.
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.
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 497 of file header.h.
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()). *
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 553 of file header.h.
Add or append element to tag array in header.
Todo: Arg 'p' should have const.
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 529 of file header.h.
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!
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 515 of file header.h.
Duplicate a header.
Parameters:
Returns: new header instance
Definition at line 378 of file header.h.
Make a copy and convert header to in-memory representation.
Parameters:
Returns: header
Definition at line 396 of file header.h.
Duplicate tag values from one header into another.
Parameters:
Definition at line 609 of file header.h.
Dereference a header instance.
Parameters:
Returns: NULL always
Definition at line 303 of file header.h.
Destroy header tag iterator.
Parameters:
Returns: NULL always
Definition at line 618 of file header.h.
Free data allocated when retrieved from header.
Parameters:
Returns: NULL always
Definition at line 439 of file header.h.
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).
Parameters:
Return values:
Returns: 1 on success, 0 on failure
Definition at line 457 of file header.h.
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.
Parameters:
Return values:
Returns: 1 on success, 0 on failure
Definition at line 476 of file header.h.
Read (and load) header from file handle.
Parameters:
Returns: header (or NULL on error)
Definition at line 406 of file header.h.
Return formatted output string from header tags. The returned string must be free()d.
Parameters:
Return values:
Returns: formatted output string (malloc'ed)
Definition at line 596 of file header.h.
Write (with unload) header to file handle.
Parameters:
Returns: 0 on success, 1 on error
Definition at line 417 of file header.h.
Create header tag iterator.
Parameters:
Returns: header tag iterator
Definition at line 627 of file header.h.
Check if tag is in header.
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 428 of file header.h.
Reference a header instance.
Parameters:
Returns: referenced header instance
Definition at line 312 of file header.h.
Convert header to in-memory representation.
Parameters:
Returns: header
Definition at line 387 of file header.h.
Modify tag in header. If there are multiple entries with this tag, the first one gets replaced.
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 568 of file header.h.
Create new (empty) header instance.
Returns: header
Definition at line 294 of file header.h.
Return next tag from header.
Parameters:
Return values:
Returns: 1 on success, 0 on failure
Definition at line 640 of file header.h.
Convert header to on-disk representation, and then reload. This is used to insure that all header data is in one chunk.
Parameters:
Returns: on-disk header (with offsets)
Definition at line 369 of file header.h.
Delete tag in header. Removes all entries of type tag from the header, returns 1 if none were found.
Parameters:
Returns: 0 on success, 1 on failure (INCONSISTENT)
Definition at line 581 of file header.h.
Return size of on-disk header representation in bytes.
Parameters:
Returns: size of on-disk header
Definition at line 349 of file header.h.
Sort tags in header.
Todo: Eliminate from API.
Parameters:
Definition at line 330 of file header.h.
Dereference a header instance.
Parameters:
Returns: NULL always
Definition at line 321 of file header.h.
Convert header to on-disk representation.
Parameters:
Returns: on-disk header blob (i.e. with offsets)
Definition at line 358 of file header.h.
Restore tags in header to original ordering.
Todo: Eliminate from API.
Parameters:
Definition at line 339 of file header.h.
Definition at line 121 of file header.h.
Definition at line 125 of file header.h.
Define header tag output formats.
Definition at line 180 of file header.h.
HEADER_EXT_TAG format function prototype. This will only ever be passed RPM_INT32_TYPE or RPM_STRING_TYPE to help keep things simple.
Parameters:
Definition at line 157 of file header.h.
Associate tag names with numeric values.
Definition at line 130 of file header.h.
HEADER_EXT_FORMAT format function prototype. This is allowed to fail, which indicates the tag doesn't exist.
Parameters:
Return values:
Returns: 0 on success
Definition at line 171 of file header.h.
Definition at line 114 of file header.h.
Referenced by headerCopyTags(), headerNextIterator(), and intGetEntry().
Header method vectors.
Definition at line 650 of file header.h.
A single tag from a Header.
Definition at line 43 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(), alAddPackage(), checkPackageDeps(), compressFilelist(), descriptionTag(), doBuildFileList(), filenamesTag(), fpLookupHeader(), fssizesTag(), groupTag(), handleInstInstalledFiles(), handleOneTrigger(), handlePreambleTag(), headerFreeTag(), i18nTag(), IDTXglob(), IDTXload(), instprefixTag(), isMemberInEntry(), mergeFiles(), mireSkip(), printDeps(), providePackageNVR(), rangeMatchesDepFlags(), relocateFileList(), rpmdbAdd(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRemove(), rpmdepCheck(), rpmInstallLoadMacros(), rpmtransAddPackage(), rpmVerifyDigest(), rpmVerifyFile(), runImmedTriggers(), runInstScript(), runScript(), showQueryPackage(), summaryTag(), timeCheck(), triggercondsTag(), and triggertypeTag().
Definition at line 69 of file header_internal.h.
Definition at line 95 of file header_internal.h.
Enumeration values:
Definition at line 138 of file header.h.
Include calculation for 8 bytes of (magic, 0)?
Enumeration values:
Definition at line 205 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.
Enumeration values:
Definition at line 237 of file header.h.
The basic types of data in tags from headers.
Enumeration values:
Definition at line 213 of file header.h.
Retrieve data from header entry.
Todo: Permit retrieval of regions other than HEADER_IMUTABLE.
Parameters:
Return values:
Parameters:
Returns: 1 on success, otherwise error.
Definition at line 1251 of file header.c.
References ENTRY_IS_REGION, hCNT_t, HEADER_IMAGE, hPTR_t, hTYP_t, int_32, REGION_TAG_COUNT, regionSwab(), RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, and xmalloc().
Referenced by headerGetRawEntry(), headerNextIterator(), and intGetEntry().
Definition at line 503 of file header.c.
References _free(), entryInfo::count, indexEntry::data, ENTRY_IS_REGION, hdrchkData, hdrchkTags, HEADERFLAG_LEGACY, HEADERFLAG_SORTED, headerSort(), headerUnsort(), indexEntry::info, int_16, int_32, indexEntry::length, entryInfo::offset, indexEntry::rdlen, regionSwab(), RPM_INT16_TYPE, RPM_INT32_TYPE, entryInfo::tag, entryInfo::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.
Parameters:
Returns: 1 on success, 0 on failure
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()). *
Parameters:
Returns: 1 on success, 0 on failure
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.
Todo: Arg 'p' should have const.
Parameters:
Returns: 1 on success, 0 on failure
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!
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 336 of file hdrinline.h.
References h2hv(), HV_s::hdrappend, and int_32.
Duplicate a header.
Parameters:
Returns: new header instance
Definition at line 163 of file hdrinline.h.
References h2hv(), and HV_s::hdrcopy.
Make a copy and convert header to in-memory representation.
Parameters:
Returns: header
Definition at line 187 of file hdrinline.h.
Duplicate tag values from one header into another.
Parameters:
Definition at line 451 of file hdrinline.h.
References HV_s::hdrcopytags, and hTAG_t.
Dump a header in human readable format (for debugging).
Parameters:
Definition at line 30 of file header_internal.c.
References _, entryInfo::count, indexEntry::data, HEADER_DUMP_INLINE, headerToken::index, headerToken::indexUsed, indexEntry::info, int_16, int_32, int_8, headerTagTableEntry_s::name, entryInfo::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::tag, entryInfo::type, and headerTagTableEntry_s::val.
Dereference a header instance.
Parameters:
Returns: NULL always
Definition at line 47 of file hdrinline.h.
References h2hv(), and HV_s::hdrfree.
Free data allocated when retrieved from header.
Deprecated: Use headerFreeTag() instead.
Todo: Remove from API.
Parameters:
Returns: NULL always
Definition at line 698 of file header.h.
Referenced by formatValue(), headerCopy(), headerCopyTags(), initSourceHeader(), psmStage(), rpmCheckSig(), rpmInstall(), and rpmReSign().
Destroy header tag iterator.
Parameters:
Returns: NULL always
Definition at line 466 of file hdrinline.h.
Free data allocated when retrieved from header.
Parameters:
Returns: NULL always
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).
Parameters:
Return values:
Returns: 1 on success, 0 on failure
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.
Parameters:
Return values:
Returns: 1 on success, 0 on failure
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.
Parameters:
Returns: array of locales (or NULL on error)
Definition at line 11 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.
Parameters:
Return values:
Returns: 1 on success, 0 on failure
Referenced by headerGetLangs().
Create header tag iterator.
Parameters:
Returns: header tag iterator
Definition at line 478 of file hdrinline.h.
Check if tag is in header.
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 230 of file hdrinline.h.
References h2hv(), HV_s::hdrisentry, and int_32.
Reference a header instance.
Parameters:
Returns: new header reference
Definition at line 62 of file hdrinline.h.
References h2hv(), and HV_s::hdrlink.
Convert header to in-memory representation.
Parameters:
Returns: header
Definition at line 175 of file hdrinline.h.
Translate and merge legacy signature tags into header.
Parameters:
Definition at line 20 of file package.c.
References HAE_t, HEADER_SIGBASE, HEADER_TAGBASE, headerFreeIterator(), headerInitIterator(), headerIsEntry(), headerNextIterator(), HFD_t, int_32, 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 rpmReadPackageHeader(), rpmReadPackageInfo(), and writeRPM().
Modify tag in header. If there are multiple entries with this tag, the first one gets replaced.
Parameters:
Returns: 1 on success, 0 on failure
Definition at line 400 of file hdrinline.h.
References h2hv(), HV_s::hdrmodify, and int_32.
Create new (empty) header instance.
Returns: header
Definition at line 35 of file hdrinline.h.
References HV_s::hdrnew.
Referenced by headerCopy(), headerCopyWithConvert(), initSourceHeader(), newPackage(), newSpec(), psmStage(), rpmNewSignature(), rpmReadSignature(), and rpmReSign().
Return next tag from header.
Parameters:
Return values:
Returns: 1 on success, 0 on failure
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.
Parameters:
Return values:
Returns: 0 always
Definition at line 31 of file depends.c.
References headerGetEntry(), RPM_STRING_TYPE, RPMTAG_NAME, RPMTAG_RELEASE, and RPMTAG_VERSION.
Referenced by alAddPackage(), checkPackageDeps(), doSetupMacro(), genSourceRpmName(), handleOneTrigger(), headerMatchesDepFlags(), i18nTag(), IDTXglob(), IDTXload(), lookupPackage(), packageBinaries(), parseForSimple(), parsePreamble(), parseSpec(), printNewSpecfile(), processBinaryFiles(), providePackageNVR(), psAppend(), rpmdbAdd(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmdepCheck(), rpmInstall(), rpmtransAddPackage(), runScript(), showQueryPackage(), showVerifyPackage(), verifyDependencies(), and writeRPM().
Read (and load) header from file handle.
Parameters:
Returns: header (or NULL on error)
Definition at line 200 of file hdrinline.h.
References HV_s::hdrread, and hMagic.
Regenerate signature header.
Parameters:
Returns: regenerated signature header
Definition at line 75 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.
Convert header to on-disk representation, and then reload. This is used to insure that all header data is in one chunk.
Parameters:
Returns: on-disk header (with offsets)
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.
Parameters:
Returns: 0 on success, 1 on failure (INCONSISTENT)
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.
Parameters:
Returns: size of on-disk header
Definition at line 120 of file hdrinline.h.
References h2hv(), HV_s::hdrsizeof, and hMagic.
Sort tags in header.
Parameters:
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.
Parameters:
Return values:
Returns: formatted output string (malloc'ed)
Definition at line 435 of file hdrinline.h.
References errmsg_t, h2hv(), and HV_s::hdrsprintf.
Dereference a header instance.
Parameters:
Returns: new header reference
Definition at line 74 of file hdrinline.h.
References h2hv(), and HV_s::hdrunlink.
Convert header to on-disk representation.
Parameters:
Returns: on-disk header blob (i.e. with offsets)
Definition at line 135 of file hdrinline.h.
References h2hv(), and HV_s::hdrunload.
Restore tags in header to original ordering.
Parameters:
Definition at line 103 of file hdrinline.h.
References h2hv(), and HV_s::hdrunsort.
Return header reference count.
Parameters:
Returns: no. of references
Definition at line 164 of file header_internal.h.
Write (with unload) header to file handle.
Parameters:
Returns: 0 on success, 1 on error
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.
Parameters:
Returns: no. bytes of data in region, -1 on error
Definition at line 405 of file header.c.
References entryInfo::count, indexEntry::data, dataLength(), HEADER_I18NTABLE, HEADER_IMAGE, indexEntry::info, int_16, int_32, indexEntry::length, entryInfo::offset, indexEntry::rdlen, REGION_TAG_COUNT, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, entryInfo::tag, entryInfo::type, and typeSizes.
Referenced by copyEntry(), doHeaderUnload(), and headerLoad().
Header methods for rpm headers.
Definition at line 3279 of file header.c.
Initial value:
{ 0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00 }
Definition at line 40 of file header.c.
Referenced by headerRead(), and headerWrite().
Supported default header tag output formats.
Definition at line 199 of file header.h.
Maximum no. of bytes permitted in a header.
Definition at line 48 of file header.c.
Referenced by headerCopyLoad(), and headerRead().
Initial value:
{ 0, 1, 1, 2, 4, -1, -1, 1, -1, -1 }Alignment needs (and sizeof scalars types) for internal rpm data types.
Definition at line 66 of file header.c.
Referenced by dataLength(), doHeaderUnload(), headerSizeof(), and regionSwab().
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |