|
Description of tag data. Definition at line 25 of file header_internal.h. |
|
Definition at line 112 of file header.h. Referenced by hdrSprintf(), headerSprintf(), parseExpression(), and parseFormat(). |
|
Definition at line 86 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.
|
|
Add locale specific tag to header. A NULL lang is interpreted as the C locale. Here are the rules: This function is intended to just "do the right thing". If you need more fine grained control use headerAddEntry() and 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.
|
|
Read (and load) header from file handle.
|
|
Return formatted output string from header tags. The returned string must be free()d.
|
|
Write (with unload) header to file handle.
|
|
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.
|
|
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.
|
|
Dereference a header instance.
|
|
Convert header to on-disk representation.
|
|
Restore tags in header to original ordering.
|
|
|
Definition at line 127 of file header.h. Referenced by checkForDuplicates(), hdrKeyList(), headerCopyWithConvert(), headerFreeIterator(), headerInitIterator(), headerMergeLegacySigs(), headerNextIterator(), headerRegenSigHeader(), initSourceHeader(), psmStage(), rpmCheckSig(), and rpmMergeHeaders(). |
|
Define header tag output formats. Definition at line 182 of file header.h. Referenced by allocateExtensionCache(), findTag(), formatValue(), freeExtensionCache(), hdrSubscript(), initrpm(), parseExpression(), parseFormat(), and singleSprintf(). |
|
HEADER_EXT_TAG format function prototype. This will only ever be passed RPM_INT32_TYPE or RPM_STRING_TYPE to help keep things simple.
Definition at line 159 of file header.h. Referenced by formatValue(). |
|
Associate tag names with numeric values. Definition at line 132 of file header.h. Referenced by findTag(), getTagString(), getTagVal(), parseExpression(), and parseFormat(). |
|
HEADER_EXT_FORMAT format function prototype. This is allowed to fail, which indicates the tag doesn't exist.
Definition at line 173 of file header.h. Referenced by getExtension(). |
|
Definition at line 116 of file header.h. Referenced by headerCopyTags(), headerNextIterator(), and intGetEntry(). |
|
Header method vectors. Definition at line 652 of file header.h. Referenced by h2hv(). |
|
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. |
|
|
Definition at line 72 of file header_internal.h. |
|
Definition at line 98 of file header_internal.h. |
|
|
|
Include calculation for 8 bytes of (magic, 0)? |
|
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 1249 of file header.c. References entryInfo::count, indexEntry::data, ENTRY_IS_REGION, hCNT_t, HEADER_IMAGE, hPTR_t, hTYP_t, indexEntry::info, int_32, indexEntry::length, entryInfo::offset, indexEntry::rdlen, REGION_TAG_COUNT, regionSwab(), RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, entryInfo::tag, entryInfo::type, and xmalloc(). Referenced by headerGetRawEntry(), and intGetEntry(). |
|
Definition at line 501 of file header.c. References _free(), entryInfo::count, ENTRY_IS_REGION, headerToken::flags, hdrchkData, hdrchkTags, Header, HEADERFLAG_LEGACY, HEADERFLAG_SORTED, headerSort(), headerUnsort(), headerToken::index, headerToken::indexUsed, int_16, int_32, entryInfo::offset, regionSwab(), RPM_INT16_TYPE, RPM_INT32_TYPE, entryInfo::tag, entryInfo::type, typeSizes, and xmalloc(). |
|
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, Header, and int_32. Referenced by addChangelogEntry(), addFileToTag(), fillOutMainPackage(), genCpioListAndHeader(), handlePreambleTag(), headerCopyWithConvert(), headerInject(), headerRegenSigHeader(), initSourceHeader(), mungeFilelist(), packageBinaries(), packageSources(), parsePreamble(), parseScript(), parseSpec(), psmStage(), readIcon(), readPackageHeaders(), rhnLoad(), rhnUnload(), rpmAddSignature(), rpmdbAdd(), rpmdbRemove(), rpmMergeHeaders(), rpmReadSignature(), and writeRPM(). |
|
Add locale specific tag to header. A NULL lang is interpreted as the C locale. Here are the rules: This function is intended to just "do the right thing". If you need more fine grained control use headerAddEntry() and headerModifyEntry().
Definition at line 382 of file hdrinline.h. References h2hv(), HV_s::hdraddi18n, Header, and int_32. Referenced by handlePreambleTag(), and parseDescription(). |
|
Add or append element to tag array in header.
Definition at line 354 of file hdrinline.h. References h2hv(), HV_s::hdraddorappend, Header, and int_32. Referenced by addFileToArrayTag(), addOrAppendListEntry(), addReqProv(), genCpioListAndHeader(), mergeFiles(), processScriptFiles(), processSourceFiles(), and providePackageNVR(). |
|
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, Header, and int_32. Referenced by addChangelogEntry(). |
|
Duplicate a header.
Definition at line 163 of file hdrinline.h. References h2hv(), HV_s::hdrcopy, and Header. Referenced by hdrUnload(), psmStage(), relocateFileList(), and rpmdbRebuild(). |
|
Make a copy and convert header to in-memory representation.
Definition at line 187 of file hdrinline.h. References HV_s::hdrcopyload, hdrVec, and Header. Referenced by psmStage(), rpmdbNextIterator(), and rpmReSign(). |
|
Duplicate tag values from one header into another.
Definition at line 451 of file hdrinline.h. References HV_s::hdrcopytags, hdrVec, Header, and hTAG_t. Referenced by headerInject(), packageBinaries(), and parsePreamble(). |
|
Dump a header in human readable format (for debugging).
Definition at line 30 of file header_internal.c. References _, entryInfo::count, indexEntry::data, Header, 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, and entryInfo::type. Referenced by main(). |
|
Dereference a header instance.
Definition at line 47 of file hdrinline.h. References h2hv(), HV_s::hdrfree, and Header. Referenced by alFree(), db1cput(), dbiFindMatches(), doGetRecord(), freeFi(), freePackage(), freeSpec(), hdrDealloc(), hdrUnload(), headerInject(), IDTXfree(), IDTXglob(), loadFi(), main(), psmStage(), readPackageHeaders(), readRPM(), rhnLoad(), rhnUnload(), rpmdbFindByFile(), rpmdbFreeIterator(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmdepFreeConflicts(), rpmFreeSignature(), rpmInstall(), rpmInstallSourcePackage(), rpmMergeHeaders(), rpmProblemSetFree(), rpmQueryVerify(), rpmReadSignature(), rpmReSign(), rpmRollback(), rpmRunTransactions(), and writeRPM(). |
|
Free data allocated when retrieved from header.
Definition at line 700 of file header.h. References RPM_BIN_TYPE, RPM_I18NSTRING_TYPE, and RPM_STRING_ARRAY_TYPE. Referenced by formatValue(), initSourceHeader(), psmStage(), rhnUnload(), rpmCheckSig(), rpmInstall(), rpmMergeHeaders(), and singleSprintf(). |
|
Destroy header tag iterator.
Definition at line 466 of file hdrinline.h. References HV_s::hdrfreeiter, hdrVec, and HeaderIterator. Referenced by checkForDuplicates(), hdrKeyList(), headerCopyWithConvert(), headerMergeLegacySigs(), headerRegenSigHeader(), initSourceHeader(), psmStage(), rpmCheckSig(), and rpmMergeHeaders(). |
|
Free data allocated when retrieved from header.
Definition at line 247 of file hdrinline.h. References h2hv(), HV_s::hdrfreetag, Header, 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, Header, hTYP_t, and int_32. Referenced by addLostFiles(), archOkay(), findPackagesWithRelocatedFiles(), findUpgradePackages(), findUpgradeSet(), formatValue(), hdrVerifyFile(), headerNVR(), main(), osOkay(), psGetArchScore(), psmStage(), readPackageHeaders(), removeMovedFilesAlreadyHandled(), rhnLoad(), rhnUnload(), rpmHeaderGetEntry(), rpmInstall(), rpmMergeHeaders(), rpmPackageGetEntry(), rpmReadSignature(), rpmReSign(), rpmRunTransactions(), rpmVersionCompare(), singleSprintf(), and unmarkPackagesAlreadyInstalled(). |
|
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, Header, hPTR_t, hTYP_t, and int_32. Referenced by addLostFiles(), doGetRecord(), findPackagesWithObsoletes(), findPackagesWithRelocatedFiles(), findUpgradePackages(), and removeMovedFilesAlreadyHandled(). |
|
Return array of locales found in header. The array is terminated with a NULL sentinel.
Definition at line 11 of file header_internal.c. References Header, 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, hdrVec, Header, and HeaderIterator. Referenced by checkForDuplicates(), hdrKeyList(), headerCopyWithConvert(), headerMergeLegacySigs(), headerRegenSigHeader(), initSourceHeader(), psmStage(), rpmCheckSig(), and rpmMergeHeaders(). |
|
Check if tag is in header.
Definition at line 230 of file hdrinline.h. References h2hv(), HV_s::hdrisentry, Header, and int_32. Referenced by addChangelogEntry(), checkForRequired(), checkSpec(), compressFilelist(), doGetRecord(), expandFilelist(), fillOutMainPackage(), headerGetRawEntry(), headerInject(), headerMergeLegacySigs(), headerRegenSigHeader(), mungeFilelist(), parseDescription(), parseScript(), parseSpec(), processBinaryFiles(), psmStage(), readPackageHeaders(), relocateFileList(), rhnLoad(), rhnUnload(), rpmdbAdd(), rpmdbNextIterator(), rpmdbRebuild(), rpmHeaderFromPackage(), rpmInstallSourcePackage(), rpmPackageGetEntry(), rpmReadSignature(), rpmtransAddPackage(), singleSprintf(), and verifyHeader(). |
|
Reference a header instance.
Definition at line 62 of file hdrinline.h. References h2hv(), HV_s::hdrlink, and Header. Referenced by alAddPackage(), checkPackageDeps(), dbiFindMatches(), getTsHeader(), hdrUnload(), IDTXglob(), IDTXload(), loadFi(), psAppend(), psmStage(), relocateFileList(), rhnUnload(), rpmdbFindByFile(), rpmdbMINext(), rpmdbRemove(), rpmdbSubscript(), rpmReSign(), rpmRunTransactions(), and writeRPM(). |
|
Convert header to in-memory representation.
Definition at line 175 of file hdrinline.h. References HV_s::hdrload, hdrVec, and Header. Referenced by db1cput(), hdrLoad(), rhnLoad(), and rhnUnload(). |
|
Translate and merge legacy signature tags into header.
Definition at line 20 of file package.c. References HAE_t, Header, HEADER_SIGBASE, HEADER_TAGBASE, headerFreeIterator(), headerInitIterator(), headerIsEntry(), HeaderIterator, headerNextIterator(), HFD_t, int_32, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_SIZE, 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.
Definition at line 400 of file hdrinline.h. References h2hv(), HV_s::hdrmodify, Header, and int_32. Referenced by doGetRecord(). |
|
Create new (empty) header instance.
Definition at line 35 of file hdrinline.h. References HV_s::hdrnew, hdrVec, and Header. Referenced by headerCopyWithConvert(), initSourceHeader(), newPackage(), newSpec(), psmStage(), rpmNewSignature(), and rpmReadSignature(). |
|
Return next tag from header.
Definition at line 494 of file hdrinline.h. References hCNT_t, HV_s::hdrnextiter, hdrVec, HeaderIterator, hPTR_t, hTAG_t, and hTYP_t. Referenced by checkForDuplicates(), hdrKeyList(), headerCopyWithConvert(), headerMergeLegacySigs(), headerRegenSigHeader(), initSourceHeader(), psmStage(), rpmCheckSig(), and rpmMergeHeaders(). |
|
Return name, version, release strings from header.
Definition at line 31 of file depends.c. References Header, 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.
Definition at line 200 of file hdrinline.h. References FD_t, HV_s::hdrread, hdrVec, and Header. Referenced by doGetRecord(), main(), readPackageHeaders(), rpmMergeHeaders(), rpmReadHeaders(), rpmReadSignature(), and writeRPM(). |
|
Regenerate signature header.
Definition at line 69 of file package.c. References Header, HEADER_SIGBASE, HEADER_TAGBASE, headerAddEntry(), headerFreeIterator(), headerInitIterator(), headerIsEntry(), HeaderIterator, headerNextIterator(), HFD_t, int_32, rpmNewSignature(), RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_SIZE, RPMTAG_SIGGPG, RPMTAG_SIGLEMD5_1, RPMTAG_SIGLEMD5_2, RPMTAG_SIGMD5, RPMTAG_SIGPGP, RPMTAG_SIGPGP5, and RPMTAG_SIGSIZE. Referenced by psmStage(). |
|
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(), HV_s::hdrreload, and Header. Referenced by rhnUnload(), and writeRPM(). |
|
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, Header, and int_32. Referenced by addFileToTag(), readPackageHeaders(), rpmdbAdd(), rpmMergeHeaders(), and rpmReSign(). |
|
Return size of on-disk header representation in bytes.
Definition at line 120 of file hdrinline.h. References h2hv(), HV_s::hdrsizeof, and Header. Referenced by db1cput(), dbiUpdateRecord(), hdrUnload(), rhnUnload(), rpmdbAdd(), rpmReadSignature(), and rpmWriteSignature(). |
|
Sort tags in header.
Definition at line 89 of file hdrinline.h. References h2hv(), HV_s::hdrsort, and Header. Referenced by doHeaderUnload(), findEntry(), and headerInject(). |
|
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(), HV_s::hdrsprintf, and Header. Referenced by hdrSprintf(), packageBinaries(), printNewSpecfile(), psmStage(), queryHeader(), rpmHeaderGetEntry(), and rpmShowProgress(). |
|
Dereference a header instance.
Definition at line 74 of file hdrinline.h. References h2hv(), HV_s::hdrunlink, and Header. |
|
Convert header to on-disk representation.
Definition at line 135 of file hdrinline.h. References h2hv(), HV_s::hdrunload, and Header. Referenced by dbiUpdateRecord(), doGetRecord(), hdrUnload(), and rhnUnload(). |
|
Restore tags in header to original ordering.
Definition at line 103 of file hdrinline.h. References h2hv(), HV_s::hdrunsort, and Header. Referenced by doHeaderUnload(). |
|
Return header reference count.
Definition at line 167 of file header_internal.h. References Header. |
|
Write (with unload) header to file handle.
Definition at line 214 of file hdrinline.h. References FD_t, h2hv(), HV_s::hdrwrite, and Header. Referenced by db1cput(), main(), psmStage(), rpmWriteSignature(), and writeRPM(). |
|
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 403 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, RPM_MAX_TYPE, RPM_MIN_TYPE, entryInfo::tag, entryInfo::type, and typeSizes. Referenced by copyEntry(), and doHeaderUnload(). |
|
Header methods for rpm headers. Definition at line 3250 of file header.c. Referenced by headerCopyLoad(), headerCopyTags(), headerFreeIterator(), headerInitIterator(), headerLoad(), headerNew(), headerNextIterator(), and headerRead(). |
|
Initial value: { 0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00 } |
|
Supported default header tag output formats. |
|
Initial value: { { HEADER_EXT_FORMAT, "octal", { octalFormat } }, { HEADER_EXT_FORMAT, "hex", { hexFormat } }, { HEADER_EXT_FORMAT, "date", { dateFormat } }, { HEADER_EXT_FORMAT, "day", { dayFormat } }, { HEADER_EXT_FORMAT, "shescape", { shescapeFormat } }, { HEADER_EXT_LAST, NULL, { NULL } } } |
|
Maximum no. of bytes permitted in a header. |
|
Initial value: { 0, 1, 1, 2, 4, -1, -1, 1, -1, -1 } Definition at line 64 of file header.c. Referenced by dataLength(), doHeaderUnload(), and regionSwab(). |