rpm
5.4.15
|
The Spec and Package data structures used during build. More...
#include <sys/types.h>
#include <rpmtypes.h>
#include <rpmiotypes.h>
#include <rpmevr.h>
#include <rpmfi.h>
#include <rpmcli.h>
#include <rpmtag.h>
#include <rpmio.h>
Go to the source code of this file.
Data Structures | |
struct | TriggerFileEntry |
struct | Source |
struct | ReadLevelEntry |
struct | OpenFileInfo |
struct | spectag_s |
struct | spectags_s |
struct | speclines_s |
struct | Spec_s |
The structure used to store values parsed from a spec file. More... | |
struct | Package_s |
The structure used to store values for a package. More... | |
Macros | |
#define | RPMBUILD_DEFAULT_LANG "C" |
#define | freeSpec(_spec) ((Spec)rpmioFreePoolItem((rpmioItem)(_spec), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef struct Package_s * | Package |
typedef struct Source * | SpecSource |
typedef struct ReadLevelEntry | RLE_t |
typedef struct OpenFileInfo | OFI_t |
typedef struct spectag_s * | spectag |
typedef struct spectags_s * | spectags |
typedef struct speclines_s * | speclines |
Functions | |
Spec | freeSpec (Spec spec) |
Destroy a spec file control structure. More... | |
Spec | newSpec (void) |
Create and initialize Spec structure. More... | |
int | rpmspecQuery (rpmts ts, QVA_t qva, const char *arg) |
Function to query spec file(s). More... | |
struct OpenFileInfo * | newOpenFileInfo (void) |
spectag | stashSt (Spec spec, Header h, rpmTag tag, const char *lang) |
stashSt. More... | |
int | addSource (Spec spec, Package pkg, const char *field, rpmTag tag) |
addSource. More... | |
int | parseNoSource (Spec spec, const char *field, rpmTag tag) |
parseNoSource. More... | |
int | SpecSourceCount (Spec spec) |
Return the count of source set in specfile. More... | |
SpecSource | getSource (Spec spec, int num) |
Return a source control structure. More... | |
const char * | specSourceName (SpecSource source) |
Return a ptr to the source file name. More... | |
const char * | specFullSourceName (SpecSource source) |
Return a ptr to the full url of the source. More... | |
int | specSourceNum (SpecSource source) |
Return the spec or source patch number. More... | |
int | specSourceFlags (SpecSource source) |
Return flags set for the source. More... | |
const char * | getSourceDir (rpmfileAttrs attr) |
Return the macro directory location from source file flags. More... | |
The Spec and Package data structures used during build.
Definition in file rpmspec.h.
#define freeSpec | ( | _spec | ) | ((Spec)rpmioFreePoolItem((rpmioItem)(_spec), __FUNCTION__, __FILE__, __LINE__)) |
#define RPMBUILD_DEFAULT_LANG "C" |
Definition at line 40 of file rpmspec.h.
Referenced by findPreambleTag(), handlePreambleTag(), parseDescription(), printNewSpecfile(), and stashSt().
typedef struct OpenFileInfo OFI_t |
typedef struct ReadLevelEntry RLE_t |
typedef struct speclines_s * speclines |
typedef struct Source* SpecSource |
typedef struct spectags_s * spectags |
addSource.
spec | spec file control structure |
pkg | package control |
field | field to parse |
tag | tag |
Definition at line 361 of file spec.c.
References _, _free(), addMacro(), Source::flags, Source::fullSource, getSourceDir(), Spec_s::line, Spec_s::lineNum, Spec_s::macros, name, Source::next, Source::num, num, Spec_s::numSources, Spec_s::recursing, RMIL_SPEC, RPMFILE_ICON, RPMFILE_PATCH, RPMFILE_SOURCE, rpmGenPath(), rpmlog(), RPMLOG_ERR, rpmluaPop(), rpmluaPushTable(), rpmluaSetVar(), RPMLUAV_STRING, rpmluavFree(), rpmluavNew(), rpmluavSetListMode(), rpmluavSetValue(), RPMRC_FAIL, RPMRC_OK, RPMTAG_ICON, RPMTAG_PATCH, RPMTAG_SOURCE, SKIPSPACE, Source::source, Spec_s::sources, xmalloc, and xstrdup().
Referenced by handlePreambleTag().
Destroy a spec file control structure.
spec | spec file control structure |
Referenced by _spec_free(), _specQuery(), parseSpec(), spec_dealloc(), and specFini().
SpecSource getSource | ( | Spec | spec, |
int | num | ||
) |
Return a source control structure.
spec | spec file control structure |
num | the number of the wanted source (starting from 0) |
Definition at line 275 of file spec.c.
References i, Source::next, num, and Spec_s::sources.
const char* getSourceDir | ( | rpmfileAttrs | attr | ) |
Return the macro directory location from source file flags.
attr | rpmfileAttrs from source |
Definition at line 24 of file build.c.
References _free(), F_OK, RPMFILE_ICON, RPMFILE_PATCH, RPMFILE_SOURCE, and rpmGetPath().
Referenced by addSource(), doRmSource(), doUntar(), initSourceHeader(), and prepFetch().
struct OpenFileInfo* newOpenFileInfo | ( | void | ) |
Definition at line 713 of file spec.c.
References OpenFileInfo::fd, OpenFileInfo::fileName, OpenFileInfo::lineNum, OpenFileInfo::next, OpenFileInfo::readBuf, OpenFileInfo::readPtr, and xmalloc.
Referenced by forceIncludeFile(), and parseSpec().
Spec newSpec | ( | void | ) |
Create and initialize Spec structure.
Definition at line 642 of file spec.c.
References Spec_s::_parseRCPOT, Spec_s::anyarch, Spec_s::BACount, Spec_s::BANames, Spec_s::BASpecs, Spec_s::build, Spec_s::buildSubdir, Spec_s::check, Spec_s::clean, Spec_s::cookie, Spec_s::dig, Spec_s::fi, Spec_s::fileStack, Spec_s::foo, Spec_s::force, headerNew(), Spec_s::install, Spec_s::lbuf, Spec_s::lbuf_len, Spec_s::line, Spec_s::lineNum, Spec_s::macros, newSl(), newSt(), ReadLevelEntry::next, Spec_s::nextline, Spec_s::nextpeekc, Spec_s::nfoo, Spec_s::noSource, Spec_s::numSources, Spec_s::packages, parseRCPOT(), Spec_s::passPhrase, Spec_s::prep, ReadLevelEntry::reading, Spec_s::readStack, Spec_s::recursing, Spec_s::rootURL, rpmExpandNumeric(), rpmGlobalMacroContext, rpmioLinkPoolItem(), Spec_s::sl, Spec_s::smetrics, Spec_s::sourceHeader, Spec_s::sourcePkgId, Spec_s::sourceRpmName, Spec_s::sources, Spec_s::specFile, specGetPool(), Spec_s::sstates, Spec_s::st, Spec_s::timeCheck, Spec_s::toplevel, and xmalloc.
Referenced by parseSpec().
parseNoSource.
spec | spec file control structure |
field | field to parse |
tag | tag |
Definition at line 317 of file spec.c.
References _, field, findSource(), Source::flags, Spec_s::lineNum, name, num, parseNum(), RPMFILE_GHOST, RPMFILE_PATCH, RPMFILE_SOURCE, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, RPMTAG_NOSOURCE, SKIPNONWHITE, and SKIPWHITE.
Referenced by handlePreambleTag().
Function to query spec file(s).
ts | transaction set |
qva | parsed query/verify options |
arg | query argument |
Definition at line 968 of file spec.c.
References _, _specQuery(), alloca(), rpmQVKArguments_s::qva_showPackage, rpmcliTargets, rpmFreeMacros(), rpmFreeRpmrc(), rpmlog(), RPMLOG_DEBUG, and rpmReadConfigFiles().
Referenced by main().
const char* specFullSourceName | ( | SpecSource | source | ) |
Return a ptr to the full url of the source.
source | SpecSource control structure |
Definition at line 298 of file spec.c.
References Source::fullSource.
int SpecSourceCount | ( | Spec | spec | ) |
Return the count of source set in specfile.
spec | spec file control structure |
Definition at line 268 of file spec.c.
References Spec_s::numSources.
int specSourceFlags | ( | SpecSource | source | ) |
Return flags set for the source.
source | SpecSource control structure |
Definition at line 312 of file spec.c.
References Source::flags.
const char* specSourceName | ( | SpecSource | source | ) |
Return a ptr to the source file name.
source | SpecSource control structure |
Definition at line 291 of file spec.c.
References Source::source.
int specSourceNum | ( | SpecSource | source | ) |
Return the spec or source patch number.
source | SpecSource control structure |
Definition at line 305 of file spec.c.
References Source::num.
stashSt.
spec | spec file control structure |
h | header |
tag | tag |
lang | locale |
Definition at line 524 of file parsePreamble.c.
References _free(), alloca(), headerGet(), Spec_s::lineNum, _HE_s::p, rpmDataType_u::ptr, RPMBUILD_DEFAULT_LANG, RPMTAG_NAME, Spec_s::st, spectags_s::st_nalloc, spectags_s::st_ntags, spectags_s::st_t, rpmDataType_u::str, spectag_s::t_lang, spectag_s::t_msgid, spectag_s::t_nlines, spectag_s::t_startx, spectag_s::t_tag, _HE_s::tag, tagName(), xrealloc, and xstrdup().
Referenced by handlePreambleTag(), and parseDescription().