#include "system.h"
#include <rpmio.h>
#include "buildio.h"
#include "rpmds.h"
#include "rpmfi.h"
#include "rpmts.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;} |
#define | SKIPNONWHITE(_x) {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;} |
Functions | |
static struct TriggerFileEntry * | freeTriggerFiles (struct TriggerFileEntry *p) |
static struct Source * | freeSources (struct Source *s) |
Destroy source component chain. | |
rpmRC | lookupPackage (Spec spec, const char *name, int flag, Package *pkg) |
Find sub-package control structure by name. | |
Package | newPackage (Spec spec) |
Create and initialize package control structure. | |
Package | freePackage (Package pkg) |
Destroy package control structure. | |
Package | freePackages (Package packages) |
Destroy all packages associated with spec file. | |
static struct Source * | findSource (Spec spec, int num, int flag) |
int | SpecSourceCount (Spec spec) |
Return the count of source set in specfile. | |
SpecSource | getSource (Spec spec, int num) |
Return a source control structure. | |
const char * | specSourceName (SpecSource source) |
Return a ptr to the source file name. | |
const char * | specFullSourceName (SpecSource source) |
Return a ptr to the full url of the source. | |
int | specSourceNum (SpecSource source) |
Return the spec or source patch number. | |
int | specSourceFlags (SpecSource source) |
Return flags set for the source. | |
int | parseNoSource (Spec spec, const char *field, int tag) |
int | addSource (Spec spec, Package pkg, const char *field, int tag) |
static speclines | newSl (void) |
static speclines | freeSl (speclines sl) |
static spectags | newSt (void) |
static spectags | freeSt (spectags st) |
Spec | newSpec (void) |
Create and initialize Spec structure. | |
Spec | freeSpec (Spec spec) |
Destroy Spec structure. | |
struct OpenFileInfo * | newOpenFileInfo (void) |
static void | printNewSpecfile (Spec spec) |
Print copy of spec file, filling in Group/Description/Summary from specspo. | |
static int | _specQuery (rpmts ts, QVA_t qva, const char *specName, const char *target) |
Parse a spec file, and query the resultant header. | |
int | rpmspecQuery (rpmts ts, QVA_t qva, const char *arg) |
Function to query spec file(s). | |
Variables | |
int | specedit |
Definition in file spec.c.
#define SKIPNONWHITE | ( | _x | ) | {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;} |
#define SKIPWHITE | ( | _x | ) | {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;} |
Parse a spec file, and query the resultant header.
ts | rpm transaction | |
qva | query args | |
specName | specfile to parse | |
target | cpu-vender-os platform for query (NULL is current) |
Definition at line 740 of file spec.c.
References _, Package_s::fileList, freeSpec(), Package_s::header, initSourceHeader(), Package_s::next, Spec_s::packages, parseSpec(), printNewSpecfile(), rpmQVKArguments_s::qva_showPackage, rpmQVKArguments_s::qva_source, rpmlog(), RPMLOG_ERR, RPMQV_SPECFILE, RPMQV_SPECSRPM, rpmtsSetSpec(), Spec_s::sourceHeader, and specedit.
Referenced by rpmspecQuery().
Definition at line 205 of file spec.c.
References Source::flags, Source::next, Source::num, and Spec_s::sources.
Referenced by parseNoSource().
Definition at line 421 of file spec.c.
References _free(), speclines_s::sl_lines, and speclines_s::sl_nlines.
Referenced by freeSpec().
Destroy source component chain.
s | source component chain |
Definition at line 53 of file spec.c.
References _free(), Source::fullSource, and Source::next.
Referenced by freeSpec().
Definition at line 451 of file spec.c.
References _free(), spectags_s::st_ntags, spectags_s::st_t, spectag_s::t_lang, and spectag_s::t_msgid.
Referenced by freeSpec().
static struct TriggerFileEntry* freeTriggerFiles | ( | struct TriggerFileEntry * | p | ) | [static, read] |
p | trigger entry chain |
Definition at line 31 of file spec.c.
References _free(), TriggerFileEntry::fileName, TriggerFileEntry::next, TriggerFileEntry::prog, and TriggerFileEntry::script.
Referenced by freePackage().
static speclines newSl | ( | void | ) | [inline, static] |
Definition at line 406 of file spec.c.
References speclines_s::sl_lines, speclines_s::sl_nalloc, speclines_s::sl_nlines, specedit, and xmalloc().
Referenced by newSpec().
static spectags newSt | ( | void | ) | [inline, static] |
Definition at line 436 of file spec.c.
References specedit, spectags_s::st_nalloc, spectags_s::st_ntags, spectags_s::st_t, and xmalloc().
Referenced by newSpec().
static void printNewSpecfile | ( | Spec | spec | ) | [static] |
Print copy of spec file, filling in Group/Description/Summary from specspo.
spec | spec file control structure |
Definition at line 627 of file spec.c.
References _, _free(), alloca(), Package_s::header, headerGet(), headerSprintf(), Package_s::next, _HE_s::p, Spec_s::packages, rpmDataType_u::ptr, RPMBUILD_DEFAULT_LANG, rpmHeaderFormats, rpmlog(), RPMLOG_ERR, Spec_s::sl, speclines_s::sl_lines, speclines_s::sl_nlines, Spec_s::st, spectags_s::st_ntags, spectags_s::st_t, stpcpy(), 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(), xmalloc(), and xstrdup().
Referenced by _specQuery().
int specedit |