#include "system.h"
#include "rpmio_internal.h"
#include <rpmurl.h>
#include <rpmmacro.h>
#include <rpmlib.h>
#include "legacy.h"
#include "misc.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
rpmRC | rpmMkdirPath (const char *dpath, const char *dname) |
Create directory if it does not exist, and make sure path is writable. | |
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. | |
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. | |
int | myGlobPatternP (const char *patternURL) |
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) |
Variables | |
int | _debug = 0 |
const char * | RPMVERSION = VERSION |
Definition in file misc.c.
|
Return (malloc'd) current working directory.
Definition at line 227 of file misc.c. References errno, and xrealloc(). Referenced by rpmtsRun(). |
|
Like the libc function, but malloc()'s the space needed.
Definition at line 101 of file misc.c. References xmalloc(). Referenced by runScript(). |
|
Like the libc function, but malloc()'s the space needed.
Definition at line 111 of file misc.c. References getenv(), stpcpy(), and xmalloc(). Referenced by checkPassPhrase(), makeGPGSignature(), and makePGPSignature(). |
|
Free split string argv array.
Definition at line 93 of file misc.c. References _free(). Referenced by parsePrep(), processPackageFiles(), processSourceFiles(), and skipFiles(). |
|
Definition at line 279 of file misc.c. Referenced by rpmGlob(). |
|
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.
Definition at line 123 of file misc.c. References _, _free(), errno, Fclose(), Ferror(), Fileno(), Fopen(), RPMERR_SCRIPT, rpmError, rpmGenPath(), rpmioMkpath(), S_ISLNK, URL_IS_DASH, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath(). Referenced by doScript(), makeHDRSignature(), manageFile(), runScript(), and writeRPM(). |
|
Definition at line 246 of file misc.c. References urlPath(). Referenced by initGlobs(), processBinaryFile(), and rpmGlob(). |
|
Definition at line 284 of file misc.c. References _free(), argv, Glob(), glob_error(), Globfree(), myGlobPatternP(), poptParseArgvString(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), xmalloc(), xrealloc(), and xstrdup(). Referenced by IDTXglob(), processBinaryFile(), rpmGraph(), rpmInstall(), rpmQueryVerify(), and rpmReadPackageManifest(). |
|
Create directory if it does not exist, and make sure path is writable.
Definition at line 21 of file misc.c. References _, Access(), errno, Mkdir(), RPMERR_CREATE, rpmError, rpmRC, RPMRC_FAIL, RPMRC_OK, Stat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and W_OK. Referenced by main(), and rpmInstallSourcePackage(). |
|
Split string into fields separated by a character.
Definition at line 54 of file misc.c. References xmalloc(). Referenced by parsePrep(), processPackageFiles(), processSourceFiles(), and skipFiles(). |
|
|
|
|