#include "system.h"
#include "rpmio_internal.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include "misc.h"
#include "legacy.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s)) |
Functions | |
int | open_dso (const char *path, pid_t *pidp, size_t *fsizep) |
Open a file descriptor to verify file MD5 and size. | |
int | domd5 (const char *fn, unsigned char *digest, int asAscii, size_t *fsizep) |
Return MD5 sum and size of a file. | |
int | dncmp (const void *a, const void *b) |
void | compressFilelist (Header h) |
Convert absolute path tag to (dirname,basename,dirindex) tags. | |
void | rpmfiBuildFNames (Header h, rpmTag tagN, const char ***fnp, int *fcp) |
Retrieve file names from header. | |
void | expandFilelist (Header h) |
Convert (dirname,basename,dirindex) tags to absolute path tag. | |
void | providePackageNVR (Header h) |
Retrofit a Provides: name = version-release dependency into legacy package headers. | |
void | legacyRetrofit (Header h, const struct rpmlead *lead) |
Do all necessary retorfits for a package header. | |
Variables | |
int | _noDirTokens = 0 |
Definition in file legacy.c.
|
|
|
Convert absolute path tag to (dirname,basename,dirindex) tags.
Definition at line 259 of file legacy.c. References alloca(), dncmp(), HAE_t, headerIsEntry(), HFD_t, HGE_t, HRE_t, int_32, RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_OLDFILENAMES, and rpmTagType. Referenced by genCpioListAndHeader(), hdrCompressFilelist(), hdrLoad(), legacyRetrofit(), mungeFilelist(), and rpmReadHeaders(). |
|
Definition at line 249 of file legacy.c. Referenced by compressFilelist(). |
|
Return MD5 sum and size of a file.
Definition at line 148 of file legacy.c. References _free(), Fclose(), fdDup(), fdFiniDigest(), fdInitDigest(), Ferror(), Fopen(), Fread(), open_dso(), PGPHASHALGO_MD5, RPMDIGEST_NONE, rpmDigestFinal(), rpmDigestInit(), rpmDigestUpdate(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and urltype. Referenced by genCpioListAndHeader(), handleOverlappedFiles(), rpmAddSignature(), rpmfiDecideFate(), and rpmVerifyFile(). |
|
Convert (dirname,basename,dirindex) tags to absolute path tag.
Definition at line 410 of file legacy.c. References _free(), HAE_t, headerIsEntry(), HRE_t, RPM_STRING_ARRAY_TYPE, rpmfiBuildFNames(), RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, and RPMTAG_OLDFILENAMES. Referenced by genCpioListAndHeader(), hdrExpandFilelist(), and rpmdbAdd(). |
|
Do all necessary retorfits for a package header.
Definition at line 519 of file legacy.c. References alloca_strdup, compressFilelist(), headerAddEntry(), headerGetEntry(), headerIsEntry(), headerRemoveEntry(), int_32, rpmlead::major, providePackageNVR(), RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMLEAD_SOURCE, RPMTAG_DEFAULTPREFIX, RPMTAG_FILEGIDS, RPMTAG_FILEGROUPNAME, RPMTAG_FILEUIDS, RPMTAG_FILEUSERNAME, RPMTAG_PREFIXES, RPMTAG_SOURCEPACKAGE, stripTrailingChar(), and rpmlead::type. Referenced by rpmReadPackageFile(). |
|
Open a file descriptor to verify file MD5 and size.
Definition at line 36 of file legacy.c. References environ, ET_EXEC, poptParseArgvString(), rpmExpand(), and unsetenv(). Referenced by domd5(). |
|
Retrofit a Provides: name = version-release dependency into legacy package headers.
Definition at line 438 of file legacy.c. References alloca(), headerAddOrAppendEntry(), headerNVR(), HFD_t, HGE_t, int_32, RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMSENSE_ANY, RPMSENSE_EQUAL, RPMTAG_EPOCH, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, rpmTagType, and stpcpy(). Referenced by hdrLoad(), legacyRetrofit(), packageBinaries(), rpmReadHeaders(), and writeRPM(). |
|
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 absolute 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.
Definition at line 351 of file legacy.c. References _free(), HFD_t, HGE_t, rpmTag, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_ORIGBASENAMES, RPMTAG_ORIGDIRINDEXES, RPMTAG_ORIGDIRNAMES, rpmTagType, stpcpy(), and xmalloc(). Referenced by expandFilelist(), filenamesTag(), fssizesTag(), mungeFilelist(), rpmHeaderGetEntry(), rpmInstallSourcePackage(), and rpmpsmStage(). |