build/spec.c File Reference

Handle spec data structure. More...

#include "system.h"
#include <rpmio.h>
#include "buildio.h"
#include "rpmds.h"
#include "rpmfi.h"
#include "rpmts.h"
#include "debug.h"

Include dependency graph for spec.c:

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 TriggerFileEntryfreeTriggerFiles (struct TriggerFileEntry *p)
static struct SourcefreeSources (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 SourcefindSource (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 OpenFileInfonewOpenFileInfo (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


Detailed Description

Handle spec data structure.

Definition in file spec.c.


Define Documentation

#define SKIPNONWHITE ( _x   )     {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}

Definition at line 21 of file spec.c.

#define SKIPWHITE ( _x   )     {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}

Definition at line 20 of file spec.c.


Function Documentation

static int _specQuery ( rpmts  ts,
QVA_t  qva,
const char *  specName,
const char *  target 
) [static]

Parse a spec file, and query the resultant header.

Parameters:
ts rpm transaction
qva query args
specName specfile to parse
target cpu-vender-os platform for query (NULL is current)
Returns:
0 on success

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

static struct Source* findSource ( Spec  spec,
int  num,
int  flag 
) [static, read]

Definition at line 205 of file spec.c.

References Source::flags, Source::next, Source::num, and Spec_s::sources.

Referenced by parseNoSource().

static speclines freeSl ( speclines  sl  )  [inline, static]

Definition at line 421 of file spec.c.

References _free(), speclines_s::sl_lines, and speclines_s::sl_nlines.

Referenced by freeSpec().

static struct Source* freeSources ( struct Source s  )  [static, read]

Destroy source component chain.

Parameters:
s source component chain
Returns:
NULL always

Definition at line 53 of file spec.c.

References _free(), Source::fullSource, and Source::next.

Referenced by freeSpec().

static spectags freeSt ( spectags  st  )  [inline, static]

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]

Parameters:
p trigger entry chain
Returns:
NULL always

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]


Variable Documentation

int specedit

Definition at line 18 of file poptQV.c.

Referenced by _specQuery(), newSl(), and newSt().


Generated on Thu Nov 19 03:05:41 2009 for rpm by  doxygen 1.5.9