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. More...
 
static int fssizesTag (Header h, HE_t he)
 Retrieve mounted file system space. More...
 
static int fileclassTag (Header h, HE_t he)
 Retrieve file classes. More...
 
static int fileprovideTag (Header h, HE_t he)
 Retrieve file provides. More...
 
static int filerequireTag (Header h, HE_t he)
 Retrieve file requires. More...
 
static int missingokTag (Header h, HE_t he)
 Retrieve Requires(missingok): array for Suggests: or Enhances:. More...
 

Variables

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

Macro Definition Documentation

§ _RPMEVR_INTERNAL

#define _RPMEVR_INTERNAL

Definition at line 15 of file formats.c.

§ _RPMTAG_INTERNAL

#define _RPMTAG_INTERNAL

Definition at line 11 of file formats.c.

Function Documentation

§ fileclassTag()

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.

§ fileprovideTag()

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.

§ filerequireTag()

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.

§ fsnamesTag()

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.

§ fssizesTag()

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().

§ missingokTag()

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

§ _rpmHeaderFormats

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 } }
}
static int fileprovideTag(Header h, HE_t he)
Retrieve file provides.
Definition: formats.c:187
static int fssizesTag(Header h, HE_t he)
Retrieve mounted file system space.
Definition: formats.c:60
static int filerequireTag(Header h, HE_t he)
Retrieve file requires.
Definition: formats.c:204
static int fileclassTag(Header h, HE_t he)
Retrieve file classes.
Definition: formats.c:117
static int fsnamesTag(Header h, HE_t he)
Retrieve mounted file system paths.
Definition: formats.c:38
static int missingokTag(Header h, HE_t he)
Retrieve Requires(missingok): array for Suggests: or Enhances:.
Definition: formats.c:221
headerSprintfExtension headerCompoundFormats
Supported default header extension/tag output formats.
Definition: hdrfmt.c:5249

Definition at line 274 of file formats.c.

Referenced by rpmDisplayQueryTags().

§ rpmHeaderFormats

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().