rpm
4.5
|
Parse prep section from spec file. More...
Go to the source code of this file.
Functions | |
static int | checkOwners (const char *urlfn) |
Check that file owner and group are known. More... | |
static char * | doPatch (Spec spec, int c, int strip, const char *db, int reverse, int removeEmpties, int fuzz) |
Expand patchN macro into prep scriptlet. More... | |
static const char * | doUntar (Spec spec, int c, int quietly) |
Expand setup macro into prep scriptlet. More... | |
static int | doSetupMacro (Spec spec, char *line) |
Parse setup macro. More... | |
static int | doPatchMacro (Spec spec, char *line) |
Parse patch line. More... | |
static int | prepFetch (Spec spec) |
Check that all sources/patches/icons exist locally, fetching if necessary. More... | |
int | parsePrep (Spec spec, int verify) |
Parse %prep section of a spec file. More... | |
Variables | |
static int | leaveDirs |
static int | skipDefaultAction |
static int | createDir |
static int | quietly |
static const char * | dirName = NULL |
static struct poptOption | optionsTable [] |
Parse prep section from spec file.
Definition in file parsePrep.c.
|
static |
Check that file owner and group are known.
urlfn | file url |
Definition at line 38 of file parsePrep.c.
References _, errno, getGname(), getUname(), Lstat(), RPMERR_BADSPEC, and rpmError.
|
static |
Expand patchN macro into prep scriptlet.
spec | build info |
c | patch index |
strip | patch level (i.e. patch -p argument) |
db | saved file suffix (i.e. patch –suffix argument) |
reverse | include -R? |
removeEmpties | include -E? |
fuzz | include -F? |
Definition at line 70 of file parsePrep.c.
References _, _free(), checkOwners(), COMPRESSED_BZIP2, COMPRESSED_LZMA, COMPRESSED_LZOP, COMPRESSED_NOT, COMPRESSED_OTHER, COMPRESSED_XZ, COMPRESSED_ZIP, Source::flags, Spec_s::force, isCompressed(), Source::next, Source::num, RPMERR_BADSPEC, rpmError, RPMFILE_PATCH, rpmGenPath(), rpmGetPath(), Source::source, Spec_s::sources, stpcpy(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().
Referenced by doPatchMacro().
|
static |
Parse patch line.
spec | build info |
line | current line from spec file |
Definition at line 459 of file parsePrep.c.
References _, appendLineStringBuf, doPatch(), Spec_s::line, Spec_s::lineNum, parseNum(), Spec_s::prep, RPMERR_BADSPEC, and rpmError.
Referenced by parsePrep().
|
static |
Parse setup macro.
spec | build info |
line | current line from spec file |
Definition at line 303 of file parsePrep.c.
References _, _free(), addMacro(), appendLineStringBuf, appendStringBuf, Spec_s::buildSubdir, createDir, dirName, doUntar(), freeStringBuf(), getStringBuf(), Package_s::header, headerNVR(), leaveDirs, Spec_s::lineNum, Spec_s::macros, MKDIR_P, name, newStringBuf(), Source::num, optionsTable, Spec_s::packages, parseNum(), Spec_s::prep, quietly, RMIL_SPEC, Spec_s::rootURL, RPMERR_BADSPEC, rpmError, rpmExpand(), rpmGenPath(), skipDefaultAction, urlPath(), and xstrdup().
Referenced by parsePrep().
|
static |
Expand setup macro into prep scriptlet.
spec | build info |
c | source index |
quietly | should -vv be omitted from tar? |
Definition at line 189 of file parsePrep.c.
References _, _free(), checkOwners(), COMPRESSED_BZIP2, COMPRESSED_LZMA, COMPRESSED_LZOP, COMPRESSED_NOT, COMPRESSED_OTHER, COMPRESSED_XZ, COMPRESSED_ZIP, Source::flags, Spec_s::force, isCompressed(), Source::next, Source::num, quietly, RPMERR_BADSPEC, rpmError, RPMFILE_SOURCE, rpmGenPath(), rpmGetPath(), rpmIsVerbose, Source::source, Spec_s::sources, stpcpy(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().
Referenced by doSetupMacro().
|
static |
Check that all sources/patches/icons exist locally, fetching if necessary.
Definition at line 585 of file parsePrep.c.
References _, _free(), errno, Source::flags, ftpStrerror(), Lstat(), Source::next, Source::num, RPMERR_BADFILENAME, rpmError, RPMFILE_ICON, RPMFILE_PATCH, RPMFILE_SOURCE, rpmGenPath(), rpmMkdirPath(), RPMRC_OK, Source::source, Spec_s::sources, and urlGetFile().
Referenced by parsePrep().
|
static |
Definition at line 18 of file parsePrep.c.
Referenced by doSetupMacro().
|
static |
Definition at line 20 of file parsePrep.c.
Referenced by doLookup(), doSetupMacro(), rpmalAllFileSatisfiesDepend(), rpmdbFindByFile(), and rpmGetFilesystemUsage().
|
static |
Definition at line 16 of file parsePrep.c.
Referenced by doSetupMacro().
|
static |
Definition at line 22 of file parsePrep.c.
Referenced by doSetupMacro().
|
static |
Definition at line 18 of file parsePrep.c.
Referenced by doSetupMacro(), and doUntar().
|
static |
Definition at line 16 of file parsePrep.c.
Referenced by doSetupMacro().