rpm  5.4.10
Macros | Functions | Variables
parseScript.c File Reference

Parse install-time script section from spec file. More...

#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include "rpmbuild.h"
#include "debug.h"
#include <rpmlua.h>
Include dependency graph for parseScript.c:

Go to the source code of this file.

Macros

#define _RPMEVR_INTERNAL
 
#define SO_EXT   ""
 

Functions

static rpmuint32_t addTriggerIndex (Package pkg, const char *file, const char *script, const char *prog)
 
int parseScript (Spec spec, int parsePart)
 Parse %pre et al scriptlets from a spec file. More...
 

Variables

static const char * name = NULL
 
static const char * prog = NULL
 
static const char * file = NULL
 
static struct poptOption optionsTable []
 

Detailed Description

Parse install-time script section from spec file.

Definition in file parseScript.c.

Macro Definition Documentation

§ _RPMEVR_INTERNAL

#define _RPMEVR_INTERNAL

Definition at line 11 of file parseScript.c.

§ SO_EXT

#define SO_EXT   ""

Referenced by parseScript().

Function Documentation

§ addTriggerIndex()

static rpmuint32_t addTriggerIndex ( Package  pkg,
const char *  file,
const char *  script,
const char *  prog 
)
static

§ parseScript()

int parseScript ( Spec  spec,
int  parsePart 
)

Parse %pre et al scriptlets from a spec file.

Parameters
specspec file control structure
parsePartcurrent rpmParseState
Returns
>= 0 next rpmParseState, < 0 on error

Definition at line 74 of file parseScript.c.

References _, _free(), addReqProv(), addTriggerIndex(), alloca(), rpmDataType_u::argv, _HE_s::c, file, Package_s::header, headerIsEntry(), headerPut(), isPart(), Spec_s::line, Spec_s::lineNum, lookupPackage(), name, optionsTable, _HE_s::p, parseRCPOT(), PART_NAME, PART_NONE, PART_POST, PART_POSTTRANS, PART_POSTUN, PART_PRE, PART_PRETRANS, PART_PREUN, PART_SANITYCHECK, PART_SUBNAME, PART_TRIGGERIN, PART_TRIGGERPOSTTRANSIN, PART_TRIGGERPOSTTRANSUN, PART_TRIGGERPOSTUN, PART_TRIGGERPREIN, PART_TRIGGERPRETRANSIN, PART_TRIGGERPRETRANSUN, PART_TRIGGERUN, PART_VERIFYSCRIPT, Package_s::postInFile, Package_s::postTransFile, Package_s::postUnFile, Package_s::preInFile, Package_s::preTransFile, Package_s::preUnFile, prog, readLine(), RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, rpmExpandNumeric(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmiobRTrim(), rpmiobStr(), rpmlibNeedsFeature(), rpmlog(), RPMLOG_ERR, rpmluaCheckScript(), RPMRC_FAIL, RPMRC_OK, RPMTAG_POSTIN, RPMTAG_POSTINPROG, RPMTAG_POSTTRANS, RPMTAG_POSTTRANSPROG, RPMTAG_POSTUN, RPMTAG_POSTUNPROG, RPMTAG_PREIN, RPMTAG_PREINPROG, RPMTAG_PRETRANS, RPMTAG_PRETRANSPROG, RPMTAG_PREUN, RPMTAG_PREUNPROG, RPMTAG_REQUIRENAME, RPMTAG_SANITYCHECK, RPMTAG_SANITYCHECKPROG, RPMTAG_TRIGGERIN, RPMTAG_TRIGGERPOSTTRANSIN, RPMTAG_TRIGGERPOSTTRANSUN, RPMTAG_TRIGGERPOSTUN, RPMTAG_TRIGGERPREIN, RPMTAG_TRIGGERPRETRANSIN, RPMTAG_TRIGGERPRETRANSUN, RPMTAG_TRIGGERSCRIPTPROG, RPMTAG_TRIGGERSCRIPTS, RPMTAG_TRIGGERUN, RPMTAG_VERIFYSCRIPT, RPMTAG_VERIFYSCRIPTPROG, Package_s::sanityCheckFile, SO_EXT, rpmDataType_u::str, STRIP_NOTHING, _HE_s::t, _HE_s::tag, Package_s::verifyFile, and xstrdup().

Referenced by parseSpec().

Variable Documentation

§ file

const char* file = NULL
static

Definition at line 60 of file parseScript.c.

Referenced by addTriggerIndex(), and parseScript().

§ name

const char* name = NULL
static

Definition at line 56 of file parseScript.c.

Referenced by parseScript().

§ optionsTable

struct poptOption optionsTable[]
static
Initial value:
= {
{ NULL, 'p', POPT_ARG_STRING, &prog, 'p', NULL, NULL},
{ NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
{ NULL, 'f', POPT_ARG_STRING, &file, 'f', NULL, NULL},
{ 0, 0, 0, 0, 0, NULL, NULL}
}
static const char * prog
Definition: parseScript.c:58
static const char * file
Definition: parseScript.c:60
static const char * name
Definition: parseScript.c:56

Definition at line 62 of file parseScript.c.

Referenced by parseScript().

§ prog

const char* prog = NULL
static

Definition at line 58 of file parseScript.c.

Referenced by initSourceHeaderScriptlet(), and parseScript().