Functions |
char ** | splitString (const char *str, int length, char sep) |
| Split string into fields separated by a character.
|
void | freeSplitString (char **list) |
| Free split string argv array.
|
int | doputenv (const char *str) |
| Like the libc function, but malloc()'s the space needed.
|
int | dosetenv (const char *name, const char *value, int overwrite) |
| Like the libc function, but malloc()'s the space needed.
|
static int | rpmMkpath (const char *path, mode_t mode, uid_t uid, gid_t gid) |
int | makeTempFile (const char *prefix, const char **fnptr, FD_t *fdptr) |
| Return file handle for a temporaray file.
|
char * | currentDirectory (void) |
| Return (malloc'd) current working directory.
|
static int | dncmp (const void *a, const void *b) |
void | compressFilelist (Header h) |
| Convert absolute path tag to (dirname,basename,dirindex) tags.
|
static void | doBuildFileList (Header h, const char ***fileListPtr, int *fileCountPtr, rpmTag baseNameTag, rpmTag dirNameTag, rpmTag dirIndexesTag) |
void | expandFilelist (Header h) |
| Convert (dirname,basename,dirindex) tags to absolute path tag.
|
void | rpmBuildFileList (Header h, const char ***fileListPtr, int *fileCountPtr) |
| Retrieve file names from header.
|
void | buildOrigFileList (Header h, const char ***fileListPtr, int *fileCountPtr) |
int | myGlobPatternP (const char *patternURL) |
static int | glob_error (const char *foo, int bar) |
int | rpmGlob (const char *patterns, int *argcPtr, const char ***argvPtr) |
int | rpmHeaderGetEntry (Header h, int_32 tag, int_32 *type, void **p, int_32 *c) |
| Retrieve tag info from header.
|
int | rpmPackageGetEntry (void *leadp, Header sigs, Header h, int_32 tag, int_32 *type, void **p, int_32 *c) |
| Retrieve tag info from header.
|
void | providePackageNVR (Header h) |
| Retrofit a Provides: name = version-release dependency into legacy packages.
|
int | domd5 (const char *fn, unsigned char *digest, int asAscii) |
| Calculate MD5 sum for file.
|
Variables |
static int | _debug = 0 |
const char * | RPMVERSION = VERSION |
int | _noDirTokens = 0 |
| Should version 3 packages be produced?
|
int makeTempFile |
( |
const char * |
prefix, |
|
|
const char ** |
fnptr, |
|
|
FD_t * |
fdptr | |
|
) |
| | |
Return file handle for a temporaray file.
A unique temporaray file path will be generated using rpmGenPath(prefix, "%{_tmppath}/", "rpm-tmp.XXXXX") where "XXXXXX" is filled in using rand(3). The file is opened, and the link count and (dev,ino) location are verified after opening. The file name and the open file handle are returned.
- Parameters:
-
| prefix | leading part of temp file path |
- Return values:
-
| fnptr | temp file name (or NULL) |
| fdptr | temp file handle |
- Returns:
- 0 on success
Definition at line 170 of file misc.c.
void rpmBuildFileList |
( |
Header |
h, |
|
|
const char *** |
fileListPtr, |
|
|
int * |
fileCountPtr | |
|
) |
| | |
Retrieve file names from header.
The representation of file names in package headers changed in rpm-4.0. Originally, file names were stored as an array of paths. In rpm-4.0, file names are stored as separate arrays of dirname's and basename's, with a dirname index to associate the correct dirname with each basname. This function is used to retrieve file names independent of how the file names are represented in the package header.
- Parameters:
-
- Return values:
-
| fileListPtr | address of array of file names |
| fileCountPtr | address of number of files |
Definition at line 459 of file misc.c.