#include "system.h"
#include "rpmio_internal.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include <rpmds.h>
#include <rpmfi.h>
#include "legacy.h"
#include "manifest.h"
#include "argv.h"
#include "misc.h"
#include "fs.h"
#include "debug.h"
Include dependency graph for formats.c:
Go to the source code of this file.
Defines | |
#define | _RPMEVR_INTERNAL |
Functions | |
static char * | triggertypeFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Identify type of trigger. | |
static char * | permsFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Format file permissions for display. | |
static char * | fflagsFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Format file flags for display. | |
static char * | armorFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Wrap a pubkey in ascii armor for display. | |
static char * | base64Format (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Encode binary data in base64 for display. | |
static size_t | xmlstrlen (const char *s) |
Return length of string represented with xml characters substituted. | |
static char * | xmlstrcpy (char *t, const char *s) |
Copy source string to target, substituting for xml characters. | |
static char * | xmlFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Wrap tag data in simple header xml markup. | |
static size_t | yamlstrlen (const char *s, int lvl) |
Return length of string represented with yaml indentation. | |
static char * | yamlstrcpy (char *t, const char *s, int lvl) |
Copy source string to target, indenting for yaml. | |
static char * | yamlFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Wrap tag data in simple header yaml markup. | |
static char * | pgpsigFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Display signature fingerprint and time. | |
static char * | depflagsFormat (int_32 type, const void *data, char *formatPrefix, int padding, int element) |
Format dependency flags for display. | |
static int | fsnamesTag (Header h, int_32 *type, void **data, int_32 *count, int *freeData) |
Retrieve mounted file system paths. | |
static int | instprefixTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve install prefixes. | |
static int | fssizesTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve mounted file system space. | |
static int | triggercondsTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve trigger info. | |
static int | triggertypeTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve trigger type info. | |
static int | filenamesTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file paths. | |
static int | fileclassTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file classes. | |
static int | filecontextsTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file contexts from header. | |
static int | fscontextsTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file contexts from file system. | |
static int | recontextsTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file contexts from policy RE's. | |
static int | fileprovideTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file provides. | |
static int | filerequireTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve file requires. | |
static int | missingokTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve Requires(missingok): array for Suggests: or Enhances:. | |
static int | i18nTag (Header h, int_32 tag, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve i18n text. | |
static int | localeTag (Header h, int_32 tag, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve text and convert to locale. | |
static int | summaryTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve summary text. | |
static int | descriptionTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve description text. | |
static int | changelognameTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
static int | changelogtextTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
static int | groupTag (Header h, rpmTagType *type, const void **data, int_32 *count, int *freeData) |
Retrieve group text. | |
Variables | |
static const char * | language = "LANGUAGE" |
static const char * | _macro_i18ndomains = "%{?_i18ndomains}" |
const struct headerSprintfExtension_s | rpmHeaderFormats [] |
Table of query format extensions. |
Definition in file formats.c.
|
|
|
Wrap a pubkey in ascii armor for display.
Definition at line 155 of file formats.c. References _, PGPARMOR_PUBKEY, PGPARMOR_SIGNATURE, pgpArmorWrap(), RPM_ASN1_TYPE, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT64_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_OPENPGP_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, and xstrdup(). |
|
Encode binary data in base64 for display.
Definition at line 207 of file formats.c. References _, _free(), RPM_ASN1_TYPE, RPM_BIN_TYPE, RPM_OPENPGP_TYPE, stpcpy(), xcalloc(), and xstrdup(). Referenced by xmlFormat(), and yamlFormat(). |
|
Definition at line 1527 of file formats.c. References localeTag(), and RPMTAG_CHANGELOGNAME. |
|
Definition at line 1537 of file formats.c. References localeTag(), and RPMTAG_CHANGELOGTEXT. |
|
Format dependency flags for display.
Definition at line 772 of file formats.c. References _, alloca(), RPM_INT32_TYPE, RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMSENSE_SENSEMASK, stpcpy(), xmalloc(), and xstrdup(). Referenced by triggercondsTag(). |
|
Retrieve description text.
Definition at line 1516 of file formats.c. References i18nTag(), and RPMTAG_DESCRIPTION. |
|
Format file flags for display.
Definition at line 101 of file formats.c. References _, RPM_INT32_TYPE, RPMFILE_CONFIG, RPMFILE_DOC, RPMFILE_GHOST, RPMFILE_LICENSE, RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, RPMFILE_README, RPMFILE_SPECFILE, xmalloc(), and xstrdup(). |
|
Retrieve file classes.
Definition at line 1124 of file formats.c. References RPM_STRING_ARRAY_TYPE, and rpmfiBuildFClasses(). |
|
Retrieve file contexts from header.
Definition at line 1148 of file formats.c. References RPM_STRING_ARRAY_TYPE, and rpmfiBuildFContexts(). |
|
Retrieve file paths.
Definition at line 1102 of file formats.c. References RPM_STRING_ARRAY_TYPE, rpmfiBuildFNames(), and RPMTAG_BASENAMES. |
|
Retrieve file provides.
Definition at line 1220 of file formats.c. References RPM_STRING_ARRAY_TYPE, rpmfiBuildFDeps(), and RPMTAG_PROVIDENAME. |
|
Retrieve file requires.
Definition at line 1244 of file formats.c. References RPM_STRING_ARRAY_TYPE, rpmfiBuildFDeps(), and RPMTAG_REQUIRENAME. |
|
Retrieve file contexts from file system.
Definition at line 1172 of file formats.c. References RPM_STRING_ARRAY_TYPE, and rpmfiBuildFSContexts(). |
|
Retrieve mounted file system paths.
Definition at line 833 of file formats.c. References RPM_STRING_ARRAY_TYPE, and rpmGetFilesystemList(). |
|
Retrieve mounted file system space.
Definition at line 903 of file formats.c. References _free(), headerGetEntryMinMemory(), RPM_INT64_TYPE, rpmfiBuildFNames(), rpmGetFilesystemList(), rpmGetFilesystemUsage(), RPMTAG_BASENAMES, RPMTAG_FILESIZES, and xcalloc(). |
|
Retrieve group text.
Definition at line 1556 of file formats.c. References i18nTag(), and RPMTAG_GROUP. |
|
Retrieve i18n text.
Definition at line 1347 of file formats.c. References _free(), _macro_i18ndomains, alloca(), dgettext, getenv(), headerGetEntryMinMemory(), headerNVR(), language, RPM_STRING_TYPE, rpmExpand(), setenv(), tagName(), unsetenv(), xstrdup(), and xstrtolocale(). Referenced by descriptionTag(), groupTag(), and summaryTag(). |
|
Retrieve install prefixes.
Definition at line 865 of file formats.c. References headerFreeData(), headerGetEntryMinMemory(), RPM_STRING_TYPE, RPMTAG_INSTALLPREFIX, RPMTAG_INSTPREFIXES, and xstrdup(). |
|
Retrieve text and convert to locale.
Definition at line 1439 of file formats.c. References _free(), headerGetEntryMinMemory(), RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, xmalloc(), xstrdup(), and xstrtolocale(). Referenced by changelognameTag(), and changelogtextTag(). |
|
Retrieve Requires(missingok): array for Suggests: or Enhances:.
Definition at line 1268 of file formats.c. References argvAdd(), argvFree(), RPM_STRING_ARRAY_TYPE, rpmdsDNEVR(), rpmdsFlags(), rpmdsFree(), rpmdsInit(), rpmdsNew(), rpmdsNext(), RPMTAG_REQUIRENAME, stpcpy(), and xcalloc(). |
|
Format file permissions for display.
Definition at line 67 of file formats.c. References _, _free(), RPM_INT32_TYPE, rpmPermsString(), xmalloc(), and xstrdup(). |
|
Display signature fingerprint and time.
Definition at line 659 of file formats.c. References _, pgpDigParams_s::hash_algo, pgpFreeDig(), pgpGrab(), PGPHASHALGO_MD5, PGPHASHALGO_SHA1, pgpHexStr(), pgpLen(), pgpNewDig(), pgpPrtPkts(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_RSA, PGPTAG_SIGNATURE, pgpDigParams_s::pubkey_algo, RPM_ASN1_TYPE, RPM_BIN_TYPE, RPM_OPENPGP_TYPE, pgpDig_s::signature, pgpDigParams_s::signid, snprintf(), stpcpy(), pgpDigParams_s::time, xrealloc(), and xstrdup(). |
|
Retrieve file contexts from policy RE's.
Definition at line 1196 of file formats.c. References RPM_STRING_ARRAY_TYPE, and rpmfiBuildREContexts(). |
|
Retrieve summary text.
Definition at line 1496 of file formats.c. References i18nTag(), and RPMTAG_SUMMARY. |
|
Retrieve trigger info.
Definition at line 963 of file formats.c. References _free(), depflagsFormat(), headerFreeData(), headerGetEntryMinMemory(), RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMSENSE_SENSEMASK, RPMTAG_TRIGGERFLAGS, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, RPMTAG_TRIGGERSCRIPTS, RPMTAG_TRIGGERVERSION, xmalloc(), xrealloc(), and xstrdup(). |
|
Identify type of trigger.
Definition at line 35 of file formats.c. References _, RPM_INT32_TYPE, and xstrdup(). |
|
Retrieve trigger type info.
Definition at line 1040 of file formats.c. References headerFreeData(), headerGetEntryMinMemory(), RPM_STRING_ARRAY_TYPE, RPMTAG_TRIGGERFLAGS, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERSCRIPTS, xmalloc(), and xstrdup(). |
|
Wrap tag data in simple header xml markup.
Definition at line 313 of file formats.c. References _, _free(), alloca(), base64Format(), RPM_ASN1_TYPE, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT64_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_OPENPGP_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, snprintf(), stpcpy(), xmalloc(), xmlstrcpy(), xmlstrlen(), xstrdup(), and xstrtolocale(). |
|
Copy source string to target, substituting for xml characters.
Definition at line 283 of file formats.c. References stpcpy(). Referenced by xmlFormat(). |
|
Return length of string represented with xml characters substituted.
Definition at line 257 of file formats.c. Referenced by xmlFormat(). |
|
Wrap tag data in simple header yaml markup.
Definition at line 492 of file formats.c. References _, _free(), alloca(), base64Format(), RPM_ASN1_TYPE, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT64_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_OPENPGP_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, snprintf(), stpcpy(), xmalloc(), xstrdup(), xstrtolocale(), yamlstrcpy(), and yamlstrlen(). |
|
Copy source string to target, indenting for yaml.
Definition at line 456 of file formats.c. References indent. Referenced by yamlFormat(). |
|
Return length of string represented with yaml indentation.
Definition at line 427 of file formats.c. References indent. Referenced by yamlFormat(). |
|
Definition at line 1335 of file formats.c. Referenced by i18nTag(). |
|
Definition at line 1332 of file formats.c. Referenced by i18nTag(). |
|
Table of query format extensions.
Definition at line 1568 of file formats.c. Referenced by hdr_subscript(), hdrPrintErased(), hdrPrintInstalled(), hdrSprintf(), init_rpm(), packageBinaries(), parseForSimple(), printNewSpecfile(), queryHeader(), rpmcliImportPubkey(), rpmDisplayQueryTags(), rpmfiNew(), rpmHeaderGetEntry(), rpmpsmStage(), rpmShowProgress(), rpmtsSolve(), and runScript(). |