Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

build/parsePrep.c File Reference

Parse prep section from spec file. More...

#include "system.h"
#include <rpmio_internal.h>
#include <rpmbuild.h>
#include "debug.h"

Go to the source code of this file.

Functions

int checkOwners (const char *urlfn)
 Check that file owner and group are known. More...

char* doPatch (Spec spec, int c, int strip, const char *db, int reverse, int removeEmpties)
 Expand patchN macro into prep scriptlet. More...

const char* doUntar (Spec spec, int c, int quietly)
 Expand setup macro into prep scriptlet. More...

int doSetupMacro (Spec spec, char *line)
 Parse setup macro. More...

int doPatchMacro (Spec spec, char *line)
 Parse patch line. More...

int parsePrep (Spec spec)

Variables

int leaveDirs
int skipDefaultAction
int createDir
int quietly
const char* dirName = NULL
struct poptOption optionsTable []


Detailed Description

Parse prep section from spec file.

Definition in file parsePrep.c.


Function Documentation

int checkOwners ( const char * urlfn ) [static]
 

Check that file owner and group are known.

Parameters:
urlfn   file url
Returns:
0 on success

Definition at line 34 of file parsePrep.c.

Referenced by doPatch(), and doUntar().

char * doPatch ( Spec spec,
int c,
int strip,
const char * db,
int reverse,
int removeEmpties ) [static]
 

Expand patchN macro into prep scriptlet.

Parameters:
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?
Returns:
expanded patch macro (NULL on error)

Definition at line 62 of file parsePrep.c.

Referenced by doPatchMacro().

int doPatchMacro ( Spec spec,
char * line ) [static]
 

Parse patch line.

Parameters:
spec   build info
line   current line from spec file
Returns:
0 on success

Definition at line 420 of file parsePrep.c.

Referenced by parsePrep().

int doSetupMacro ( Spec spec,
char * line ) [static]
 

Parse setup macro.

Todo:
FIXME: Option -q broken when not immediately after setup.
Parameters:
spec   build info
line   current line from spec file
Returns:
0 on success

Definition at line 268 of file parsePrep.c.

Referenced by parsePrep().

const char * doUntar ( Spec spec,
int c,
int quietly ) [static]
 

Expand setup macro into prep scriptlet.

Parameters:
spec   build info
c   source index
quietly   should -vv be omitted from tar?
Returns:
expanded setup macro (NULL on error)

Definition at line 154 of file parsePrep.c.

Referenced by doSetupMacro().


Variable Documentation

int createDir [static]
 

Definition at line 16 of file parsePrep.c.

const char * dirName = NULL [static]
 

Definition at line 17 of file parsePrep.c.

int leaveDirs [static]
 

Definition at line 15 of file parsePrep.c.

struct poptOption optionsTable [static]
 

Initial value:

 {
            { NULL, 'a', POPT_ARG_STRING, NULL, 'a',    NULL, NULL},
            { NULL, 'b', POPT_ARG_STRING, NULL, 'b',    NULL, NULL},
            { NULL, 'c', 0, &createDir, 0,              NULL, NULL},
            { NULL, 'D', 0, &leaveDirs, 0,              NULL, NULL},
            { NULL, 'n', POPT_ARG_STRING, &dirName, 0,  NULL, NULL},
            { NULL, 'T', 0, &skipDefaultAction, 0,      NULL, NULL},
            { NULL, 'q', 0, &quietly, 0,                NULL, NULL},
            { 0, 0, 0, 0, 0,    NULL, NULL}
    }

Definition at line 18 of file parsePrep.c.

int quietly [static]
 

Definition at line 16 of file parsePrep.c.

int skipDefaultAction [static]
 

Definition at line 15 of file parsePrep.c.


Generated at Mon Sep 24 10:37:37 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001