rpm  5.4.10
Macros | Functions | Variables
formats.c File Reference
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmmacro.h>
#include <rpmtag.h>
#include <rpmtypes.h>
#include <rpmds.h>
#include <rpmfi.h>
#include "legacy.h"
#include "manifest.h"
#include "argv.h"
#include "fs.h"
#include "debug.h"
Include dependency graph for formats.c:

Go to the source code of this file.

Macros

#define _RPMTAG_INTERNAL
#define _RPMEVR_INTERNAL

Functions

static int fsnamesTag (Header h, HE_t he)
 Retrieve mounted file system paths.
static int fssizesTag (Header h, HE_t he)
 Retrieve mounted file system space.
static int fileclassTag (Header h, HE_t he)
 Retrieve file classes.
static int fileprovideTag (Header h, HE_t he)
 Retrieve file provides.
static int filerequireTag (Header h, HE_t he)
 Retrieve file requires.
static int missingokTag (Header h, HE_t he)
 Retrieve Requires(missingok): array for Suggests: or Enhances:.

Variables

static struct
headerSprintfExtension_s 
_rpmHeaderFormats []
headerSprintfExtension rpmHeaderFormats = &_rpmHeaderFormats[0]
 Table of query format extensions.

Detailed Description

Definition in file formats.c.

Macro Definition Documentation

#define _RPMEVR_INTERNAL

Definition at line 15 of file formats.c.

#define _RPMTAG_INTERNAL

Definition at line 11 of file formats.c.

Function Documentation

static int fileclassTag ( Header  h,
HE_t  he 
)
static

Retrieve file classes.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 117 of file formats.c.

References rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, _HE_s::p, RPM_STRING_ARRAY_TYPE, rpmfiBuildFClasses(), and _HE_s::t.

static int fileprovideTag ( Header  h,
HE_t  he 
)
static

Retrieve file provides.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 187 of file formats.c.

References rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, _HE_s::p, RPM_STRING_ARRAY_TYPE, rpmfiBuildFDeps(), RPMTAG_PROVIDENAME, and _HE_s::t.

static int filerequireTag ( Header  h,
HE_t  he 
)
static

Retrieve file requires.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 204 of file formats.c.

References rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, _HE_s::p, RPM_STRING_ARRAY_TYPE, rpmfiBuildFDeps(), RPMTAG_REQUIRENAME, and _HE_s::t.

static int fsnamesTag ( Header  h,
HE_t  he 
)
static

Retrieve mounted file system paths.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 38 of file formats.c.

References rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, _HE_s::p, RPM_STRING_ARRAY_TYPE, rpmGetFilesystemList(), and _HE_s::t.

static int fssizesTag ( Header  h,
HE_t  he 
)
static

Retrieve mounted file system space.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 60 of file formats.c.

References _free(), rpmDataType_u::argv, _HE_s::c, _HE_s::freeData, headerGet(), _HE_s::p, rpmDataType_u::ptr, RPM_UINT64_TYPE, rpmGetFilesystemList(), rpmGetFilesystemUsage(), RPMTAG_FILEPATHS, RPMTAG_FILESIZES, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, rpmDataType_u::ui64p, and xcalloc().

static int missingokTag ( Header  h,
HE_t  he 
)
static

Retrieve Requires(missingok): array for Suggests: or Enhances:.

Parameters
hheader
Return values
*hetag container
Returns
0 on success

Definition at line 221 of file formats.c.

References rpmDataType_u::argv, argvAdd(), argvFree(), _HE_s::c, _HE_s::freeData, _HE_s::p, RPM_STRING_ARRAY_TYPE, rpmdsDNEVR(), rpmdsFlags(), rpmdsFree(), rpmdsInit(), rpmdsNew(), rpmdsNext(), RPMTAG_REQUIRENAME, stpcpy(), _HE_s::t, and xcalloc().

Variable Documentation

struct headerSprintfExtension_s _rpmHeaderFormats[]
static
Initial value:
{
{ HEADER_EXT_TAG, "RPMTAG_ENHANCES",
{ .tagFunction = missingokTag } },
{ HEADER_EXT_TAG, "RPMTAG_FILECLASS",
{ .tagFunction = fileclassTag } },
{ HEADER_EXT_TAG, "RPMTAG_FILEPROVIDE",
{ .tagFunction = fileprovideTag } },
{ HEADER_EXT_TAG, "RPMTAG_FILEREQUIRE",
{ .tagFunction = filerequireTag } },
{ HEADER_EXT_TAG, "RPMTAG_FSNAMES",
{ .tagFunction = fsnamesTag } },
{ HEADER_EXT_TAG, "RPMTAG_FSSIZES",
{ .tagFunction = fssizesTag } },
{ HEADER_EXT_TAG, "RPMTAG_SUGGESTS",
{ .tagFunction = missingokTag } },
{ HEADER_EXT_MORE, NULL, { (void *) &headerCompoundFormats } }
}

Definition at line 274 of file formats.c.

Referenced by rpmDisplayQueryTags().

headerSprintfExtension rpmHeaderFormats = &_rpmHeaderFormats[0]

Table of query format extensions.

Note
Chains *headerCompoundFormats -> *headerDefaultFormats.

Definition at line 305 of file formats.c.

Referenced by addRpmTags(), hdr_subscript(), hdrSprintf(), packageBinaries(), parseForSimple(), printNewSpecfile(), queryHeader(), rpmcliImportPubkey(), rpmfiNew(), rpmhdr_sprintf(), rpmpsmStage(), rpmShowProgress(), and rpmtsSolve().