summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES5
-rw-r--r--Doxyfile.in1
-rw-r--r--build.c2
-rw-r--r--build/files.c32
-rw-r--r--build/spec.c6
-rw-r--r--configure.in2
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/cpio.c61
-rw-r--r--lib/cpio.h22
-rw-r--r--lib/depends.c2
-rw-r--r--lib/depends.h41
-rw-r--r--lib/fprint.h3
-rw-r--r--lib/install.c182
-rw-r--r--lib/install.h11
-rw-r--r--lib/rpmdb.c84
-rw-r--r--lib/rpmlib.h45
-rw-r--r--lib/transaction.c318
-rw-r--r--lib/uninstall.c437
-rw-r--r--po/POTFILES.in7
-rw-r--r--po/rpm.pot1092
-rwxr-xr-xrpm.c56
-rw-r--r--rpm.spec.in2
-rwxr-xr-xrpmqv.c366
23 files changed, 1222 insertions, 1557 deletions
diff --git a/CHANGES b/CHANGES
index 4bed96e51..8766a2d9b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,7 @@
-4.0 -> 4.1
+4.0.2 -> 4.0.3
+ - cpio mappings carry dirname/basename, not absolute path.
+
+4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
- rip out rpm{get,put}text, use getpo.sh and specspo instead.
- consistent return for all signature verification.
diff --git a/Doxyfile.in b/Doxyfile.in
index 0d1d5a27a..9a8c76962 100644
--- a/Doxyfile.in
+++ b/Doxyfile.in
@@ -311,6 +311,7 @@ INPUT = \
./lib/rpmlib.h \
./lib/rpmlibprov.c \
./lib/rpmrc.c \
+ ./lib/scriptlet.c \
./lib/signature.c \
./lib/signature.h \
./lib/stringbuf.c \
diff --git a/build.c b/build.c
index b3c56e229..573e9f43d 100644
--- a/build.c
+++ b/build.c
@@ -116,6 +116,8 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba,
specDir = rpmGetPath("%{_specdir}", NULL);
+ /* XXX Using mkstemp is difficult here. */
+ /* XXX FWIW, default %{_specdir} is root.root 0755 */
{ char tfn[64];
strcpy(tfn, "rpm-spec.XXXXXX");
tmpSpecFile = rpmGetPath("%{_specdir}/", mktemp(tfn), NULL);
diff --git a/build/files.c b/build/files.c
index cba277fdb..ea99140da 100644
--- a/build/files.c
+++ b/build/files.c
@@ -958,16 +958,26 @@ static void genCpioListAndHeader(struct FileList *fl,
/* Make the cpio list */
if (! (flp->flags & RPMFILE_GHOST)) {
- clp->fsPath = xstrdup(flp->diskURL);
+ char * t;
+
+ clp->dirName = t = xmalloc(strlen(flp->diskURL) + 2);
+ t = stpcpy(t, flp->diskURL);
+
+ /* Make room for the dirName NUL, find start of baseName. */
+ for (; t > clp->dirName && *t != '/'; t--)
+ t[1] = t[0];
+ t++;
+ *t++ = '\0';
+ clp->baseName = t;
+
/* XXX legacy requires './' payload prefix to be omitted from rpm packages. */
- { char * t = buf;
- if (!isSrc && !rpmExpandNumeric("%{_noPayloadPrefix}")) {
- t = stpcpy(t, "./");
- rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
- }
- t = stpcpy(t, (flp->fileURL + skipLen));
- clp->archivePath = xstrdup(buf);
+ clp->archivePath = t = xmalloc(strlen(flp->fileURL) - skipLen + 3);
+ if (!isSrc && !rpmExpandNumeric("%{_noPayloadPrefix}")) {
+ t = stpcpy(t, "./");
+ rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
}
+ t = stpcpy(t, (flp->fileURL + skipLen));
+
clp->finalMode = flp->fl_mode;
clp->finalUid = flp->fl_uid;
clp->finalGid = flp->fl_gid;
@@ -1966,8 +1976,10 @@ static int generateDepends(Spec spec, Package pkg,
cpioList->mapFlags &= ~CPIO_MULTILIB;
}
- writeBytes += strlen(cpioList->fsPath) + 1;
- appendLineStringBuf(writeBuf, cpioList->fsPath);
+ appendStringBuf(writeBuf, cpioList->dirName);
+ writeBytes += strlen(cpioList->dirName);
+ appendLineStringBuf(writeBuf, cpioList->baseName);
+ writeBytes += strlen(cpioList->baseName) + 1;
}
for (dm = depMsgs; dm->msg != NULL; dm++) {
diff --git a/build/spec.c b/build/spec.c
index b14a28a08..2a7fa9173 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -38,10 +38,10 @@ static inline void freeCpioList(/*@only@*/ struct cpioFileMapping *cpioList, int
struct cpioFileMapping *p = cpioList;
while (cpioCount--) {
- rpmMessage(RPMMESS_DEBUG, _("archive = %s, fs = %s\n"),
- p->archivePath, p->fsPath);
+ rpmMessage(RPMMESS_DEBUG, _("archive = %s, fs = %s%s\n"),
+ p->archivePath, p->dirName, p->baseName);
FREE(p->archivePath);
- FREE(p->fsPath);
+ FREE(p->dirName); /* XXX baseName is free'd here as well */
p++;
}
FREE(cpioList);
diff --git a/configure.in b/configure.in
index bf1deff51..8cc4094c6 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@ dnl it, why check it?
AC_INIT(rpm.c)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(rpm, 4.0.2)
+AM_INIT_AUTOMAKE(rpm, 4.0.3)
AM_CONFIG_HEADER(config.h)
AC_PREREQ(2.12) dnl Minimum Autoconf version required.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 8c85d9a71..3f9729f8f 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -26,7 +26,7 @@ librpm_la_SOURCES = \
formats.c fprint.c fs.c hash.c header.c install.c \
md5.c md5sum.c misc.c package.c problems.c \
poptBT.c poptQV.c query.c rpmchecksig.c rpmdb.c rpminstall.c \
- rpmlead.c rpmlibprov.c rpmrc.c signature.c stringbuf.c \
+ rpmlead.c rpmlibprov.c rpmrc.c scriptlet.c signature.c stringbuf.c \
tagName.c tagtable.c transaction.c uninstall.c verify.c
librpm_la_LDFLAGS = @libdb3@ @libdb2@ @libdb1@
librpm_la_LIBADD = $(DBLIBOBJS)
diff --git a/lib/cpio.c b/lib/cpio.c
index 7537a405d..000d0848c 100644
--- a/lib/cpio.c
+++ b/lib/cpio.c
@@ -776,8 +776,11 @@ int cpioInstallArchive(FD_t cfd, const struct cpioFileMapping * mappings,
} else {
if (map) {
if (map->mapFlags & CPIO_MAP_PATH) {
+ char * t = xmalloc( strlen(map->dirName) +
+ strlen(map->baseName) + 1);
+ (void) stpcpy( stpcpy(t, map->dirName), map->baseName);
if (hdr->path) free((void *)hdr->path);
- hdr->path = xstrdup(map->fsPath);
+ hdr->path = t;
}
if (map->mapFlags & CPIO_MAP_MODE)
@@ -916,6 +919,7 @@ static int writeFile(FD_t cfd, const struct stat * st,
/*@modifies cfd, *sizep @*/
{
struct cpioCrcPhysicalHeader hdr;
+ char * fsPath = alloca(strlen(map->dirName) + strlen(map->baseName) + 1);
char buf[8192], symbuf[2048];
dev_t num;
FD_t datafd;
@@ -927,8 +931,11 @@ static int writeFile(FD_t cfd, const struct stat * st,
size_t size, amount = 0;
int rc;
+ *fsPath = '\0';
+ (void) stpcpy( stpcpy(fsPath, map->dirName), map->baseName);
+
archivePath = (!(map->mapFlags & CPIO_MAP_PATH))
- ? map->fsPath : map->archivePath;
+ ? fsPath : map->archivePath;
if (map->mapFlags & CPIO_MAP_MODE)
st_mode = (st_mode & S_IFMT) | map->finalMode;
@@ -943,7 +950,7 @@ static int writeFile(FD_t cfd, const struct stat * st,
/* While linux puts the size of a symlink in the st_size field,
I don't think that's a specified standard */
- amount = Readlink(map->fsPath, symbuf, sizeof(symbuf));
+ amount = Readlink(fsPath, symbuf, sizeof(symbuf));
if (amount <= 0) {
return CPIOERR_READLINK_FAILED;
}
@@ -984,7 +991,7 @@ static int writeFile(FD_t cfd, const struct stat * st,
#endif
/* XXX unbuffered mmap generates *lots* of fdio debugging */
- datafd = Fopen(map->fsPath, "r.ufdio");
+ datafd = Fopen(fsPath, "r.ufdio");
if (datafd == NULL || Ferror(datafd))
return CPIOERR_OPEN_FAILED;
@@ -1071,17 +1078,21 @@ static int writeLinkedFile(FD_t cfd, const struct hardLink * hlink,
/*@out@*/const char ** failedFile)
/*@modifies cfd, *sizep, *failedFile @*/
{
- int i, rc;
- size_t size, total;
struct cpioCallbackInfo cbInfo = { NULL, 0, 0, 0 };
-
- total = 0;
+ size_t total = 0;
+ const struct cpioFileMapping * map;
+ char * t;
+ size_t size;
+ int i, rc;
for (i = hlink->nlink - 1; i > hlink->linksLeft; i--) {
- if ((rc = writeFile(cfd, &hlink->sb, mappings + hlink->fileMaps[i],
- &size, 0))) {
- if (failedFile)
- *failedFile = xstrdup(mappings[hlink->fileMaps[i]].fsPath);
+ map = mappings + hlink->fileMaps[i];
+ if ((rc = writeFile(cfd, &hlink->sb, map, &size, 0)) != 0) {
+ if (failedFile) {
+ t = xmalloc(strlen(map->dirName) + strlen(map->baseName) + 1);
+ (void) stpcpy( stpcpy(t, map->dirName), map->baseName);
+ *failedFile = t;
+ }
return rc;
}
@@ -1093,13 +1104,16 @@ static int writeLinkedFile(FD_t cfd, const struct hardLink * hlink,
}
}
- if ((rc = writeFile(cfd, &hlink->sb,
- mappings + hlink->fileMaps[hlink->linksLeft],
- &size, 1))) {
+ i = hlink->linksLeft;
+ map = mappings + hlink->fileMaps[i];
+ if ((rc = writeFile(cfd, &hlink->sb, map, &size, 1))) {
if (sizep)
*sizep = total;
- if (failedFile)
- *failedFile = xstrdup(mappings[hlink->fileMaps[hlink->linksLeft]].fsPath);
+ if (failedFile) {
+ t = xmalloc(strlen(map->dirName) + strlen(map->baseName) + 1);
+ (void) stpcpy( stpcpy(t, map->dirName), map->baseName);
+ *failedFile = t;
+ }
return rc;
}
total += size;
@@ -1134,17 +1148,20 @@ int cpioBuildArchive(FD_t cfd, const struct cpioFileMapping * mappings,
for (i = 0; i < numMappings; i++) {
const struct cpioFileMapping * map;
+ char fsPath[8192];
map = mappings + i;
+ fsPath[0] = '\0';
+ (void) stpcpy( stpcpy(fsPath, map->dirName), map->baseName);
if (map->mapFlags & CPIO_FOLLOW_SYMLINKS)
- rc = Stat(map->fsPath, st);
+ rc = Stat(fsPath, st);
else
- rc = Lstat(map->fsPath, st);
+ rc = Lstat(fsPath, st);
if (rc) {
if (failedFile)
- *failedFile = xstrdup(map->fsPath);
+ *failedFile = xstrdup(fsPath);
return CPIOERR_STAT_FAILED;
}
@@ -1183,7 +1200,7 @@ int cpioBuildArchive(FD_t cfd, const struct cpioFileMapping * mappings,
} else {
if ((rc = writeFile(cfd, st, map, &size, 1))) {
if (failedFile)
- *failedFile = xstrdup(mappings[i].fsPath);
+ *failedFile = xstrdup(fsPath);
return rc;
}
@@ -1232,7 +1249,7 @@ int cpioBuildArchive(FD_t cfd, const struct cpioFileMapping * mappings,
return 0;
}
-const char * cpioStrerror(int rc)
+const char *const cpioStrerror(int rc)
{
static char msg[256];
char *s;
diff --git a/lib/cpio.h b/lib/cpio.h
index 500241689..a8b2ab201 100644
--- a/lib/cpio.h
+++ b/lib/cpio.h
@@ -18,8 +18,7 @@
#include <rpmio_internal.h>
/** \ingroup payload
- * Note: CPIO_CHECK_ERRNO bit is set only if errno is valid. These have to
- * be positive numbers or this setting the high bit stuff is a bad idea.
+ * @note CPIO_CHECK_ERRNO bit is set only if errno is valid.
*/
#define CPIOERR_CHECK_ERRNO 0x00008000
@@ -45,40 +44,41 @@ enum cpioErrorReturns {
CPIOERR_READ_FAILED = (18 | CPIOERR_CHECK_ERRNO),
CPIOERR_COPY_FAILED = (19 | CPIOERR_CHECK_ERRNO),
CPIOERR_HDR_SIZE = (20 ),
- CPIOERR_UNKNOWN_FILETYPE = (21 ),
- CPIOERR_MISSING_HARDLINK = (22 ),
+ CPIOERR_UNKNOWN_FILETYPE= (21 ),
+ CPIOERR_MISSING_HARDLINK= (22 ),
CPIOERR_MD5SUM_MISMATCH = (23 ),
CPIOERR_INTERNAL = (24 )
};
/** \ingroup payload
*/
-enum cpioMapFlags {
+typedef enum cpioMapFlags_e {
CPIO_MAP_PATH = (1 << 0),
CPIO_MAP_MODE = (1 << 1),
CPIO_MAP_UID = (1 << 2),
CPIO_MAP_GID = (1 << 3),
CPIO_FOLLOW_SYMLINKS = (1 << 4), /* only for building */
CPIO_MULTILIB = (1 << 31) /* internal, only for building */
-};
+} cpioMapFlags;
/** \ingroup payload
* Defines a single file to be included in a cpio payload.
*/
struct cpioFileMapping {
/*@dependent@*/ const char * archivePath; /*!< Path to store in cpio archive. */
-/*@dependent@*/ const char * fsPath; /*!< Location of payload file. */
-/*@dependent@*/ const char * md5sum; /*!< File MD5 sum (NULL disables). */
+/*@dependent@*/ const char * dirName; /*!< Payload file directory. */
+/*@dependent@*/ const char * baseName; /*!< Payload file base name. */
+/*@dependent@*/ const char * md5sum; /*!< File MD5 sum (NULL disables). */
mode_t finalMode; /*!< Mode of payload file (from header). */
uid_t finalUid; /*!< Uid of payload file (from header). */
gid_t finalGid; /*!< Gid of payload file (from header). */
- int mapFlags;
+ cpioMapFlags mapFlags;
};
/** \ingroup payload
* The first argument passed in a cpio progress callback.
*
- * Note: When building the cpio payload, only "file" is filled in.
+ * @note When building the cpio payload, only "file" is filled in.
*/
struct cpioCallbackInfo {
/*@dependent@*/ const char * file; /*!< File name being installed. */
@@ -149,7 +149,7 @@ int cpioFileMapCmp(const void * a, const void * b) /*@*/;
* @param error code
* @return formatted error string
*/
-/*@observer@*/ const char *cpioStrerror(int rc) /*@*/;
+/*@observer@*/ const char *const cpioStrerror(int rc) /*@*/;
#ifdef __cplusplus
}
diff --git a/lib/depends.c b/lib/depends.c
index 7318a3d0b..d154171c7 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -1748,7 +1748,7 @@ rescan:
}
free(tsi);
}
- if (!_printed && loopcheck == qlen) {
+ if (!_printed && loopcheck == qlen && q->tsi.tsi_suc != NULL) {
_printed++;
rpmMessage(RPMMESS_DEBUG,
_("========== successors only (presentation order)\n"));
diff --git a/lib/depends.h b/lib/depends.h
index 8448cd278..97b59a2ac 100644
--- a/lib/depends.h
+++ b/lib/depends.h
@@ -21,10 +21,10 @@ struct tsortInfo {
/*@dependent@*/ struct availablePackage * tsi_pkg;
int tsi_reqx;
int tsi_qcnt;
-};
+} ;
/**
- * Info about a single package to be installed/removed.
+ * Info about a single package to be installed.
*/
struct availablePackage {
Header h; /*!< Package header. */
@@ -99,7 +99,7 @@ struct availableList {
int alloced; /*!< No. of pkgs allocated for list. */
int numDirs; /*!< No. of directories. */
/*@owned@*/ struct dirInfo * dirs; /*!< Set of directories. */
-};
+} ;
/**
* A single package instance to be installed/removed atomically.
@@ -116,7 +116,34 @@ struct transactionElement {
int dependsOnIndex;
} removed;
} u;
-};
+} ;
+
+struct transactionFileInfo_s {
+ /* for all packages */
+ enum rpmTransactionType type;
+ enum fileActions * actions; /*!< file disposition */
+/*@dependent@*/ struct fingerPrint_s * fps; /*!< file fingerprints */
+ Header h; /*!< package header */
+ uint_32 * fflags; /*!< File flags (from header) */
+ uint_32 * fsizes; /*!< File sizes (from header) */
+ const char ** bnl; /*!< Base names (from header) */
+ const char ** dnl; /*!< Directory names (from header) */
+ const int * dil; /*!< Directory indices (from header) */
+ const char ** fmd5s; /*!< file MD5 sums (from header) */
+ uint_16 * fmodes; /*!< file modes (from header) */
+ char * fstates; /*!< file states (from header) */
+ int fc; /*!< No. of files. */
+ int dc; /*!< No. of directories. */
+ int bnlmax; /*!< Length (in bytes) of longest base name. */
+ int dnlmax; /*!< Length (in bytes) of longest dir name. */
+ /* these are for TR_ADDED packages */
+ const char ** flinks; /*!< file links (from header) */
+ struct availablePackage * ap;
+ struct sharedFileInfo * replaced;
+ uint_32 * replacedSizes;
+ /* for TR_REMOVED packages */
+ unsigned int record;
+} ;
/**
* The set of packages to be installed/removed atomically.
@@ -144,7 +171,7 @@ struct rpmTransactionSet_s {
/*@null@*/ FD_t scriptFd; /*!< Scriptlet stdout/stderr. */
int delta; /*!< Delta for reallocation. */
int id; /*!< Transaction id. */
-};
+} ;
/**
* Problems encountered while checking dependencies.
@@ -153,13 +180,13 @@ struct problemsSet {
struct rpmDependencyConflict * problems; /*!< Problems encountered. */
int num; /*!< No. of problems found. */
int alloced; /*!< No. of problems allocated. */
-};
+} ;
#ifdef __cplusplus
extern "C" {
#endif
-/* XXX lib/uninstall.c */
+/* XXX lib/scriptlet.c */
/**
* Compare package name-version-release from header with dependency, looking
* for overlap.
diff --git a/lib/fprint.h b/lib/fprint.h
index e55266424..26de6d820 100644
--- a/lib/fprint.h
+++ b/lib/fprint.h
@@ -3,7 +3,6 @@
/** \file lib/fprint.h
* Identify a file name path by a unique "finger print".
- *
*/
#include "hash.h"
@@ -33,7 +32,7 @@ typedef /*@abstract@*/ struct fprintCache_s {
* Associates a trailing sub-directory and final base name with an existing
* directory finger print.
*/
-typedef struct fingerprint_s {
+typedef struct fingerPrint_s {
/*! directory finger print entry (the directory path is stat(2)-able */
const struct fprintCacheEntry_s * entry;
/*! trailing sub-directory path (directories that are not stat(2)-able */
diff --git a/lib/install.c b/lib/install.c
index d9ec989df..07a3c1612 100644
--- a/lib/install.c
+++ b/lib/install.c
@@ -9,8 +9,8 @@
#include <rpmurl.h>
#include "cpio.h"
-#include "install.h"
#include "depends.h"
+#include "install.h"
#include "misc.h"
#include "debug.h"
@@ -31,16 +31,22 @@ struct callbackInfo {
/**
* Keeps track of memory allocated while accessing header tags.
*/
-struct fileMemory {
-/*@owned@*/ const char ** names;
+typedef struct fileMemory_s {
+/*@owned@*/ const char ** dnl;
+/*@owned@*/ const char ** bnl;
/*@owned@*/ const char ** cpioNames;
/*@owned@*/ const char ** md5sums;
/*@owned@*/ struct fileInfo * files;
-};
+} * fileMemory;
+/**
+ * Header file info, gathered per-file, rather than per-tag.
+ */
struct fileInfo {
/*@dependent@*/ const char * cpioPath;
/*@dependent@*/ const char * relativePath; /* relative to root */
+/*@dependent@*/ const char * dn; /* relative to root */
+/*@dependent@*/ const char * bn;
/*@dependent@*/ const char * md5sum;
uid_t uid;
gid_t gid;
@@ -79,7 +85,7 @@ static int rpmInstallLoadMacros(Header h)
struct tagMacro *tagm;
union {
const char * ptr;
- int_32 i32;
+ int_32 * i32p;
} body;
char numbuf[32];
int type;
@@ -89,7 +95,7 @@ static int rpmInstallLoadMacros(Header h)
continue;
switch (type) {
case RPM_INT32_TYPE:
- sprintf(numbuf, "%d", body.i32);
+ sprintf(numbuf, "%d", *body.i32p);
addMacro(NULL, tagm->macroname, NULL, numbuf, -1);
break;
case RPM_STRING_TYPE:
@@ -104,11 +110,12 @@ static int rpmInstallLoadMacros(Header h)
* Create memory used to access header.
* @return pointer to memory
*/
-static /*@only@*/ struct fileMemory *newFileMemory(void)
+static /*@only@*/ fileMemory newFileMemory(void)
{
- struct fileMemory *fileMem = xmalloc(sizeof(*fileMem));
+ fileMemory fileMem = xmalloc(sizeof(*fileMem));
fileMem->files = NULL;
- fileMem->names = NULL;
+ fileMem->dnl = NULL;
+ fileMem->bnl = NULL;
fileMem->cpioNames = NULL;
fileMem->md5sums = NULL;
return fileMem;
@@ -118,10 +125,11 @@ static /*@only@*/ struct fileMemory *newFileMemory(void)
* Destroy memory used to access header.
* @param fileMem pointer to memory
*/
-static void freeFileMemory( /*@only@*/ struct fileMemory *fileMem)
+static void freeFileMemory( /*@only@*/ fileMemory fileMem)
{
if (fileMem->files) free(fileMem->files);
- if (fileMem->names) free(fileMem->names);
+ if (fileMem->dnl) free(fileMem->dnl);
+ if (fileMem->bnl) free(fileMem->bnl);
if (fileMem->cpioNames) free(fileMem->cpioNames);
if (fileMem->md5sums) free(fileMem->md5sums);
free(fileMem);
@@ -130,6 +138,7 @@ static void freeFileMemory( /*@only@*/ struct fileMemory *fileMem)
/* files should not be preallocated */
/**
* Build file information array.
+ * @param fi transaction file info (NULL for source package)
* @param h header
* @retval memPtr address of allocated memory from header access
* @retval fileCountPtr address of install file count
@@ -138,14 +147,19 @@ static void freeFileMemory( /*@only@*/ struct fileMemory *fileMem)
* @param actions array of file dispositions
* @return 0 always
*/
-static int assembleFileList(Header h, /*@out@*/ struct fileMemory ** memPtr,
- /*@out@*/ int * fileCountPtr, /*@out@*/ struct fileInfo ** filesPtr,
- int stripPrefixLength, enum fileActions * actions)
+static int assembleFileList(TFI_t fi, Header h,
+ /*@out@*/ fileMemory * memPtr,
+ /*@out@*/ int * fileCountPtr,
+ /*@out@*/ struct fileInfo ** filesPtr,
+ int stripPrefixLength)
{
- uint_32 * fileFlags;
- uint_32 * fileSizes;
- uint_16 * fileModes;
- struct fileMemory *mem = newFileMemory();
+ enum fileActions * actions;
+ const char ** dnl, ** bnl, ** fmd5s;
+ const int_32 * dil;
+ uint_32 * fflags;
+ uint_32 * fsizes;
+ uint_16 * fmodes;
+ fileMemory mem = newFileMemory();
struct fileInfo * files;
struct fileInfo * file;
int fileCount;
@@ -155,8 +169,6 @@ static int assembleFileList(Header h, /*@out@*/ struct fileMemory ** memPtr,
if (!headerIsEntry(h, RPMTAG_BASENAMES)) return 0;
- rpmBuildFileList(h, &mem->names, fileCountPtr);
-
if (headerIsEntry(h, RPMTAG_ORIGBASENAMES)) {
buildOrigFileList(h, &mem->cpioNames, fileCountPtr);
} else {
@@ -167,28 +179,45 @@ static int assembleFileList(Header h, /*@out@*/ struct fileMemory ** memPtr,
files = *filesPtr = mem->files = xcalloc(fileCount, sizeof(*mem->files));
- headerGetEntry(h, RPMTAG_FILEMD5S, NULL, (void **) &mem->md5sums, NULL);
- headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlags, NULL);
- headerGetEntry(h, RPMTAG_FILEMODES, NULL, (void **) &fileModes, NULL);
- headerGetEntry(h, RPMTAG_FILESIZES, NULL, (void **) &fileSizes, NULL);
+ if (fi) {
+ dnl = fi->dnl;
+ dil = fi->dil;
+ bnl = fi->bnl;
+ fmd5s = fi->fmd5s;
+ fflags = fi->fflags;
+ fmodes = fi->fmodes;
+ fsizes = fi->fsizes;
+ actions = fi->actions;
+ } else {
+ headerGetEntry(h, RPMTAG_DIRNAMES, NULL, (void **) &dnl, NULL);
+ mem->dnl = dnl;
+ headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dil, NULL);
+ mem->bnl = bnl;
+ headerGetEntry(h, RPMTAG_BASENAMES, NULL, (void **) &bnl, NULL);
+ if (!headerGetEntry(h, RPMTAG_FILEMD5S, NULL, (void **) &fmd5s, NULL))
+ fmd5s = NULL;
+ mem->md5sums = fmd5s;
+ headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, (void **) &fflags, NULL);
+ headerGetEntry(h, RPMTAG_FILEMODES, NULL, (void **) &fmodes, NULL);
+ headerGetEntry(h, RPMTAG_FILESIZES, NULL, (void **) &fsizes, NULL);
+ actions = NULL;
+ }
for (i = 0, file = files; i < fileCount; i++, file++) {
file->state = RPMFILE_STATE_NORMAL;
- if (actions)
- file->action = actions[i];
- else
- file->action = FA_UNKNOWN;
+ file->action = (actions ? actions[i] : FA_UNKNOWN);
file->install = 1;
- file->relativePath = mem->names[i];
+ file->dn = dnl[dil[i]];
+ file->bn = bnl[i];
file->cpioPath = mem->cpioNames[i] + stripPrefixLength;
- file->md5sum = mem->md5sums[i];
- file->mode = fileModes[i];
- file->size = fileSizes[i];
- file->flags = fileFlags[i];
+ file->md5sum = (fmd5s ? fmd5s[i] : NULL);
+ file->mode = fmodes[i];
+ file->size = fsizes[i];
+ file->flags = fflags[i];
- rpmMessage(RPMMESS_DEBUG, _(" file: %s action: %s\n"),
- file->relativePath, fileActionString(file->action));
+ rpmMessage(RPMMESS_DEBUG, _(" file: %s%s action: %s\n"),
+ file->dn, file->bn, fileActionString(file->action));
}
return 0;
@@ -570,7 +599,6 @@ static int installArchive(FD_t fd, struct fileInfo * files, int fileCount,
struct callbackInfo info;
char * rpmio_flags;
FD_t cfd;
- int urltype;
int saveerrno;
if (!files) {
@@ -596,11 +624,9 @@ static int installArchive(FD_t fd, struct fileInfo * files, int fileCount,
if (!files[i].install) continue;
map[mappedFiles].archivePath = files[i].cpioPath;
-#ifdef DYING
- map[mappedFiles].fsPath = files[i].relativePath;
-#else
- urltype = urlPath(files[i].relativePath, &map[mappedFiles].fsPath);
-#endif
+ (void) urlPath(files[i].dn, &map[mappedFiles].dirName);
+ map[mappedFiles].baseName = files[i].bn;
+
/* XXX Can't do src rpm MD5 sum verification (yet). */
/* XXX binary rpms always have RPMTAG_SOURCERPM, source rpms do not */
map[mappedFiles].md5sum = headerIsEntry(h, RPMTAG_SOURCERPM)
@@ -689,7 +715,7 @@ static int installSources(Header h, const char * rootDir, FD_t fd,
char * instSpecFile, * correctSpecFile;
int fileCount = 0;
uint_32 * archiveSizePtr = NULL;
- struct fileMemory *fileMem = NULL;
+ fileMemory fileMem = NULL;
struct fileInfo * files = NULL;
int i;
const char * currDir = NULL;
@@ -764,10 +790,9 @@ static int installSources(Header h, const char * rootDir, FD_t fd,
if (h != NULL && headerIsEntry(h, RPMTAG_BASENAMES)) {
/* we can't remap v1 packages */
- assembleFileList(h, &fileMem, &fileCount, &files, 0, NULL);
+ assembleFileList(NULL, h, &fileMem, &fileCount, &files, 0);
for (i = 0; i < fileCount; i++) {
- files[i].relativePath = files[i].relativePath;
files[i].uid = currUid;
files[i].gid = currGid;
}
@@ -953,13 +978,10 @@ int rpmInstallSourcePackage(const char * rootDir, FD_t fd,
return rc;
}
-int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
- const void * pkgKey, enum fileActions * actions,
- struct sharedFileInfo * sharedList)
+int installBinaryPackage(const rpmTransactionSet ts, Header h, TFI_t fi)
{
rpmtransFlags transFlags = ts->transFlags;
- int rc;
- const char * name, * version, * release;
+ struct availablePackage * alp = fi->ap;
int fileCount = 0;
int type, count;
struct fileInfo * files;
@@ -968,27 +990,32 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
int otherOffset = 0;
int scriptArg;
int stripSize = 1; /* strip at least first / for cpio */
- struct fileMemory *fileMem = NULL;
+ fileMemory fileMem = NULL;
+ int rc;
+
+#ifdef DYING
+ const char * name, * version, * release;
+ headerNVR(h, &name, &version, &release);
+#endif
/* XXX this looks broke, as libraries may need /sbin/ldconfig for example */
if (transFlags & (RPMTRANS_FLAG_JUSTDB | RPMTRANS_FLAG_MULTILIB))
transFlags |= RPMTRANS_FLAG_NOSCRIPTS;
- headerNVR(h, &name, &version, &release);
-
rpmMessage(RPMMESS_DEBUG, _("package: %s-%s-%s files test = %d\n"),
- name, version, release, transFlags & RPMTRANS_FLAG_TEST);
+ alp->name, alp->version, alp->release,
+ transFlags & RPMTRANS_FLAG_TEST);
- if ((scriptArg = rpmdbCountPackages(ts->rpmdb, name)) < 0) {
+ if ((scriptArg = rpmdbCountPackages(ts->rpmdb, alp->name)) < 0) {
rc = 2;
goto exit;
}
scriptArg += 1;
{ rpmdbMatchIterator mi;
- mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, name, 0);
- rpmdbSetIteratorVersion(mi, version);
- rpmdbSetIteratorRelease(mi, release);
+ mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, alp->name, 0);
+ rpmdbSetIteratorVersion(mi, alp->version);
+ rpmdbSetIteratorRelease(mi, alp->release);
while ((oldH = rpmdbNextIterator(mi))) {
otherOffset = rpmdbGetIteratorOffset(mi);
oldH = (transFlags & RPMTRANS_FLAG_MULTILIB)
@@ -1010,8 +1037,7 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
stripSize = 1;
}
- if (assembleFileList(h, &fileMem, &fileCount, &files, stripSize,
- actions)) {
+ if (assembleFileList(fi, h, &fileMem, &fileCount, &files, stripSize)) {
rc = 2;
goto exit;
}
@@ -1031,10 +1057,10 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
transFlags & RPMTRANS_FLAG_NOSCRIPTS);
if (rc) {
- rc = 2;
rpmError(RPMERR_SCRIPT,
_("skipping %s-%s-%s install, %%pre scriptlet failed rc %d\n"),
- name, version, release, rc);
+ alp->name, alp->version, alp->release, rc);
+ rc = 2;
goto exit;
}
@@ -1059,11 +1085,11 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
ext = NULL;
switch (files[i].action) {
- case FA_BACKUP:
+ case FA_BACKUP:
ext = ".rpmorig";
break;
- case FA_ALTNAME:
+ case FA_ALTNAME:
newpath = alloca(strlen(files[i].relativePath) + 20);
(void)stpcpy(stpcpy(newpath, files[i].relativePath), ".rpmnew");
rpmMessage(RPMMESS_WARNING, _("%s created as %s\n"),
@@ -1071,30 +1097,30 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
files[i].relativePath = newpath;
break;
- case FA_SAVE:
+ case FA_SAVE:
ext = ".rpmsave";
break;
- case FA_CREATE:
+ case FA_CREATE:
break;
- case FA_SKIP:
- case FA_SKIPMULTILIB:
+ case FA_SKIP:
+ case FA_SKIPMULTILIB:
files[i].install = 0;
break;
- case FA_SKIPNSTATE:
+ case FA_SKIPNSTATE:
files[i].state = RPMFILE_STATE_NOTINSTALLED;
files[i].install = 0;
break;
- case FA_SKIPNETSHARED:
+ case FA_SKIPNETSHARED:
files[i].state = RPMFILE_STATE_NETSHARED;
files[i].install = 0;
break;
- case FA_UNKNOWN:
- case FA_REMOVE:
+ case FA_UNKNOWN:
+ case FA_REMOVE:
files[i].install = 0;
break;
}
@@ -1122,12 +1148,14 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
if (ts->notify) {
(void)ts->notify(h, RPMCALLBACK_INST_START, 0, 0,
- pkgKey, ts->notifyData);
+ alp->key, ts->notifyData);
}
/* the file pointer for fd is pointing at the cpio archive */
- if (installArchive(fd, files, fileCount, ts->notify, ts->notifyData, pkgKey,
- h, NULL, archiveSizePtr ? *archiveSizePtr : 0)) {
+ if (installArchive(alp->fd, files, fileCount,
+ ts->notify, ts->notifyData, alp->key,
+ h, NULL, archiveSizePtr ? *archiveSizePtr : 0))
+ {
rc = 2;
goto exit;
}
@@ -1185,7 +1213,7 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
headerModifyEntry(oldH, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
&multiLib, 1);
}
- if (mergeFiles(oldH, h, actions)) {
+ if (mergeFiles(oldH, h, fi->actions)) {
rc = 2;
goto exit;
}
@@ -1221,8 +1249,8 @@ int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
}
}
- if (sharedList)
- markReplacedFiles(ts->rpmdb, sharedList);
+ if (fi->fc > 0 && fi->replaced)
+ markReplacedFiles(ts->rpmdb, fi->replaced);
rc = 0;
diff --git a/lib/install.h b/lib/install.h
index 76e304389..8792f99ff 100644
--- a/lib/install.h
+++ b/lib/install.h
@@ -56,6 +56,8 @@ enum fileTypes {
SOCK = 12 /*!< socket */
};
+/*@abstract@*/ typedef struct transactionFileInfo_s * TFI_t;
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -103,16 +105,11 @@ int runImmedTriggers(const rpmTransactionSet ts, int sense, Header h,
/**
* Install binary package (from transaction set).
* @param ts transaction set
- * @param fd package file handle
* @param h package header
- * @param pkgKey package private data
- * @param actions array of file dispositions
- * @param sharedList header instances of packages that share files
+ * @param fi transaction file info
* @return 0 on success, 1 on bad magic, 2 on error
*/
-int installBinaryPackage(const rpmTransactionSet ts, FD_t fd, Header h,
- const void * pkgKey, enum fileActions * actions,
- struct sharedFileInfo * sharedList);
+int installBinaryPackage(const rpmTransactionSet ts, Header h, TFI_t fi);
/**
* Erase binary package (from transaction set).
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 9997efbae..d6aef07f4 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -354,13 +354,14 @@ union _dbswap {
/**
* Return items that match criteria.
* @param dbi index database handle
+ * @param dbcursor index database cursor
* @param keyp search key
* @param keylen search key length (0 will use strlen(key))
* @param setp address of items retrieved from index database
* @return -1 error, 0 success, 1 not found
*/
-static int dbiSearch(dbiIndex dbi, DBC * dbcursor, const char * keyp, size_t keylen,
- dbiIndexSet * setp)
+static int dbiSearch(dbiIndex dbi, DBC * dbcursor,
+ const char * keyp, size_t keylen, dbiIndexSet * setp)
{
void * datap;
size_t datalen;
@@ -432,15 +433,17 @@ static int dbiSearch(dbiIndex dbi, DBC * dbcursor, const char * keyp, size_t key
/**
* Change/delete items that match criteria.
- * @param dbi index database handle
- * @param keyp update key
- * @param set items to update in index database
- * @return 0 success, 1 not found
+ * @param dbi index database handle
+ * @param dbcursor index database cursor
+ * @param keyp update key
+ * @param keylen update key length
+ * @param set items to update in index database
+ * @return 0 success, 1 not found
*/
/*@-compmempass@*/
-static int dbiUpdateIndex(dbiIndex dbi, DBC * dbcursor, const char * keyp, dbiIndexSet set)
+static int dbiUpdateIndex(dbiIndex dbi, DBC * dbcursor,
+ const void * keyp, size_t keylen, dbiIndexSet set)
{
- size_t keylen = strlen(keyp);
void * datap;
size_t datalen;
int rc;
@@ -918,7 +921,7 @@ static int rpmdbFindByFile(rpmdb rpmdb, const char * filespec,
dbi = dbiOpen(rpmdb, RPMTAG_BASENAMES, 0);
dbcursor = NULL;
xx = dbiCopen(dbi, &dbcursor, 0);
- rc = dbiSearch(dbi, dbcursor, baseName, 0, &allMatches);
+ rc = dbiSearch(dbi, dbcursor, baseName, strlen(baseName), &allMatches);
xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL;
if (rc) {
@@ -1012,7 +1015,7 @@ int rpmdbCountPackages(rpmdb rpmdb, const char * name)
if (dbi) {
DBC * dbcursor = NULL;
xx = dbiCopen(dbi, &dbcursor, 0);
- rc = dbiSearch(dbi, dbcursor, name, 0, &matches);
+ rc = dbiSearch(dbi, dbcursor, name, strlen(name), &matches);
xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL;
}
@@ -1042,7 +1045,7 @@ static int dbiFindMatches(dbiIndex dbi, DBC * dbcursor,
int rc;
int i;
- rc = dbiSearch(dbi, dbcursor, name, 0, matches);
+ rc = dbiSearch(dbi, dbcursor, name, strlen(name), matches);
if (rc != 0) {
rc = ((rc == -1) ? 2 : 1);
@@ -1113,9 +1116,14 @@ exit:
return rc;
}
-/* 0 found matches */
-/* 1 no matches */
-/* 2 error */
+/**
+ * Lookup by name, name-version, and finally by name-version-release.
+ * @param dbi index database handle (always RPMDBI_PACKAGES)
+ * @param dbcursor index database cursor
+ * @param arg
+ * @param matches
+ * @return 0 on success, 1 on no mtches, 2 on error
+ */
static int dbiFindByLabel(dbiIndex dbi, DBC * dbcursor, const char * arg, dbiIndexSet * matches)
{
char * localarg, * chptr;
@@ -1160,6 +1168,7 @@ static int dbiFindByLabel(dbiIndex dbi, DBC * dbcursor, const char * arg, dbiInd
* Note: this is called from a markReplacedFiles iteration, and *must*
* preserve the "join key" (i.e. offset) for the header.
* @param dbi index database handle (always RPMDBI_PACKAGES)
+ * @param dbcursor index database cursor
* @param offset join key
* @param h rpm header
* @return 0 on success
@@ -1577,13 +1586,22 @@ fprintf(stderr, "*** RMW %s %p\n", tagName(rpmtag), dbi->dbi_rmw);
return mi;
}
-static INLINE int removeIndexEntry(dbiIndex dbi, DBC * dbcursor, const char * keyp,
- dbiIndexItem rec)
+/**
+ * Remove entry from database index.
+ * @param dbi index database handle
+ * @param dbcursor index database cursor
+ * @param keyp search key
+ * @param keylen search key length
+ * @param rec record to remove
+ * @return 0 on success
+ */
+static INLINE int removeIndexEntry(dbiIndex dbi, DBC * dbcursor,
+ const void * keyp, size_t keylen, dbiIndexItem rec)
{
dbiIndexSet set = NULL;
int rc;
- rc = dbiSearch(dbi, dbcursor, keyp, 0, &set);
+ rc = dbiSearch(dbi, dbcursor, keyp, keylen, &set);
if (rc < 0) /* not found */
rc = 0;
@@ -1591,7 +1609,7 @@ static INLINE int removeIndexEntry(dbiIndex dbi, DBC * dbcursor, const char * ke
rc = 1; /* error message already generated from dbindex.c */
else { /* success */
if (!dbiPruneSet(set, rec, 1, sizeof(*rec), 1) &&
- dbiUpdateIndex(dbi, dbcursor, keyp, set))
+ dbiUpdateIndex(dbi, dbcursor, keyp, keylen, set))
rc = 1;
}
@@ -1698,19 +1716,23 @@ int rpmdbRemove(rpmdb rpmdb, int rid, unsigned int hdrNum)
}
for (i = 0; i < rpmcnt; i++) {
+ const void * valp;
+ size_t vallen;
+
/*
* This is almost right, but, if there are duplicate tag
* values, there will be duplicate attempts to remove
* the header instance. It's easier to just ignore errors
* than to do things correctly.
*/
- xx = removeIndexEntry(dbi, dbcursor, rpmvals[i], rec);
+ valp = rpmvals[i];
+ vallen = strlen(rpmvals[i]);
+ xx = removeIndexEntry(dbi, dbcursor, valp, vallen, rec);
}
xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL;
- /* XXX HACK sync is on the bt with multiple db access */
if (!dbi->dbi_no_dbsync)
xx = dbiSync(dbi, 0);
@@ -1733,12 +1755,22 @@ int rpmdbRemove(rpmdb rpmdb, int rid, unsigned int hdrNum)
return 0;
}
-static INLINE int addIndexEntry(dbiIndex dbi, DBC * dbcursor, const char *index, dbiIndexItem rec)
+/**
+ * Add entry to database index.
+ * @param dbi index database handle
+ * @param dbcursor index database cursor
+ * @param keyp search key
+ * @param keylen search key length
+ * @param rec record to add
+ * @return 0 on success
+ */
+static INLINE int addIndexEntry(dbiIndex dbi, DBC * dbcursor,
+ const char * keyp, size_t keylen, dbiIndexItem rec)
{
dbiIndexSet set = NULL;
int rc;
- rc = dbiSearch(dbi, dbcursor, index, 0, &set);
+ rc = dbiSearch(dbi, dbcursor, keyp, keylen, &set);
if (rc > 0) {
rc = 1; /* error */
@@ -1748,7 +1780,7 @@ static INLINE int addIndexEntry(dbiIndex dbi, DBC * dbcursor, const char *index,
set = xcalloc(1, sizeof(*set));
}
dbiAppendSet(set, rec, 1, sizeof(*rec), 0);
- if (dbiUpdateIndex(dbi, dbcursor, index, set))
+ if (dbiUpdateIndex(dbi, dbcursor, keyp, keylen, set))
rc = 1;
}
@@ -1922,6 +1954,8 @@ int rpmdbAdd(rpmdb rpmdb, int iid, Header h)
}
for (i = 0; i < rpmcnt; i++) {
+ const void * valp;
+ size_t vallen;
/*
* Include the tagNum in all indices. rpm-3.0.4 and earlier
@@ -1950,7 +1984,9 @@ int rpmdbAdd(rpmdb rpmdb, int iid, Header h)
break;
}
- rc += addIndexEntry(dbi, dbcursor, rpmvals[i], rec);
+ valp = rpmvals[i];
+ vallen = strlen(rpmvals[i]);
+ rc += addIndexEntry(dbi, dbcursor, valp, vallen, rec);
}
xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL;
diff --git a/lib/rpmlib.h b/lib/rpmlib.h
index 9f0656849..f8b5d0e22 100644
--- a/lib/rpmlib.h
+++ b/lib/rpmlib.h
@@ -968,15 +968,18 @@ void rpmdepFreeConflicts( /*@only@*/ struct rpmDependencyConflict * conflicts,
* Bit(s) to control rpmRunTransaction() operation.
*/
typedef enum rpmtransFlags_e {
- RPMTRANS_FLAG_TEST = (1 << 0), /*!< from --test */
- RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), /*!< @todo Document. */
- RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), /*!< from --noscripts */
- RPMTRANS_FLAG_JUSTDB = (1 << 3), /*!< from --justdb */
- RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), /*!< from --notriggers */
- RPMTRANS_FLAG_NODOCS = (1 << 5), /*!< from --nodocs */
- RPMTRANS_FLAG_ALLFILES = (1 << 6), /*!< from --allfiles */
- RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), /*!< @todo Document. */
- RPMTRANS_FLAG_MULTILIB = (1 << 8), /*!< @todo Document. */
+ RPMTRANS_FLAG_NONE = 0,
+ RPMTRANS_FLAG_TEST = (1 << 0), /*!< from --test */
+ RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), /*!< @todo Document. */
+ RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), /*!< from --noscripts */
+ RPMTRANS_FLAG_JUSTDB = (1 << 3), /*!< from --justdb */
+ RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), /*!< from --notriggers */
+ RPMTRANS_FLAG_NODOCS = (1 << 5), /*!< from --excludedocs */
+ RPMTRANS_FLAG_ALLFILES = (1 << 6), /*!< from --allfiles */
+ RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), /*!< @todo Document. */
+ RPMTRANS_FLAG_MULTILIB = (1 << 8), /*!< @todo Document. */
+ RPMTRANS_FLAG_DIRSTASH = (1 << 9), /*!< from --dirstash */
+ RPMTRANS_FLAG_REPACKAGE = (1 << 10), /*!< from --repackage */
} rpmtransFlags;
/** \ingroup rpmtrans
@@ -1024,15 +1027,15 @@ void rpmShowRpmlibProvides(FILE * fp) /*@modifies *fp @*/;
*/
typedef enum rpmprobFilterFlags_e {
RPMPROB_FILTER_NONE = 0,
- RPMPROB_FILTER_IGNOREOS = (1 << 0),
- RPMPROB_FILTER_IGNOREARCH = (1 << 1),
- RPMPROB_FILTER_REPLACEPKG = (1 << 2),
- RPMPROB_FILTER_FORCERELOCATE= (1 << 3),
- RPMPROB_FILTER_REPLACENEWFILES= (1 << 4),
- RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5),
- RPMPROB_FILTER_OLDPACKAGE = (1 << 6),
- RPMPROB_FILTER_DISKSPACE = (1 << 7),
- RPMPROB_FILTER_DISKNODES = (1 << 8)
+ RPMPROB_FILTER_IGNOREOS = (1 << 0), /*!< from --ignoreos */
+ RPMPROB_FILTER_IGNOREARCH = (1 << 1), /*!< from --ignorearch */
+ RPMPROB_FILTER_REPLACEPKG = (1 << 2), /*!< from --replacepkgs */
+ RPMPROB_FILTER_FORCERELOCATE= (1 << 3), /*!< from --badreloc */
+ RPMPROB_FILTER_REPLACENEWFILES= (1 << 4), /*!< from --replacefiles */
+ RPMPROB_FILTER_REPLACEOLDFILES= (1 << 5), /*!< from --replacefiles */
+ RPMPROB_FILTER_OLDPACKAGE = (1 << 6), /*!< from --oldpackage */
+ RPMPROB_FILTER_DISKSPACE = (1 << 7), /*!< from --ignoresize */
+ RPMPROB_FILTER_DISKNODES = (1 << 8) /*!< from --ignoresize */
} rpmprobFilterFlags;
/** \ingroup rpmtrans
@@ -1358,13 +1361,14 @@ int rpmVerify(QVA_t *qva, rpmQVSources source, const char *arg);
* Bit(s) to control rpmInstall() operation.
*/
typedef enum rpmInstallInterfaceFlags_e {
+ INSTALL_NONE = 0,
INSTALL_PERCENT = (1 << 0), /*!< from --percent */
INSTALL_HASH = (1 << 1), /*!< from --hash */
INSTALL_NODEPS = (1 << 2), /*!< from --nodeps */
INSTALL_NOORDER = (1 << 3), /*!< from --noorder */
INSTALL_LABEL = (1 << 4), /*!< from --verbose (notify) */
INSTALL_UPGRADE = (1 << 5), /*!< from --upgrade */
- INSTALL_FRESHEN = (1 << 6) /*!< from --freshen */
+ INSTALL_FRESHEN = (1 << 6), /*!< from --freshen */
} rpmInstallInterfaceFlags;
/** \ingroup rpmcli
@@ -1398,8 +1402,9 @@ int rpmInstallSource(const char * prefix, const char * arg,
* Bit(s) to control rpmErase() operation.
*/
typedef enum rpmEraseInterfaceFlags_e {
+ UNINSTALL_NONE = 0,
UNINSTALL_NODEPS = (1 << 0), /*!< from --nodeps */
- UNINSTALL_ALLMATCHES= (1 << 1) /*!< from --allmatches */
+ UNINSTALL_ALLMATCHES= (1 << 1), /*!< from --allmatches */
} rpmEraseInterfaceFlags;
/** \ingroup rpmcli
diff --git a/lib/transaction.c b/lib/transaction.c
index 6f5d5e680..ddfacefb3 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -43,31 +43,6 @@
/*@access rpmProblemSet@*/
/*@access rpmProblem@*/
-typedef struct transactionFileInfo {
- /* for all packages */
- enum rpmTransactionType type;
- enum fileActions * actions; /*!< file disposition */
-/*@dependent@*/ fingerPrint * fps; /*!< file fingerprints */
- uint_32 * fflags; /*!< file flags (from header) */
- uint_32 * fsizes; /*!< file sizes (from header) */
- const char ** bnl; /*!< base names (from header) */
- const char ** dnl; /*!< directory names (from header) */
- const int * dil; /*!< directory indices (from header) */
- const char ** fmd5s; /*!< file MD5 sums (from header) */
- uint_16 * fmodes; /*!< file modes (from header) */
- Header h; /*!< package header */
- int fc; /*!< no. of files. */
- int dc; /*!< no. of directories. */
- char * fstates; /*!< file states (from header) */
- /* these are for TR_ADDED packages */
- const char ** flinks; /*!< file links (from header) */
- struct availablePackage * ap;
- struct sharedFileInfo * replaced;
- uint_32 * replacedSizes;
- /* for TR_REMOVED packages */
- unsigned int record;
-} TFI_t;
-
struct diskspaceInfo {
dev_t dev; /*!< file system device number. */
signed long bneeded; /*!< no. of blocks needed. */
@@ -89,7 +64,48 @@ struct diskspaceInfo {
#define XFA_SKIPPING(_a) \
((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPMULTILIB)
-static void freeFi(TFI_t *fi)
+static void loadFi(TFI_t fi)
+{
+ int len, i;
+
+ if (!headerGetEntry(fi->h, RPMTAG_BASENAMES, NULL,
+ (void **) &fi->bnl, &fi->fc))
+ {
+ fi->dc = 0;
+ fi->fc = 0;
+ fi->dnl = NULL;
+ fi->bnl = NULL;
+ fi->dil = NULL;
+ fi->fmodes = NULL;
+ fi->fflags = NULL;
+ fi->fsizes = NULL;
+ fi->fstates = NULL;
+ return;
+ }
+
+ headerGetEntry(fi->h, RPMTAG_DIRINDEXES, NULL, (void **)&fi->dil, NULL);
+ headerGetEntry(fi->h, RPMTAG_DIRNAMES, NULL, (void **)&fi->dnl, &fi->dc);
+ headerGetEntry(fi->h, RPMTAG_FILEMODES, NULL, (void **)&fi->fmodes, NULL);
+ headerGetEntry(fi->h, RPMTAG_FILEFLAGS, NULL, (void **)&fi->fflags, NULL);
+ headerGetEntry(fi->h, RPMTAG_FILESIZES, NULL, (void **)&fi->fsizes, NULL);
+ headerGetEntry(fi->h, RPMTAG_FILESTATES, NULL, (void **)&fi->fstates, NULL);
+
+ fi->dnlmax = -1;
+ for (i = 0; i < fi->dc; i++) {
+ if ((len = strlen(fi->dnl[i])) > fi->dnlmax)
+ fi->dnlmax = len;
+ }
+
+ fi->bnlmax = -1;
+ for (i = 0; i < fi->fc; i++) {
+ if ((len = strlen(fi->bnl[i])) > fi->bnlmax)
+ fi->bnlmax = len;
+ }
+
+ return;
+}
+
+static void freeFi(TFI_t fi)
{
if (fi->h) {
headerFree(fi->h); fi->h = NULL;
@@ -137,9 +153,9 @@ static void freeFi(TFI_t *fi)
}
}
-static void freeFl(rpmTransactionSet ts, TFI_t *flList)
+static void freeFl(rpmTransactionSet ts, TFI_t flList)
{
- TFI_t *fi;
+ TFI_t fi;
int oc;
for (oc = 0, fi = flList; oc < ts->orderCount; oc++, fi++) {
@@ -190,13 +206,12 @@ static rpmProblemSet psCreate(void)
}
static void psAppend(rpmProblemSet probs, rpmProblemType type,
- /*@dependent@*/ const void * key, Header h,
+ const struct availablePackage * alp,
const char * dn, const char *bn,
Header altH, unsigned long ulong1)
{
- const char *n, *v, *r;
- char *t;
rpmProblem p;
+ char *t;
if (probs->numProblems == probs->numProblemsAlloced) {
if (probs->numProblemsAlloced)
@@ -209,7 +224,7 @@ static void psAppend(rpmProblemSet probs, rpmProblemType type,
p = probs->probs + probs->numProblems++;
p->type = type;
- p->key = key;
+ p->key = alp->key;
p->ulong1 = ulong1;
p->ignoreProblem = 0;
@@ -221,22 +236,24 @@ static void psAppend(rpmProblemSet probs, rpmProblemType type,
} else
p->str1 = NULL;
- if (h) {
- p->h = headerLink(h);
- headerNVR(h, &n, &v, &r);
+ if (alp) {
+ p->h = headerLink(alp->h);
p->pkgNEVR =
- t = xmalloc(strlen(n) + strlen(v) + strlen(r) + sizeof("--"));
- t = stpcpy(t, n);
+ t = xmalloc(strlen(alp->name) +
+ strlen(alp->version) +
+ strlen(alp->release) + sizeof("--"));
+ t = stpcpy(t, alp->name);
t = stpcpy(t, "-");
- t = stpcpy(t, v);
+ t = stpcpy(t, alp->version);
t = stpcpy(t, "-");
- t = stpcpy(t, r);
+ t = stpcpy(t, alp->release);
} else {
- p->pkgNEVR = NULL;
p->h = NULL;
+ p->pkgNEVR = NULL;
}
if (altH) {
+ const char *n, *v, *r;
headerNVR(altH, &n, &v, &r);
p->altNEVR =
t = xmalloc(strlen(n) + strlen(v) + strlen(r) + sizeof("--"));
@@ -438,7 +455,7 @@ static Header relocateFileList(const rpmTransactionSet ts,
if (!strcmp(validRelocations[j], relocations[i].oldPath)) break;
/* XXX actions check prevents problem from being appended twice. */
if (j == numValid && !allowBadRelocate && actions)
- psAppend(probs, RPMPROB_BADRELOCATE, alp->key, alp->h,
+ psAppend(probs, RPMPROB_BADRELOCATE, alp,
relocations[i].oldPath, NULL, NULL, 0);
} else {
relocations[i].newPath = NULL;
@@ -886,7 +903,7 @@ static int filecmp(short mode1, const char * md51, const char * link1,
return 0;
}
-static int handleInstInstalledFiles(TFI_t * fi, rpmdb db,
+static int handleInstInstalledFiles(TFI_t fi, rpmdb db,
struct sharedFileInfo * shared,
int sharedCount, int reportConflicts,
rpmProblemSet probs,
@@ -945,7 +962,7 @@ static int handleInstInstalledFiles(TFI_t * fi, rpmdb db,
fi->fmd5s[fileNum],
fi->flinks[fileNum])) {
if (reportConflicts)
- psAppend(probs, RPMPROB_FILE_CONFLICT, fi->ap->key, fi->ap->h,
+ psAppend(probs, RPMPROB_FILE_CONFLICT, fi->ap,
fi->dnl[fi->dil[fileNum]], fi->bnl[fileNum], h, 0);
if (!(otherFlags[otherFileNum] | fi->fflags[fileNum])
& RPMFILE_CONFIG) {
@@ -983,7 +1000,7 @@ static int handleInstInstalledFiles(TFI_t * fi, rpmdb db,
return 0;
}
-static int handleRmvdInstalledFiles(TFI_t * fi, rpmdb db,
+static int handleRmvdInstalledFiles(TFI_t fi, rpmdb db,
struct sharedFileInfo * shared,
int sharedCount)
{
@@ -1022,7 +1039,7 @@ static int handleRmvdInstalledFiles(TFI_t * fi, rpmdb db,
/**
* Update disk space needs on each partition for this package.
*/
-static void handleOverlappedFiles(TFI_t * fi, hashTable ht,
+static void handleOverlappedFiles(TFI_t fi, hashTable ht,
rpmProblemSet probs, struct diskspaceInfo * dsl)
{
int i, j;
@@ -1033,7 +1050,7 @@ static void handleOverlappedFiles(TFI_t * fi, hashTable ht,
for (i = 0; i < fi->fc; i++) {
int otherPkgNum, otherFileNum;
- const TFI_t ** recs;
+ const TFI_t * recs;
int numRecs;
if (XFA_SKIPPING(fi->actions[i]))
@@ -1136,8 +1153,8 @@ static void handleOverlappedFiles(TFI_t * fi, hashTable ht,
fi->fmodes[i],
fi->fmd5s[i],
fi->flinks[i])) {
- psAppend(probs, RPMPROB_NEW_FILE_CONFLICT, fi->ap->key,
- fi->ap->h, filespec, NULL, recs[otherPkgNum]->ap->h, 0);
+ psAppend(probs, RPMPROB_NEW_FILE_CONFLICT, fi->ap,
+ filespec, NULL, recs[otherPkgNum]->ap->h, 0);
}
/* Try to get the disk accounting correct even if a conflict. */
@@ -1218,25 +1235,25 @@ static void handleOverlappedFiles(TFI_t * fi, hashTable ht,
if (filespec) free(filespec);
}
-static int ensureOlder(/*@unused@*/ rpmdb rpmdb, Header new, Header old, rpmProblemSet probs,
- /*@dependent@*/ const void * key)
+static int ensureOlder(struct availablePackage * alp, Header old,
+ rpmProblemSet probs)
{
int result, rc = 0;
if (old == NULL) return 1;
- result = rpmVersionCompare(old, new);
+ result = rpmVersionCompare(old, alp->h);
if (result <= 0)
rc = 0;
else if (result > 0) {
rc = 1;
- psAppend(probs, RPMPROB_OLDPACKAGE, key, new, NULL, NULL, old, 0);
+ psAppend(probs, RPMPROB_OLDPACKAGE, alp, NULL, NULL, old, 0);
}
return rc;
}
-static void skipFiles(TFI_t * fi, int noDocs)
+static void skipFiles(TFI_t fi, int noDocs)
{
int i;
char ** netsharedPaths = NULL;
@@ -1334,6 +1351,76 @@ static void skipFiles(TFI_t * fi, int noDocs)
if (languages) freeSplitString((char **)languages);
}
+static char * ridsub = ".rid/";
+static char * ridsep = ";";
+static mode_t riddmode = 0700;
+static mode_t ridfmode = 0000;
+
+static int dirstashPackage(const rpmTransactionSet ts, const TFI_t fi)
+{
+ unsigned int offset = fi->record;
+ char tsid[20], ofn[BUFSIZ], nfn[BUFSIZ];
+ const char * s, * t;
+ char * se, * te;
+ Header h;
+ int i;
+
+ { rpmdbMatchIterator mi = NULL;
+
+ mi = rpmdbInitIterator(ts->rpmdb, RPMDBI_PACKAGES,
+ &offset, sizeof(offset));
+
+ h = rpmdbNextIterator(mi);
+ if (h == NULL) {
+ rpmdbFreeIterator(mi);
+ return 1;
+ }
+ h = headerLink(h);
+ rpmdbFreeIterator(mi);
+ }
+
+ sprintf(tsid, "%08x", ts->id);
+
+ /* Create rid sub-directories if necessary. */
+ if (strchr(ridsub, '/')) {
+ for (i = 0; i < fi->dc; i++) {
+
+ t = te = nfn;
+ *te = '\0';
+ te = stpcpy(te, fi->dnl[i]);
+ te = stpcpy(te, ridsub);
+ if (te[-1] == '/')
+ *(--te) = '\0';
+fprintf(stderr, "*** mkdir(%s,%o)\n", t, riddmode);
+ }
+ }
+
+ /* Rename files about to be removed. */
+ for (i = 0; i < fi->fc; i++) {
+
+ if (S_ISDIR(fi->fmodes[i]))
+ continue;
+
+ s = se = ofn;
+ *se = '\0';
+ se = stpcpy( stpcpy(se, fi->dnl[fi->dil[i]]), fi->bnl[i]);
+
+ t = te = nfn;
+ *te = '\0';
+ te = stpcpy(te, fi->dnl[fi->dil[i]]);
+ if (ridsub)
+ te = stpcpy(te, ridsub);
+ te = stpcpy( stpcpy( stpcpy(te, fi->bnl[i]), ridsep), tsid);
+
+ s = strrchr(s, '/') + 1;
+ t = strrchr(t, '/') + 1;
+fprintf(stderr, "*** rename(%s,%s%s)\n", s, (ridsub ? ridsub : ""), t);
+fprintf(stderr, "*** chmod(%s%s,%o)\n", (ridsub ? ridsub : ""), t, ridfmode);
+ }
+
+ return 0;
+}
+
#define NOTIFY(_ts, _al) if ((_ts)->notify) (void) (_ts)->notify _al
int rpmRunTransactions( rpmTransactionSet ts,
@@ -1347,13 +1434,12 @@ int rpmRunTransactions( rpmTransactionSet ts,
Header * hdrs;
int totalFileCount = 0;
hashTable ht;
- TFI_t * flList, * fi;
+ TFI_t flList, fi;
struct sharedFileInfo * shared, * sharedList;
int numShared;
int flEntries;
int nexti;
int lastFailed;
- FD_t fd;
const char ** filesystems;
int filesystemCount;
struct diskspaceInfo * di = NULL;
@@ -1446,19 +1532,17 @@ int rpmRunTransactions( rpmTransactionSet ts,
alp++)
{
if (!archOkay(alp->h) && !(ts->ignoreSet & RPMPROB_FILTER_IGNOREARCH))
- psAppend(ts->probs, RPMPROB_BADARCH, alp->key, alp->h,
- NULL, NULL, NULL, 0);
+ psAppend(ts->probs, RPMPROB_BADARCH, alp, NULL, NULL, NULL, 0);
if (!osOkay(alp->h) && !(ts->ignoreSet & RPMPROB_FILTER_IGNOREOS))
- psAppend(ts->probs, RPMPROB_BADOS, alp->key, alp->h,
- NULL, NULL, NULL, 0);
+ psAppend(ts->probs, RPMPROB_BADOS, alp, NULL, NULL, NULL, 0);
if (!(ts->ignoreSet & RPMPROB_FILTER_OLDPACKAGE)) {
rpmdbMatchIterator mi;
Header oldH;
mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, alp->name, 0);
while ((oldH = rpmdbNextIterator(mi)) != NULL)
- ensureOlder(ts->rpmdb, alp->h, oldH, ts->probs, alp->key);
+ ensureOlder(alp, oldH, ts->probs);
rpmdbFreeIterator(mi);
}
@@ -1469,7 +1553,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
rpmdbSetIteratorVersion(mi, alp->version);
rpmdbSetIteratorRelease(mi, alp->release);
while (rpmdbNextIterator(mi) != NULL) {
- psAppend(ts->probs, RPMPROB_PKG_INSTALLED, alp->key, alp->h,
+ psAppend(ts->probs, RPMPROB_PKG_INSTALLED, alp,
NULL, NULL, NULL, 0);
break;
}
@@ -1507,7 +1591,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
* calling fpLookupList only once. I'm not sure that the speedup is
* worth the trouble though.
*/
- for (fi = flList, oc = 0; oc < ts->orderCount; fi++, oc++) {
+ for (oc = 0, fi = flList; oc < ts->orderCount; oc++, fi++) {
const char **preTrans;
int preTransCount;
@@ -1518,7 +1602,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
switch (ts->order[oc].type) {
case TR_ADDED:
i = ts->order[oc].u.addedIndex;
- alp = ts->addedPackages.list + ts->order[oc].u.addedIndex;
+ alp = ts->addedPackages.list + i;
if (!headerGetEntryMinMemory(alp->h, RPMTAG_BASENAMES, NULL,
NULL, &fi->fc)) {
@@ -1548,35 +1632,32 @@ int rpmRunTransactions( rpmTransactionSet ts,
/* ACK! */
continue;
}
+ fi->ap = alp = NULL;
fi->type = TR_REMOVED;
break;
}
- if (!headerGetEntry(fi->h, RPMTAG_BASENAMES, NULL,
- (void **) &fi->bnl, &fi->fc)) {
- /* This catches removed packages w/ no file lists */
- fi->dc = fi->fc = 0;
- continue;
- }
- headerGetEntry(fi->h, RPMTAG_DIRINDEXES, NULL, (void **) &fi->dil,
- NULL);
- headerGetEntry(fi->h, RPMTAG_DIRNAMES, NULL, (void **) &fi->dnl,
- &fi->dc);
+ loadFi(fi);
+ if (fi->fc == 0)
+ continue;
/* actions is initialized earlier for added packages */
if (fi->actions == NULL)
fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
- headerGetEntry(fi->h, RPMTAG_FILEMODES, NULL,
- (void **) &fi->fmodes, NULL);
- headerGetEntry(fi->h, RPMTAG_FILEFLAGS, NULL,
- (void **) &fi->fflags, NULL);
- headerGetEntry(fi->h, RPMTAG_FILESIZES, NULL,
- (void **) &fi->fsizes, NULL);
- headerGetEntry(fi->h, RPMTAG_FILESTATES, NULL,
- (void **) &fi->fstates, NULL);
-
switch (ts->order[oc].type) {
+ case TR_ADDED:
+ headerGetEntryMinMemory(fi->h, RPMTAG_FILEMD5S, NULL,
+ (const void **) &fi->fmd5s, NULL);
+ headerGetEntryMinMemory(fi->h, RPMTAG_FILELINKTOS, NULL,
+ (const void **) &fi->flinks, NULL);
+
+ /* 0 makes for noops */
+ fi->replacedSizes = xcalloc(fi->fc, sizeof(*fi->replacedSizes));
+
+ /* Skip netshared paths, not our i18n files, and excluded docs */
+ skipFiles(fi, ts->transFlags & RPMTRANS_FLAG_NODOCS);
+ break;
case TR_REMOVED:
headerGetEntry(fi->h, RPMTAG_FILEMD5S, NULL,
(void **) &fi->fmd5s, NULL);
@@ -1599,18 +1680,6 @@ int rpmRunTransactions( rpmTransactionSet ts,
headerFree(fi->h);
fi->h = NULL;
break;
- case TR_ADDED:
- headerGetEntryMinMemory(fi->h, RPMTAG_FILEMD5S, NULL,
- (const void **) &fi->fmd5s, NULL);
- headerGetEntryMinMemory(fi->h, RPMTAG_FILELINKTOS, NULL,
- (const void **) &fi->flinks, NULL);
-
- /* 0 makes for noops */
- fi->replacedSizes = xcalloc(fi->fc, sizeof(*fi->replacedSizes));
-
- /* Skip netshared paths, not our i18n files, and excluded docs */
- skipFiles(fi, ts->transFlags & RPMTRANS_FLAG_NODOCS);
- break;
}
fi->fps = xmalloc(sizeof(*fi->fps) * fi->fc);
@@ -1757,13 +1826,13 @@ int rpmRunTransactions( rpmTransactionSet ts,
continue;
if (adj_fs_blocks(dip->bneeded) > dip->bavail)
- psAppend(ts->probs, RPMPROB_DISKSPACE, fi->ap->key,
- fi->ap->h, filesystems[i], NULL, NULL,
+ psAppend(ts->probs, RPMPROB_DISKSPACE, fi->ap,
+ filesystems[i], NULL, NULL,
(adj_fs_blocks(dip->bneeded) - dip->bavail) * dip->bsize);
if (adj_fs_blocks(dip->ineeded) > dip->iavail)
- psAppend(ts->probs, RPMPROB_DISKNODES, fi->ap->key,
- fi->ap->h, filesystems[i], NULL, NULL,
+ psAppend(ts->probs, RPMPROB_DISKNODES, fi->ap,
+ filesystems[i], NULL, NULL,
(adj_fs_blocks(dip->ineeded) - dip->iavail));
}
break;
@@ -1786,16 +1855,11 @@ int rpmRunTransactions( rpmTransactionSet ts,
for (oc = 0, fi = flList; oc < ts->orderCount; oc++, fi++) {
if (fi->fc == 0)
continue;
- free(fi->bnl); fi->bnl = NULL;
- free(fi->dnl); fi->dnl = NULL;
switch (fi->type) {
case TR_ADDED:
- free(fi->fmd5s); fi->fmd5s = NULL;
- free(fi->flinks); fi->flinks = NULL;
free(fi->fps); fi->fps = NULL;
break;
case TR_REMOVED:
- free((void *)fi->dil); fi->dil = NULL;
free(fi->fps); fi->fps = NULL;
break;
}
@@ -1822,44 +1886,66 @@ int rpmRunTransactions( rpmTransactionSet ts,
}
/* ===============================================
+ * Save removed files before upgrading.
+ */
+ if (ts->transFlags & (RPMTRANS_FLAG_DIRSTASH | RPMTRANS_FLAG_REPACKAGE)) {
+ i = -2;
+ for (oc = 0, fi = flList; oc < ts->orderCount; oc++, fi++) {
+ switch (ts->order[oc].type) {
+ case TR_ADDED:
+ i = ts->order[oc].u.addedIndex;
+ break;
+ case TR_REMOVED:
+ if (ts->order[oc].u.removed.dependsOnIndex != i)
+ break;
+ if (ts->transFlags & RPMTRANS_FLAG_DIRSTASH)
+ dirstashPackage(ts, fi);
+ break;
+ }
+ }
+ }
+
+ /* ===============================================
* Install and remove packages.
*/
- lastFailed = -2;
+ lastFailed = -2; /* erased packages have -1 */
for (oc = 0, fi = flList; oc < ts->orderCount; oc++, fi++) {
+ int gotfd;
+
+ gotfd = 0;
switch (ts->order[oc].type) {
case TR_ADDED:
- alp = ts->addedPackages.list + ts->order[oc].u.addedIndex;
i = ts->order[oc].u.addedIndex;
+ alp = ts->addedPackages.list + i;
- if ((fd = alp->fd) == 0) {
- fd = ts->notify(fi->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
+ if (alp->fd == NULL) {
+ alp->fd = ts->notify(fi->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
alp->key, ts->notifyData);
- if (fd) {
+ if (alp->fd) {
Header h;
headerFree(hdrs[i]);
- rc = rpmReadPackageHeader(fd, &h, NULL, NULL, NULL);
+ rc = rpmReadPackageHeader(alp->fd, &h, NULL, NULL, NULL);
if (rc) {
(void)ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
alp->key, ts->notifyData);
+ alp->fd = NULL;
ourrc++;
- fd = NULL;
} else {
hdrs[i] = relocateFileList(ts, alp, h, NULL);
headerFree(h);
}
+ if (alp->fd) gotfd = 1;
}
}
- if (fd) {
+ if (alp->fd) {
if (alp->multiLib)
ts->transFlags |= RPMTRANS_FLAG_MULTILIB;
- if (installBinaryPackage(ts, fd, hdrs[i],
- alp->key, fi->actions,
- fi->fc ? fi->replaced : NULL)) {
+ if (installBinaryPackage(ts, hdrs[i], fi)) {
ourrc++;
lastFailed = i;
}
@@ -1870,9 +1956,11 @@ int rpmRunTransactions( rpmTransactionSet ts,
headerFree(hdrs[i]);
- if (alp->fd == NULL && fd)
+ if (gotfd) {
(void)ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
alp->key, ts->notifyData);
+ alp->fd = NULL;
+ }
break;
case TR_REMOVED:
{ unsigned int offset = fi->record;
diff --git a/lib/uninstall.c b/lib/uninstall.c
index 95c2de2cf..73695162b 100644
--- a/lib/uninstall.c
+++ b/lib/uninstall.c
@@ -20,23 +20,6 @@ static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
#define SUFFIX_RPMSAVE ".rpmsave"
/**
- * Return scriptlet name from tag.
- * @param tag scriptlet tag
- * @return name of scriptlet
- */
-static const char * tag2sln(int tag)
-{
- switch (tag) {
- case RPMTAG_PREIN: return "%pre";
- case RPMTAG_POSTIN: return "%post";
- case RPMTAG_PREUN: return "%preun";
- case RPMTAG_POSTUN: return "%postun";
- case RPMTAG_VERIFYSCRIPT: return "%verify";
- }
- return "%unknownscript";
-}
-
-/**
* Remove (or rename) file according to file disposition.
* @param file file
* @param fileAttrs file attributes (from package header)
@@ -52,7 +35,7 @@ static int removeFile(const char * file, rpmfileAttrs fileAttrs, short mode,
switch (action) {
- case FA_BACKUP:
+ case FA_BACKUP:
newfile = alloca(strlen(file) + sizeof(SUFFIX_RPMSAVE));
(void)stpcpy(stpcpy(newfile, file), SUFFIX_RPMSAVE);
@@ -63,7 +46,7 @@ static int removeFile(const char * file, rpmfileAttrs fileAttrs, short mode,
}
break;
- case FA_REMOVE:
+ case FA_REMOVE:
if (S_ISDIR(mode)) {
/* XXX should permit %missingok for directories as well */
if (rmdir(file)) {
@@ -92,14 +75,14 @@ static int removeFile(const char * file, rpmfileAttrs fileAttrs, short mode,
}
}
break;
- case FA_UNKNOWN:
- case FA_CREATE:
- case FA_SAVE:
- case FA_ALTNAME:
- case FA_SKIP:
- case FA_SKIPNSTATE:
- case FA_SKIPNETSHARED:
- case FA_SKIPMULTILIB:
+ case FA_UNKNOWN:
+ case FA_CREATE:
+ case FA_SAVE:
+ case FA_ALTNAME:
+ case FA_SKIP:
+ case FA_SKIPNSTATE:
+ case FA_SKIPNETSHARED:
+ case FA_SKIPMULTILIB:
break;
}
@@ -248,403 +231,3 @@ int removeBinaryPackage(const rpmTransactionSet ts, unsigned int offset,
return 0;
}
-
-/**
- * @param ts transaction set
- * @param h header
- * @param sln name of scriptlet section
- * @param progArgc
- * @param progArgv
- * @param script
- * @param arg1
- * @param arg2
- * @return
- */
-static int runScript(const rpmTransactionSet ts, Header h,
- const char * sln,
- int progArgc, const char ** progArgv,
- const char * script, int arg1, int arg2)
-{
- const char ** argv = NULL;
- int argc = 0;
- const char ** prefixes = NULL;
- int numPrefixes;
- const char * oldPrefix;
- int maxPrefixLength;
- int len;
- char * prefixBuf = NULL;
- pid_t child;
- int status;
- const char * fn = NULL;
- int i;
- int freePrefixes = 0;
- FD_t out;
-
- if (!progArgv && !script)
- return 0;
- else if (!progArgv) {
- argv = alloca(5 * sizeof(char *));
- argv[0] = "/bin/sh";
- argc = 1;
- } else {
- argv = alloca((progArgc + 4) * sizeof(char *));
- memcpy(argv, progArgv, progArgc * sizeof(char *));
- argc = progArgc;
- }
-
- if (headerGetEntry(h, RPMTAG_INSTPREFIXES, NULL, (void **) &prefixes,
- &numPrefixes)) {
- freePrefixes = 1;
- } else if (headerGetEntry(h, RPMTAG_INSTALLPREFIX, NULL,
- (void **) &oldPrefix,
- NULL)) {
- prefixes = &oldPrefix;
- numPrefixes = 1;
- } else {
- numPrefixes = 0;
- }
-
- maxPrefixLength = 0;
- for (i = 0; i < numPrefixes; i++) {
- len = strlen(prefixes[i]);
- if (len > maxPrefixLength) maxPrefixLength = len;
- }
- prefixBuf = alloca(maxPrefixLength + 50);
-
- if (script) {
- FD_t fd;
- if (makeTempFile((!ts->chrootDone ? ts->rootDir : "/"), &fn, &fd)) {
- if (freePrefixes) free(prefixes);
- return 1;
- }
-
- if (rpmIsDebug() &&
- (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")))
- (void)Fwrite("set -x\n", sizeof(char), 7, fd);
-
- (void)Fwrite(script, sizeof(script[0]), strlen(script), fd);
- Fclose(fd);
-
- { const char * sn = fn;
- if (!ts->chrootDone &&
- !(ts->rootDir[0] == '/' && ts->rootDir[1] == '\0'))
- {
- sn += strlen(ts->rootDir)-1;
- }
- argv[argc++] = sn;
- }
-
- if (arg1 >= 0) {
- char *av = alloca(20);
- sprintf(av, "%d", arg1);
- argv[argc++] = av;
- }
- if (arg2 >= 0) {
- char *av = alloca(20);
- sprintf(av, "%d", arg2);
- argv[argc++] = av;
- }
- }
-
- argv[argc] = NULL;
-
- if (ts->scriptFd != NULL) {
- if (rpmIsVerbose()) {
- out = fdDup(Fileno(ts->scriptFd));
- } else {
- out = Fopen("/dev/null", "w.fdio");
- if (Ferror(out)) {
- out = fdDup(Fileno(ts->scriptFd));
- }
- }
- } else {
- out = fdDup(STDOUT_FILENO);
- out = fdLink(out, "runScript persist");
- }
-
- if (!(child = fork())) {
- const char * rootDir;
- int pipes[2];
-
- pipes[0] = pipes[1] = 0;
- /* make stdin inaccessible */
- pipe(pipes);
- close(pipes[1]);
- dup2(pipes[0], STDIN_FILENO);
- close(pipes[0]);
-
- if (ts->scriptFd != NULL) {
- if (Fileno(ts->scriptFd) != STDERR_FILENO)
- dup2(Fileno(ts->scriptFd), STDERR_FILENO);
- if (Fileno(out) != STDOUT_FILENO)
- dup2(Fileno(out), STDOUT_FILENO);
- /* make sure we don't close stdin/stderr/stdout by mistake! */
- if (Fileno(out) > STDERR_FILENO && Fileno(out) != Fileno(ts->scriptFd)) {
- Fclose (out);
- }
- if (Fileno(ts->scriptFd) > STDERR_FILENO) {
- Fclose (ts->scriptFd);
- }
- }
-
- { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
- const char *path = SCRIPT_PATH;
-
- if (ipath && ipath[5] != '%')
- path = ipath;
- doputenv(path);
- if (ipath) free((void *)ipath);
- }
-
- for (i = 0; i < numPrefixes; i++) {
- sprintf(prefixBuf, "RPM_INSTALL_PREFIX%d=%s", i, prefixes[i]);
- doputenv(prefixBuf);
-
- /* backwards compatibility */
- if (i == 0) {
- sprintf(prefixBuf, "RPM_INSTALL_PREFIX=%s", prefixes[i]);
- doputenv(prefixBuf);
- }
- }
-
- rootDir = ts->rootDir;
- switch(urlIsURL(rootDir)) {
- case URL_IS_PATH:
- rootDir += sizeof("file://") - 1;
- rootDir = strchr(rootDir, '/');
- /*@fallthrough@*/
- case URL_IS_UNKNOWN:
- if (!ts->chrootDone && !(rootDir[0] == '/' && rootDir[1] == '\0')) {
- /*@-unrecog@*/ chroot(rootDir); /*@=unrecog@*/
- }
- chdir("/");
- execv(argv[0], (char *const *)argv);
- break;
- default:
- break;
- }
-
- _exit(-1);
- /*@notreached@*/
- }
-
- (void)waitpid(child, &status, 0);
-
- if (freePrefixes) free(prefixes);
-
- Fclose(out); /* XXX dup'd STDOUT_FILENO */
-
- if (script) {
- if (!rpmIsDebug()) unlink(fn);
- free((void *)fn);
- }
-
- if (!WIFEXITED(status) || WEXITSTATUS(status)) {
- const char *n, *v, *r;
- headerNVR(h, &n, &v, &r);
- rpmError(RPMERR_SCRIPT,
- _("execution of %s scriptlet from %s-%s-%s failed, exit status %d\n"),
- sln, n, v, r, WEXITSTATUS(status));
- return 1;
- }
-
- return 0;
-}
-
-int runInstScript(const rpmTransactionSet ts, Header h,
- int scriptTag, int progTag, int arg, int norunScripts)
-{
- void ** programArgv;
- int programArgc;
- const char ** argv;
- int programType;
- char * script;
- int rc;
-
- if (norunScripts) return 0;
-
- /* headerGetEntry() sets the data pointer to NULL if the entry does
- not exist */
- headerGetEntry(h, progTag, &programType, (void **) &programArgv,
- &programArgc);
- headerGetEntry(h, scriptTag, NULL, (void **) &script, NULL);
-
- if (programArgv && programType == RPM_STRING_TYPE) {
- argv = alloca(sizeof(char *));
- *argv = (const char *) programArgv;
- } else {
- argv = (const char **) programArgv;
- }
-
- rc = runScript(ts, h, tag2sln(scriptTag), programArgc, argv, script,
- arg, -1);
- headerFreeData(programArgv, programType);
- return rc;
-}
-
-/**
- * @param ts transaction set
- * @param sense
- * @param sourceH
- * @param triggeredH
- * @param arg1correction
- * @param arg2
- * @param triggersAlreadyRun
- * @return
- */
-static int handleOneTrigger(const rpmTransactionSet ts, int sense,
- Header sourceH, Header triggeredH,
- int arg1correction, int arg2,
- char * triggersAlreadyRun)
-{
- const char ** triggerNames;
- const char ** triggerEVR;
- const char ** triggerScripts;
- const char ** triggerProgs;
- int_32 * triggerFlags;
- int_32 * triggerIndices;
- const char * triggerPackageName;
- const char * sourceName;
- int numTriggers;
- int rc = 0;
- int i;
- int skip;
-
- if (!headerGetEntry(triggeredH, RPMTAG_TRIGGERNAME, NULL,
- (void **) &triggerNames, &numTriggers)) {
- return 0;
- }
-
- headerNVR(sourceH, &sourceName, NULL, NULL);
-
- headerGetEntry(triggeredH, RPMTAG_TRIGGERFLAGS, NULL,
- (void **) &triggerFlags, NULL);
- headerGetEntry(triggeredH, RPMTAG_TRIGGERVERSION, NULL,
- (void **) &triggerEVR, NULL);
-
- for (i = 0; i < numTriggers; i++) {
-
- if (!(triggerFlags[i] & sense)) continue;
- if (strcmp(triggerNames[i], sourceName)) continue;
-
- /* For some reason, the TRIGGERVERSION stuff includes the name of the package which the trigger is based on. We need to skip
- over that here. I suspect that we'll change our minds on this
- and remove that, so I'm going to just 'do the right thing'. */
- skip = strlen(triggerNames[i]);
- if (!strncmp(triggerEVR[i], triggerNames[i], skip) &&
- (triggerEVR[i][skip] == '-'))
- skip++;
- else
- skip = 0;
-
- if (!headerMatchesDepFlags(sourceH, triggerNames[i],
- triggerEVR[i] + skip, triggerFlags[i]))
- continue;
-
- headerGetEntry(triggeredH, RPMTAG_TRIGGERINDEX, NULL,
- (void **) &triggerIndices, NULL);
- headerGetEntry(triggeredH, RPMTAG_TRIGGERSCRIPTS, NULL,
- (void **) &triggerScripts, NULL);
- headerGetEntry(triggeredH, RPMTAG_TRIGGERSCRIPTPROG, NULL,
- (void **) &triggerProgs, NULL);
-
- headerNVR(triggeredH, &triggerPackageName, NULL, NULL);
-
- { int arg1;
- int index;
-
- if ((arg1 = rpmdbCountPackages(ts->rpmdb, triggerPackageName)) < 0) {
- rc = 1; /* XXX W2DO? same as "execution of script failed" */
- } else {
- arg1 += arg1correction;
- index = triggerIndices[i];
- if (!triggersAlreadyRun || !triggersAlreadyRun[index]) {
- rc = runScript(ts, triggeredH, "%trigger", 1,
- triggerProgs + index, triggerScripts[index],
- arg1, arg2);
- if (triggersAlreadyRun) triggersAlreadyRun[index] = 1;
- }
- }
- }
-
- free(triggerScripts);
- free(triggerProgs);
-
- /* each target/source header pair can only result in a single
- script being run */
- break;
- }
-
- free(triggerNames);
-
- return rc;
-}
-
-int runTriggers(const rpmTransactionSet ts, int sense, Header h,
- int countCorrection)
-{
- const char * name;
- int numPackage;
- int rc = 0;
-
- headerNVR(h, &name, NULL, NULL);
-
- numPackage = rpmdbCountPackages(ts->rpmdb, name) + countCorrection;
- if (numPackage < 0)
- return 1;
-
- { Header triggeredH;
- rpmdbMatchIterator mi;
-
- mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_TRIGGERNAME, name, 0);
- while((triggeredH = rpmdbNextIterator(mi)) != NULL) {
- rc |= handleOneTrigger(ts, sense, h, triggeredH, 0, numPackage,
- NULL);
- }
-
- rpmdbFreeIterator(mi);
- }
-
- return rc;
-}
-
-int runImmedTriggers(const rpmTransactionSet ts, int sense, Header h,
- int countCorrection)
-{
- const char ** triggerNames;
- int numTriggers;
- int_32 * triggerIndices;
- int numTriggerIndices;
- char * triggersRun;
- int rc = 0;
-
- if (!headerGetEntry(h, RPMTAG_TRIGGERNAME, NULL, (void **) &triggerNames,
- &numTriggers))
- return 0;
- headerGetEntry(h, RPMTAG_TRIGGERINDEX, NULL, (void **) &triggerIndices,
- &numTriggerIndices);
- triggersRun = alloca(sizeof(*triggersRun) * numTriggerIndices);
- memset(triggersRun, 0, sizeof(*triggersRun) * numTriggerIndices);
-
- { Header sourceH = NULL;
- int i;
-
- for (i = 0; i < numTriggers; i++) {
- rpmdbMatchIterator mi;
- const char * name = triggerNames[i];
-
- if (triggersRun[triggerIndices[i]]) continue;
-
- mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, name, 0);
-
- while((sourceH = rpmdbNextIterator(mi)) != NULL) {
- rc |= handleOneTrigger(ts, sense, sourceH, h,
- countCorrection, rpmdbGetIteratorCount(mi),
- triggersRun);
- }
-
- rpmdbFreeIterator(mi);
- }
- }
- return rc;
-}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index be5c3551b..e33952ea2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -49,14 +49,19 @@ lib/rpmdb.c
lib/rpminstall.c
lib/rpmlead.c
lib/rpmrc.c
+lib/scriptlet.c
lib/signature.c
lib/stringbuf.c
lib/transaction.c
lib/uninstall.c
lib/verify.c
-rpmio/rpmio.c
+rpmio/base64.c
+rpmio/digest.c
rpmio/macro.c
+rpmio/rpmio.c
+rpmio/rpmio_api.c
rpmio/rpmlog.c
rpmio/rpmmalloc.c
+rpmio/rpmrpc.c
rpmio/ugid.c
rpmio/url.c
diff --git a/po/rpm.pot b/po/rpm.pot
index bd84e75ae..31e80a8f4 100644
--- a/po/rpm.pot
+++ b/po/rpm.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-19 14:27-0500\n"
+"POT-Creation-Date: 2001-01-21 10:28-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -28,1059 +28,1058 @@ msgstr ""
msgid "Unable to open spec file %s: %s\n"
msgstr ""
-#: build.c:130 build.c:142
+#: build.c:132 build.c:144
#, c-format
msgid "Failed to open tar pipe: %m\n"
msgstr ""
#. Give up
-#: build.c:149
+#: build.c:151
#, c-format
msgid "Failed to read spec file from %s\n"
msgstr ""
-#: build.c:177
+#: build.c:179
#, c-format
msgid "Failed to rename %s to %s: %m\n"
msgstr ""
-#: build.c:216
+#: build.c:218
#, c-format
msgid "failed to stat %s: %m\n"
msgstr ""
-#: build.c:221
+#: build.c:223
#, c-format
msgid "File %s is not a regular file.\n"
msgstr ""
-#: build.c:230
+#: build.c:232
#, c-format
msgid "File %s does not appear to be a specfile.\n"
msgstr ""
#. parse up the build operators
-#: build.c:287
+#: build.c:289
#, c-format
msgid "Building target platforms: %s\n"
msgstr ""
-#: build.c:302
+#: build.c:304
#, c-format
msgid "Building for target %s\n"
msgstr ""
-#: rpm.c:185 rpmqv.c:386
+#: rpm.c:189 rpmqv.c:357
#, c-format
msgid "rpm: %s\n"
msgstr ""
-#: rpm.c:196 rpmqv.c:397
+#: rpm.c:200 rpmqv.c:362
#, c-format
msgid "RPM version %s\n"
msgstr ""
-#: rpm.c:200 rpmqv.c:401
+#: rpm.c:204 rpmqv.c:366
msgid "Copyright (C) 1998-2000 - Red Hat, Inc."
msgstr ""
-#: rpm.c:201 rpmqv.c:402
+#: rpm.c:205 rpmqv.c:367
msgid "This program may be freely redistributed under the terms of the GNU GPL"
msgstr ""
-#: rpm.c:209
+#: rpm.c:213
msgid "Usage: rpm {--help}"
msgstr ""
-#: rpm.c:210
+#: rpm.c:214
msgid " rpm {--version}"
msgstr ""
-#: rpm.c:211
+#: rpm.c:215
msgid " rpm {--initdb} [--dbpath <dir>]"
msgstr ""
-#: rpm.c:212
+#: rpm.c:216
msgid ""
" rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]"
msgstr ""
-#: rpm.c:213 rpmqv.c:423
+#: rpm.c:217
msgid " [--replacepkgs] [--replacefiles] [--root <dir>]"
msgstr ""
-#: rpm.c:214 rpmqv.c:424
+#: rpm.c:218
msgid " [--excludedocs] [--includedocs] [--noscripts]"
msgstr ""
-#: rpm.c:215
+#: rpm.c:219
msgid ""
" [--rcfile <file>] [--ignorearch] [--dbpath <dir>]"
msgstr ""
-#: rpm.c:216 rpmqv.c:426
+#: rpm.c:220
msgid ""
" [--prefix <dir>] [--ignoreos] [--nodeps] [--allfiles]"
msgstr ""
-#: rpm.c:217 rpm.c:226 rpm.c:236 rpmqv.c:427 rpmqv.c:436 rpmqv.c:452
+#: rpm.c:221 rpm.c:230 rpm.c:240
msgid " [--ftpproxy <host>] [--ftpport <port>]"
msgstr ""
-#: rpm.c:218 rpm.c:237 rpmqv.c:428 rpmqv.c:437 rpmqv.c:453
+#: rpm.c:222 rpm.c:241
msgid " [--httpproxy <host>] [--httpport <port>]"
msgstr ""
-#: rpm.c:219 rpmqv.c:429
+#: rpm.c:223
msgid ""
" [--justdb] [--noorder] [--relocate oldpath=newpath]"
msgstr ""
-#: rpm.c:220 rpmqv.c:430
+#: rpm.c:224
msgid ""
" [--badreloc] [--notriggers] [--excludepath <path>]"
msgstr ""
-#: rpm.c:221 rpmqv.c:431
+#: rpm.c:225
msgid " [--ignoresize] file1.rpm ... fileN.rpm"
msgstr ""
-#: rpm.c:222
+#: rpm.c:226
msgid ""
" rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]"
msgstr ""
-#: rpm.c:223 rpmqv.c:433
+#: rpm.c:227
msgid " [--oldpackage] [--root <dir>] [--noscripts]"
msgstr ""
-#: rpm.c:224
+#: rpm.c:228
msgid ""
" [--excludedocs] [--includedocs] [--rcfile <file>]"
msgstr ""
-#: rpm.c:225 rpmqv.c:435
+#: rpm.c:229
msgid ""
" [--ignorearch] [--dbpath <dir>] [--prefix <dir>] "
msgstr ""
-#: rpm.c:227
+#: rpm.c:231
msgid " [--httpproxy <host>] [--httpport <port>] "
msgstr ""
-#: rpm.c:228 rpmqv.c:438
+#: rpm.c:232
msgid " [--ignoreos] [--nodeps] [--allfiles] [--justdb]"
msgstr ""
-#: rpm.c:229 rpmqv.c:439
+#: rpm.c:233
msgid " [--noorder] [--relocate oldpath=newpath]"
msgstr ""
-#: rpm.c:230 rpmqv.c:440
+#: rpm.c:234
msgid ""
" [--badreloc] [--excludepath <path>] [--ignoresize]"
msgstr ""
-#: rpm.c:231 rpmqv.c:441
+#: rpm.c:235
msgid " file1.rpm ... fileN.rpm"
msgstr ""
-#: rpm.c:232
+#: rpm.c:236
msgid " rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]"
msgstr ""
-#: rpm.c:233
+#: rpm.c:237
msgid " [--scripts] [--root <dir>] [--rcfile <file>]"
msgstr ""
-#: rpm.c:234 rpmqv.c:450
+#: rpm.c:238
msgid " [--whatprovides] [--whatrequires] [--requires]"
msgstr ""
-#: rpm.c:235 rpmqv.c:451
+#: rpm.c:239
msgid " [--triggeredby]"
msgstr ""
-#: rpm.c:238 rpmqv.c:454
+#: rpm.c:242
msgid " [--provides] [--triggers] [--dump]"
msgstr ""
-#: rpm.c:239 rpmqv.c:455
+#: rpm.c:243
msgid " [--changelog] [--dbpath <dir>] [targets]"
msgstr ""
-#: rpm.c:240
+#: rpm.c:244
msgid " rpm {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file>]"
msgstr ""
-#: rpm.c:241 rpmqv.c:457
+#: rpm.c:245
msgid ""
" [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]"
msgstr ""
-#: rpm.c:242 rpmqv.c:458
+#: rpm.c:246
msgid " [--nomd5] [targets]"
msgstr ""
-#: rpm.c:243
+#: rpm.c:247
msgid " rpm {--setperms} [-afpg] [target]"
msgstr ""
-#: rpm.c:244
+#: rpm.c:248
msgid " rpm {--setugids} [-afpg] [target]"
msgstr ""
-#: rpm.c:245
+#: rpm.c:249
msgid " rpm {--freshen -F} file1.rpm ... fileN.rpm"
msgstr ""
-#: rpm.c:246
+#: rpm.c:250
msgid " rpm {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file>]"
msgstr ""
-#: rpm.c:247 rpmqv.c:443
+#: rpm.c:251
msgid " [--dbpath <dir>] [--nodeps] [--allmatches]"
msgstr ""
-#: rpm.c:248 rpmqv.c:444
+#: rpm.c:252
msgid " [--justdb] [--notriggers] package1 ... packageN"
msgstr ""
-#: rpm.c:249
+#: rpm.c:253
msgid " rpm {--resign} [--rcfile <file>] package1 package2 ... packageN"
msgstr ""
-#: rpm.c:250
+#: rpm.c:254
msgid " rpm {--addsign} [--rcfile <file>] package1 package2 ... packageN"
msgstr ""
-#: rpm.c:251
+#: rpm.c:255
msgid ""
" rpm {--checksig -K} [--nopgp] [--nogpg] [--nomd5] [--rcfile <file>]"
msgstr ""
-#: rpm.c:252 rpmqv.c:468
+#: rpm.c:256
msgid " package1 ... packageN"
msgstr ""
-#: rpm.c:253
+#: rpm.c:257
msgid " rpm {--rebuilddb} [--rcfile <file>] [--dbpath <dir>]"
msgstr ""
-#: rpm.c:254
+#: rpm.c:258
msgid " rpm {--querytags}"
msgstr ""
-#: rpm.c:288 rpmqv.c:504
+#: rpm.c:292 rpmqv.c:442
msgid "Usage:"
msgstr ""
-#: rpm.c:290 rpmqv.c:506
+#: rpm.c:294 rpmqv.c:444
msgid "print this message"
msgstr ""
-#: rpm.c:292 rpmqv.c:149 rpmqv.c:508
+#: rpm.c:296 rpmqv.c:129 rpmqv.c:446
msgid "print the version of rpm being used"
msgstr ""
-#: rpm.c:295
+#: rpm.c:299
msgid " All modes support the following arguments:"
msgstr ""
-#: rpm.c:296
+#: rpm.c:300
msgid " --define '<name> <body>'"
msgstr ""
-#: rpm.c:297 rpmqv.c:156 rpmqv.c:513
+#: rpm.c:301 rpmqv.c:136 rpmqv.c:451
msgid "define macro <name> with value <body>"
msgstr ""
-#: rpm.c:298
+#: rpm.c:302
msgid " --eval '<name>+' "
msgstr ""
-#: rpm.c:299
+#: rpm.c:303
msgid "print the expansion of macro <name> to stdout"
msgstr ""
-#: rpm.c:300
+#: rpm.c:304
msgid " --pipe <cmd> "
msgstr ""
-#: rpm.c:301 rpmqv.c:162 rpmqv.c:517
+#: rpm.c:305 rpmqv.c:142 rpmqv.c:455
msgid "send stdout to <cmd>"
msgstr ""
-#: rpm.c:302
+#: rpm.c:306
msgid " --rcfile <file> "
msgstr ""
-#: rpm.c:303
+#: rpm.c:307
msgid "use <file> instead of /etc/rpmrc and $HOME/.rpmrc"
msgstr ""
-#: rpm.c:305 rpmqv.c:180 rpmqv.c:521
+#: rpm.c:309 rpmqv.c:160 rpmqv.c:459
msgid "display final rpmrc and macro configuration"
msgstr ""
-#: rpm.c:307 rpmqv.c:529
+#: rpm.c:311 rpmqv.c:467
msgid "be a little more verbose"
msgstr ""
-#: rpm.c:309 rpmqv.c:531
+#: rpm.c:313 rpmqv.c:469
msgid "be incredibly verbose (for debugging)"
msgstr ""
-#: rpm.c:312
+#: rpm.c:316
msgid " Install, upgrade and query (with -p) allow URL's to be used in place"
msgstr ""
-#: rpm.c:313
+#: rpm.c:317
msgid " of file names as well as the following options:"
msgstr ""
-#: rpm.c:314
+#: rpm.c:318
msgid " --ftpproxy <host> "
msgstr ""
-#: rpm.c:315 rpmqv.c:538
+#: rpm.c:319 rpmqv.c:476
msgid "hostname or IP of ftp proxy"
msgstr ""
-#: rpm.c:316
+#: rpm.c:320
msgid " --ftpport <port> "
msgstr ""
-#: rpm.c:317 rpmqv.c:540
+#: rpm.c:321 rpmqv.c:478
msgid "port number of ftp server (or proxy)"
msgstr ""
-#: rpm.c:318
+#: rpm.c:322
msgid " --httpproxy <host> "
msgstr ""
-#: rpm.c:319 rpmqv.c:542
+#: rpm.c:323 rpmqv.c:480
msgid "hostname or IP of http proxy"
msgstr ""
-#: rpm.c:320
+#: rpm.c:324
msgid " --httpport <port> "
msgstr ""
-#: rpm.c:321 rpmqv.c:544
+#: rpm.c:325 rpmqv.c:482
msgid "port number of http server (or proxy)"
msgstr ""
-#: rpm.c:325 rpmqv.c:564
+#: rpm.c:329 rpmqv.c:502
msgid "query mode"
msgstr ""
-#: rpm.c:326 rpm.c:372 rpm.c:397 rpm.c:449 rpm.c:523
+#: rpm.c:330 rpm.c:376 rpm.c:401 rpm.c:453 rpm.c:527
msgid " --dbpath <dir> "
msgstr ""
-#: rpm.c:327 rpm.c:373 rpm.c:398 rpm.c:450 rpm.c:524 rpmqv.c:524
+#: rpm.c:331 rpm.c:377 rpm.c:402 rpm.c:454 rpm.c:528 rpmqv.c:462
msgid "use <dir> as the directory for the database"
msgstr ""
-#: rpm.c:328
+#: rpm.c:332
msgid " --queryformat <qfmt>"
msgstr ""
-#: rpm.c:329 rpmqv.c:566
+#: rpm.c:333 rpmqv.c:504
msgid "use <qfmt> as the header format (implies --info)"
msgstr ""
-#: rpm.c:330 rpm.c:374 rpm.c:432 rpm.c:461
+#: rpm.c:334 rpm.c:378 rpm.c:436 rpm.c:465
msgid " --root <dir> "
msgstr ""
-#: rpm.c:331 rpm.c:375 rpm.c:433 rpm.c:462 rpm.c:526 rpmqv.c:165 rpmqv.c:526
+#: rpm.c:335 rpm.c:379 rpm.c:437 rpm.c:466 rpm.c:530 rpmqv.c:145 rpmqv.c:464
msgid "use <dir> as the top level directory"
msgstr ""
-#: rpm.c:332
+#: rpm.c:336
msgid " Package specification options:"
msgstr ""
-#: rpm.c:334
+#: rpm.c:338
msgid "query all packages"
msgstr ""
-#: rpm.c:335
+#: rpm.c:339
msgid " -f <file>+ "
msgstr ""
-#: rpm.c:336
+#: rpm.c:340
msgid "query package owning <file>"
msgstr ""
-#: rpm.c:337
+#: rpm.c:341
msgid " -p <packagefile>+ "
msgstr ""
-#: rpm.c:338
+#: rpm.c:342
msgid "query (uninstalled) package <packagefile>"
msgstr ""
-#: rpm.c:339
+#: rpm.c:343
msgid " --triggeredby <pkg>"
msgstr ""
-#: rpm.c:340
+#: rpm.c:344
msgid "query packages triggered by <pkg>"
msgstr ""
-#: rpm.c:341
+#: rpm.c:345
msgid " --whatprovides <cap>"
msgstr ""
-#: rpm.c:342
+#: rpm.c:346
msgid "query packages which provide <cap> capability"
msgstr ""
-#: rpm.c:343
+#: rpm.c:347
msgid " --whatrequires <cap>"
msgstr ""
-#: rpm.c:344
+#: rpm.c:348
msgid "query packages which require <cap> capability"
msgstr ""
-#: rpm.c:345
+#: rpm.c:349
msgid " Information selection options:"
msgstr ""
-#: rpm.c:347 rpmqv.c:570
+#: rpm.c:351 rpmqv.c:508
msgid "display package information"
msgstr ""
-#: rpm.c:349 rpmqv.c:572
+#: rpm.c:353 rpmqv.c:510
msgid "display the package's change log"
msgstr ""
-#: rpm.c:351 rpmqv.c:574
+#: rpm.c:355 rpmqv.c:512
msgid "display package file list"
msgstr ""
-#: rpm.c:353 rpmqv.c:576
+#: rpm.c:357 rpmqv.c:514
msgid "show file states (implies -l)"
msgstr ""
-#: rpm.c:355 rpmqv.c:578
+#: rpm.c:359 rpmqv.c:516
msgid "list only documentation files (implies -l)"
msgstr ""
-#: rpm.c:357 rpmqv.c:580
+#: rpm.c:361 rpmqv.c:518
msgid "list only configuration files (implies -l)"
msgstr ""
-#: rpm.c:359 rpmqv.c:582
+#: rpm.c:363 rpmqv.c:520
msgid ""
"show all verifiable information for each file (must be used with -l, -c, or "
"-d)"
msgstr ""
-#: rpm.c:361
+#: rpm.c:365
msgid "list capabilities package provides"
msgstr ""
-#: rpm.c:363
+#: rpm.c:367
msgid "list package dependencies"
msgstr ""
-#: rpm.c:365
+#: rpm.c:369
msgid "print the various [un]install scripts"
msgstr ""
-#: rpm.c:367
+#: rpm.c:371
msgid "show the trigger scripts contained in the package"
msgstr ""
-#: rpm.c:371 rpmqv.c:593
+#: rpm.c:375 rpmqv.c:531
msgid ""
"verify a package installation using the same same package specification "
"options as -q"
msgstr ""
-#: lib/poptBT.c:180 lib/verify.c:56 rpm.c:377 rpm.c:419 rpm.c:454 rpmqv.c:291
-#: rpmqv.c:595 rpmqv.c:643 rpmqv.c:677
+#: lib/poptBT.c:180 lib/verify.c:56 rpm.c:381 rpm.c:423 rpm.c:458 rpmqv.c:263
+#: rpmqv.c:533 rpmqv.c:581 rpmqv.c:615
msgid "do not verify package dependencies"
msgstr ""
-#: lib/verify.c:62 rpm.c:379 rpmqv.c:236 rpmqv.c:599
+#: lib/verify.c:62 rpm.c:383 rpmqv.c:209 rpmqv.c:537
msgid "do not verify file md5 checksums"
msgstr ""
-#: rpm.c:381 rpmqv.c:597
+#: rpm.c:385 rpmqv.c:535
msgid "do not verify file attributes"
msgstr ""
-#: rpm.c:383 rpmqv.c:604
+#: rpm.c:387 rpmqv.c:542
msgid "list the tags that can be used in a query format"
msgstr ""
-#: rpm.c:386
+#: rpm.c:390
msgid " --install <packagefile>"
msgstr ""
-#: rpm.c:387
+#: rpm.c:391
msgid " -i <packagefile> "
msgstr ""
-#: rpm.c:388 rpmqv.c:285 rpmqv.c:618
+#: rpm.c:392 rpmqv.c:259 rpmqv.c:556
msgid "install package"
msgstr ""
-#: rpm.c:389
+#: rpm.c:393
msgid " --excludepath <path>"
msgstr ""
-#: rpm.c:390
+#: rpm.c:394
msgid "skip files in path <path>"
msgstr ""
-#: rpm.c:391
+#: rpm.c:395
msgid " --relocate <oldpath>=<newpath>"
msgstr ""
-#: rpm.c:392 rpmqv.c:312 rpmqv.c:655
+#: rpm.c:396 rpmqv.c:593
msgid "relocate files from <oldpath> to <newpath>"
msgstr ""
-#: rpm.c:394 rpmqv.c:252 rpmqv.c:623
+#: rpm.c:398 rpmqv.c:231 rpmqv.c:561
msgid "relocate files in non-relocateable package"
msgstr ""
-#: rpm.c:395
+#: rpm.c:399
msgid " --prefix <dir> "
msgstr ""
-#: rpm.c:396 rpmqv.c:309 rpmqv.c:653
+#: rpm.c:400 rpmqv.c:277 rpmqv.c:591
msgid "relocate the package to <dir>, if relocatable"
msgstr ""
-#: rpm.c:400 rpmqv.c:258 rpmqv.c:625
+#: rpm.c:404 rpmqv.c:237 rpmqv.c:563
msgid "do not install documentation"
msgstr ""
-#: rpm.c:402 rpmqv.c:264 rpmqv.c:629
+#: rpm.c:406 rpmqv.c:242 rpmqv.c:567
msgid "short hand for --replacepkgs --replacefiles"
msgstr ""
-#: rpm.c:404 rpmqv.c:270 rpmqv.c:631
+#: rpm.c:408 rpmqv.c:248 rpmqv.c:569
msgid "print hash marks as package installs (good with -v)"
msgstr ""
-#: rpm.c:406 rpmqv.c:246 rpmqv.c:620
+#: rpm.c:410 rpmqv.c:225 rpmqv.c:558
msgid "install all files, even configurations which might otherwise be skipped"
msgstr ""
-#: rpm.c:409 rpmqv.c:273 rpmqv.c:633
+#: rpm.c:413 rpmqv.c:250 rpmqv.c:571
msgid "don't verify package architecture"
msgstr ""
-#: rpm.c:411 rpmqv.c:279 rpmqv.c:635
+#: rpm.c:415 rpmqv.c:255 rpmqv.c:573
msgid "don't check disk space before installing"
msgstr ""
-#: rpm.c:413 rpmqv.c:276 rpmqv.c:637
+#: rpm.c:417 rpmqv.c:252 rpmqv.c:575
msgid "don't verify package operating system"
msgstr ""
-#: rpm.c:415 rpmqv.c:282 rpmqv.c:639
+#: rpm.c:419 rpmqv.c:257 rpmqv.c:577
msgid "install documentation"
msgstr ""
-#: rpm.c:417 rpm.c:452 rpmqv.c:288 rpmqv.c:641 rpmqv.c:675
+#: rpm.c:421 rpm.c:456 rpmqv.c:261 rpmqv.c:579 rpmqv.c:613
msgid "update the database, but do not modify the filesystem"
msgstr ""
-#: rpm.c:421 rpm.c:456 rpmqv.c:294 rpmqv.c:645 rpmqv.c:679
+#: rpm.c:425 rpm.c:460 rpmqv.c:265 rpmqv.c:583 rpmqv.c:617
msgid "do not reorder package installation to satisfy dependencies"
msgstr ""
-#: rpm.c:423
+#: rpm.c:427
msgid "don't execute any installation scripts"
msgstr ""
-#: rpm.c:425 rpm.c:460 rpmqv.c:683
+#: rpm.c:429 rpm.c:464 rpmqv.c:621
msgid "don't execute any scripts triggered by this package"
msgstr ""
-#: rpm.c:427 rpmqv.c:306 rpmqv.c:651
+#: rpm.c:431 rpmqv.c:275 rpmqv.c:589
msgid "print percentages as package installs"
msgstr ""
-#: rpm.c:429 rpmqv.c:315 rpmqv.c:657
+#: rpm.c:433 rpmqv.c:286 rpmqv.c:595
msgid "install even if the package replaces installed files"
msgstr ""
-#: rpm.c:431 rpmqv.c:318 rpmqv.c:659
+#: rpm.c:435 rpmqv.c:288 rpmqv.c:597
msgid "reinstall if the package is already present"
msgstr ""
-#: rpm.c:435 rpmqv.c:321 rpmqv.c:661
+#: rpm.c:439 rpmqv.c:290 rpmqv.c:599
msgid "don't install, but tell if it would work or not"
msgstr ""
-#: rpm.c:438
+#: rpm.c:442
msgid " --upgrade <packagefile>"
msgstr ""
-#: rpm.c:439
+#: rpm.c:443
msgid " -U <packagefile> "
msgstr ""
-#: rpm.c:440 rpmqv.c:665
+#: rpm.c:444 rpmqv.c:603
msgid "upgrade package (same options as --install, plus)"
msgstr ""
-#: rpm.c:442 rpmqv.c:303 rpmqv.c:667
+#: rpm.c:446 rpmqv.c:272 rpmqv.c:605
msgid ""
"upgrade to an old version of the package (--force on upgrades does this "
"automatically)"
msgstr ""
-#: rpm.c:444
+#: rpm.c:448
msgid " --erase <package>"
msgstr ""
-#: rpm.c:446 rpmqv.c:255 rpmqv.c:671
+#: rpm.c:450 rpmqv.c:235 rpmqv.c:609
msgid "erase (uninstall) package"
msgstr ""
-#: rpm.c:448 rpmqv.c:249 rpmqv.c:673
+#: rpm.c:452 rpmqv.c:228 rpmqv.c:611
msgid ""
"remove all packages which match <package> (normally an error is generated if "
"<package> specified multiple packages)"
msgstr ""
-#: rpm.c:458 rpmqv.c:681
+#: rpm.c:462 rpmqv.c:619
msgid "do not execute any package specific scripts"
msgstr ""
-#: rpm.c:464
+#: rpm.c:468
msgid " -b<stage> <spec> "
msgstr ""
-#: rpm.c:465
+#: rpm.c:469
msgid " -t<stage> <tarball> "
msgstr ""
-#: rpm.c:466
+#: rpm.c:470
msgid "build package, where <stage> is one of:"
msgstr ""
-#: rpm.c:468
+#: rpm.c:472
msgid "prep (unpack sources and apply patches)"
msgstr ""
-#: rpm.c:470
+#: rpm.c:474
#, c-format
msgid "list check (do some cursory checks on %files)"
msgstr ""
-#: rpm.c:472
+#: rpm.c:476
msgid "compile (prep and compile)"
msgstr ""
-#: rpm.c:474
+#: rpm.c:478
msgid "install (prep, compile, install)"
msgstr ""
-#: rpm.c:476
+#: rpm.c:480
msgid "binary package (prep, compile, install, package)"
msgstr ""
-#: rpm.c:478
+#: rpm.c:482
msgid "bin/src package (prep, compile, install, package)"
msgstr ""
-#: lib/poptBT.c:191 rpm.c:480
+#: lib/poptBT.c:191 rpm.c:484
msgid "skip straight to specified stage (only for c,i)"
msgstr ""
-#: lib/poptBT.c:172 rpm.c:482
+#: lib/poptBT.c:172 rpm.c:486
msgid "remove build tree when done"
msgstr ""
-#: lib/poptBT.c:187 rpm.c:484
+#: lib/poptBT.c:187 rpm.c:488
msgid "remove sources when done"
msgstr ""
-#: rpm.c:486
+#: rpm.c:490
msgid "remove spec file when done"
msgstr ""
-#: lib/poptBT.c:193 rpm.c:488 rpmqv.c:224
+#: lib/poptBT.c:193 rpm.c:492 rpmqv.c:201
msgid "generate PGP/GPG signature"
msgstr ""
-#: rpm.c:489
+#: rpm.c:493
msgid " --buildroot <dir> "
msgstr ""
-#: rpm.c:490
+#: rpm.c:494
msgid "use <dir> as the build root"
msgstr ""
-#: rpm.c:491
+#: rpm.c:495
msgid " --target=<platform>+"
msgstr ""
-#: rpm.c:492
+#: rpm.c:496
msgid "build the packages for the build targets platform1...platformN."
msgstr ""
-#: rpm.c:494
+#: rpm.c:498
msgid "do not execute any stages"
msgstr ""
-#: rpm.c:495
+#: rpm.c:499
msgid " --timecheck <secs> "
msgstr ""
-#: rpm.c:496
+#: rpm.c:500
msgid "set the time check to <secs> seconds (0 disables)"
msgstr ""
-#: rpm.c:498
+#: rpm.c:502
msgid " --rebuild <src_pkg> "
msgstr ""
-#: rpm.c:499
+#: rpm.c:503
msgid ""
"install source package, build binary package and remove spec file, sources, "
"patches, and icons."
msgstr ""
-#: rpm.c:500
+#: rpm.c:504
msgid " --recompile <src_pkg> "
msgstr ""
-#: rpm.c:501
+#: rpm.c:505
msgid "like --rebuild, but don't build any package"
msgstr ""
-#: rpm.c:504
+#: rpm.c:508
msgid " --resign <pkg>+ "
msgstr ""
-#: rpm.c:505 rpmqv.c:221 rpmqv.c:689
+#: rpm.c:509 rpmqv.c:199 rpmqv.c:627
msgid "sign a package (discard current signature)"
msgstr ""
-#: rpm.c:506
+#: rpm.c:510
msgid " --addsign <pkg>+ "
msgstr ""
-#: rpm.c:507 rpmqv.c:218 rpmqv.c:691
+#: rpm.c:511 rpmqv.c:197 rpmqv.c:629
msgid "add a signature to a package"
msgstr ""
-#: rpm.c:508
+#: rpm.c:512
msgid " --checksig <pkg>+"
msgstr ""
-#: rpm.c:509
+#: rpm.c:513
msgid " -K <pkg>+ "
msgstr ""
-#: rpm.c:510 rpmqv.c:227 rpmqv.c:695
+#: rpm.c:514 rpmqv.c:203 rpmqv.c:633
msgid "verify package signature"
msgstr ""
-#: rpm.c:512 rpmqv.c:230 rpmqv.c:697
+#: rpm.c:516 rpmqv.c:205 rpmqv.c:635
msgid "skip any PGP signatures"
msgstr ""
-#: rpm.c:514 rpmqv.c:233 rpmqv.c:699
+#: rpm.c:518 rpmqv.c:207 rpmqv.c:637
msgid "skip any GPG signatures"
msgstr ""
-#: rpm.c:516 rpmqv.c:701
+#: rpm.c:520 rpmqv.c:639
msgid "skip any MD5 signatures"
msgstr ""
-#: rpm.c:520
+#: rpm.c:524
msgid "make sure a valid database exists"
msgstr ""
-#: rpm.c:522
+#: rpm.c:526
msgid "rebuild database from existing database"
msgstr ""
-#: rpm.c:530 rpmqv.c:606
+#: rpm.c:534 rpmqv.c:544
msgid ""
"set the file permissions to those in the package database using the same "
"package specification options as -q"
msgstr ""
-#: rpm.c:533 rpmqv.c:609
+#: rpm.c:537 rpmqv.c:547
msgid ""
"set the file owner and group to those in the package database using the same "
"package specification options as -q"
msgstr ""
-#: rpm.c:671 rpm.c:677 rpm.c:686 rpm.c:708 rpm.c:714 rpm.c:721 rpm.c:729
-#: rpm.c:737 rpm.c:758 rpm.c:821 rpmqv.c:889 rpmqv.c:898 rpmqv.c:904
-#: rpmqv.c:910 rpmqv.c:917 rpmqv.c:952 rpmqv.c:960 rpmqv.c:966 rpmqv.c:974
-#: rpmqv.c:1042
+#: rpm.c:677 rpm.c:683 rpm.c:692 rpm.c:714 rpm.c:720 rpm.c:727 rpm.c:735
+#: rpm.c:743 rpm.c:764 rpm.c:827 rpmqv.c:832 rpmqv.c:838 rpmqv.c:845
+#: rpmqv.c:851 rpmqv.c:885 rpmqv.c:893 rpmqv.c:899 rpmqv.c:907 rpmqv.c:974
msgid "only one major mode may be specified"
msgstr ""
-#: rpm.c:679 rpmqv.c:891
+#: rpm.c:685
msgid "-u and --uninstall are deprecated and no longer work.\n"
msgstr ""
-#: rpm.c:681 rpmqv.c:893
+#: rpm.c:687
msgid "Use -e or --erase instead.\n"
msgstr ""
-#: rpm.c:764 rpmqv.c:936
+#: rpm.c:770 rpmqv.c:869
msgid "relocations must begin with a /"
msgstr ""
-#: rpm.c:766 rpmqv.c:938
+#: rpm.c:772 rpmqv.c:871
msgid "relocations must contain a ="
msgstr ""
-#: rpm.c:769 rpmqv.c:941
+#: rpm.c:775 rpmqv.c:874
msgid "relocations must have a / following the ="
msgstr ""
-#: rpm.c:778 rpmqv.c:925
+#: rpm.c:784 rpmqv.c:858
msgid "exclude paths must begin with a /"
msgstr ""
-#: rpm.c:787 rpmqv.c:995
+#: rpm.c:793 rpmqv.c:928
msgid "The --rcfile option has been eliminated.\n"
msgstr ""
-#: rpm.c:788
+#: rpm.c:794
msgid "Use --macros with a colon separated list of macro files to read.\n"
msgstr ""
-#: rpm.c:793 rpmqv.c:1001
+#: rpm.c:799 rpmqv.c:934
#, c-format
msgid "Internal error in argument processing (%d) :-(\n"
msgstr ""
-#: rpm.c:828 rpmqv.c:1057
+#: rpm.c:834 rpmqv.c:989
msgid "one type of query/verify may be performed at a time"
msgstr ""
-#: rpm.c:833 rpmqv.c:1061
+#: rpm.c:839 rpmqv.c:993
msgid "unexpected query flags"
msgstr ""
-#: rpm.c:836 rpmqv.c:1064
+#: rpm.c:842 rpmqv.c:996
msgid "unexpected query format"
msgstr ""
-#: rpm.c:839 rpmqv.c:1067
+#: rpm.c:845 rpmqv.c:999
msgid "unexpected query source"
msgstr ""
-#: rpm.c:842 rpmqv.c:1077
+#: rpm.c:848 rpmqv.c:1009
msgid "only installation, upgrading, rmsource and rmspec may be forced"
msgstr ""
-#: rpm.c:845 rpmqv.c:1082
+#: rpm.c:851 rpmqv.c:1014
msgid "files may only be relocated during package installation"
msgstr ""
-#: rpm.c:848 rpmqv.c:1085
+#: rpm.c:854 rpmqv.c:1017
msgid "only one of --prefix or --relocate may be used"
msgstr ""
-#: rpm.c:851 rpmqv.c:1088
+#: rpm.c:857 rpmqv.c:1020
msgid ""
"--relocate and --excludepath may only be used when installing new packages"
msgstr ""
-#: rpm.c:854 rpmqv.c:1091
+#: rpm.c:860 rpmqv.c:1023
msgid "--prefix may only be used when installing new packages"
msgstr ""
-#: rpm.c:857 rpmqv.c:1094
+#: rpm.c:863 rpmqv.c:1026
msgid "arguments to --prefix must begin with a /"
msgstr ""
-#: rpm.c:860 rpmqv.c:1097
+#: rpm.c:866 rpmqv.c:1029
msgid "--hash (-h) may only be specified during package installation"
msgstr ""
-#: rpm.c:864 rpmqv.c:1101
+#: rpm.c:870 rpmqv.c:1033
msgid "--percent may only be specified during package installation"
msgstr ""
-#: rpm.c:868 rpmqv.c:1105
+#: rpm.c:874 rpmqv.c:1038
msgid "--replacefiles may only be specified during package installation"
msgstr ""
-#: rpm.c:872 rpmqv.c:1109
+#: rpm.c:878 rpmqv.c:1042
msgid "--replacepkgs may only be specified during package installation"
msgstr ""
-#: rpm.c:876 rpmqv.c:1113
+#: rpm.c:882 rpmqv.c:1046
msgid "--excludedocs may only be specified during package installation"
msgstr ""
-#: rpm.c:880 rpmqv.c:1117
+#: rpm.c:886 rpmqv.c:1050
msgid "--includedocs may only be specified during package installation"
msgstr ""
-#: rpm.c:884 rpmqv.c:1121
+#: rpm.c:890 rpmqv.c:1054
msgid "only one of --excludedocs and --includedocs may be specified"
msgstr ""
-#: rpm.c:888 rpmqv.c:1125
+#: rpm.c:894 rpmqv.c:1058
msgid "--ignorearch may only be specified during package installation"
msgstr ""
-#: rpm.c:892 rpmqv.c:1129
+#: rpm.c:898 rpmqv.c:1062
msgid "--ignoreos may only be specified during package installation"
msgstr ""
-#: rpm.c:896 rpmqv.c:1133
+#: rpm.c:902 rpmqv.c:1067
msgid "--ignoresize may only be specified during package installation"
msgstr ""
-#: rpm.c:900 rpmqv.c:1137
+#: rpm.c:906 rpmqv.c:1071
msgid "--allmatches may only be specified during package erasure"
msgstr ""
-#: rpm.c:904 rpmqv.c:1141
+#: rpm.c:910 rpmqv.c:1075
msgid "--allfiles may only be specified during package installation"
msgstr ""
-#: rpm.c:908 rpmqv.c:1145
+#: rpm.c:914 rpmqv.c:1080
msgid "--justdb may only be specified during package installation and erasure"
msgstr ""
-#: rpm.c:913 rpmqv.c:1152
+#: rpm.c:919
msgid ""
"--noscripts may only be specified during package installation, erasure, and "
"verification"
msgstr ""
-#: rpm.c:917
+#: rpm.c:923
msgid ""
"--notriggers may only be specified during package installation, erasure, and "
"verification"
msgstr ""
-#: rpm.c:921 rpmqv.c:1162
+#: rpm.c:927 rpmqv.c:1091
msgid ""
"--nodeps may only be specified during package building, rebuilding, "
"recompilation, installation,erasure, and verification"
msgstr ""
-#: rpm.c:926 rpmqv.c:1167
+#: rpm.c:932 rpmqv.c:1096
msgid ""
"--test may only be specified during package installation, erasure, and "
"building"
msgstr ""
-#: rpm.c:930 rpmqv.c:1172
+#: rpm.c:936 rpmqv.c:1101
msgid ""
"--root (-r) may only be specified during installation, erasure, querying, "
"and database rebuilds"
msgstr ""
-#: rpm.c:942 rpmqv.c:1184
+#: rpm.c:948 rpmqv.c:1113
msgid "arguments to --root (-r) must begin with a /"
msgstr ""
-#: rpm.c:948 rpmqv.c:1191
+#: rpm.c:954
msgid "--oldpackage may only be used during upgrades"
msgstr ""
-#: rpm.c:951 rpmqv.c:1196
+#: rpm.c:957 rpmqv.c:1120
msgid "--nopgp may only be used during signature checking"
msgstr ""
-#: rpm.c:954 rpmqv.c:1199
+#: rpm.c:960 rpmqv.c:1123
msgid "--nogpg may only be used during signature checking"
msgstr ""
-#: rpm.c:957 rpmqv.c:1204
+#: rpm.c:963 rpmqv.c:1128
msgid ""
"--nomd5 may only be used during signature checking and package verification"
msgstr ""
-#: rpm.c:968 rpmqv.c:1220
+#: rpm.c:974 rpmqv.c:1144
msgid "no files to sign\n"
msgstr ""
-#: rpm.c:973 rpmqv.c:1225
+#: rpm.c:979 rpmqv.c:1149
#, c-format
msgid "cannot access file %s\n"
msgstr ""
-#: rpm.c:988 rpmqv.c:1241
+#: rpm.c:994 rpmqv.c:1165
msgid "pgp not found: "
msgstr ""
-#: rpm.c:992 rpmqv.c:1245
+#: rpm.c:998 rpmqv.c:1169
msgid "Enter pass phrase: "
msgstr ""
-#: rpm.c:994 rpmqv.c:1247
+#: rpm.c:1000 rpmqv.c:1171
msgid "Pass phrase check failed\n"
msgstr ""
-#: rpm.c:997 rpmqv.c:1250
+#: rpm.c:1003 rpmqv.c:1174
msgid "Pass phrase is good.\n"
msgstr ""
-#: rpm.c:1002 rpmqv.c:1255
+#: rpm.c:1008 rpmqv.c:1179
msgid "Invalid %%_signature spec in macro file.\n"
msgstr ""
-#: rpm.c:1008 rpmqv.c:1261
+#: rpm.c:1014 rpmqv.c:1185
msgid "--sign may only be used during package building"
msgstr ""
-#: rpm.c:1023 rpmqv.c:1277
+#: rpm.c:1029 rpmqv.c:1201
msgid "exec failed\n"
msgstr ""
-#: rpm.c:1042 rpmqv.c:1547
+#: rpm.c:1048 rpmqv.c:1445
msgid "unexpected arguments to --querytags "
msgstr ""
-#: rpm.c:1053 rpmqv.c:1569
+#: rpm.c:1059 rpmqv.c:1467
msgid "no packages given for signature check"
msgstr ""
-#: rpm.c:1064 rpmqv.c:1580
+#: rpm.c:1070 rpmqv.c:1478
msgid "no packages given for signing"
msgstr ""
-#: rpm.c:1080 rpmqv.c:1417
+#: rpm.c:1086 rpmqv.c:1341
msgid "no packages given for uninstall"
msgstr ""
-#: rpm.c:1131 rpmqv.c:1468
+#: rpm.c:1142 rpmqv.c:1370
msgid "no packages given for install"
msgstr ""
-#: rpm.c:1154 rpmqv.c:1508
+#: rpm.c:1166 rpmqv.c:1411
msgid "extra arguments given for query of all packages"
msgstr ""
-#: rpm.c:1159 rpmqv.c:1513
+#: rpm.c:1171 rpmqv.c:1416
msgid "no arguments given for query"
msgstr ""
-#: rpm.c:1176 rpmqv.c:1535
+#: rpm.c:1188 rpmqv.c:1433
msgid "extra arguments given for verify of all packages"
msgstr ""
-#: rpm.c:1180 rpmqv.c:1539
+#: rpm.c:1192 rpmqv.c:1437
msgid "no arguments given for verify"
msgstr ""
@@ -1102,426 +1101,374 @@ msgstr ""
msgid "cannot re-open payload: %s\n"
msgstr ""
-#: rpmqv.c:152
+#: rpmqv.c:132
msgid "provide less detailed output"
msgstr ""
-#: rpmqv.c:154
+#: rpmqv.c:134
msgid "provide more detailed output"
msgstr ""
-#: rpmqv.c:157
+#: rpmqv.c:137
msgid "'<name> <body>'"
msgstr ""
-#: rpmqv.c:159
+#: rpmqv.c:139
msgid "print macro expansion of <expr>+"
msgstr ""
-#: rpmqv.c:160
+#: rpmqv.c:140
msgid "<expr>+"
msgstr ""
-#: rpmqv.c:163
+#: rpmqv.c:143
msgid "<cmd>"
msgstr ""
-#: rpmqv.c:166 rpmqv.c:310
+#: rpmqv.c:146 rpmqv.c:278
msgid "<dir>"
msgstr ""
-#: rpmqv.c:168
+#: rpmqv.c:148
msgid "read <file:...> instead of default macro file(s)"
msgstr ""
-#: rpmqv.c:169 rpmqv.c:173 rpmqv.c:177
+#: rpmqv.c:149 rpmqv.c:153 rpmqv.c:157
msgid "<file:...>"
msgstr ""
-#: rpmqv.c:172 rpmqv.c:176
+#: rpmqv.c:152 rpmqv.c:156
msgid "read <file:...> instead of default rpmrc file(s)"
msgstr ""
-#: rpmqv.c:185
+#: rpmqv.c:165
msgid "disable use of libio(3) API"
msgstr ""
-#: rpmqv.c:188
+#: rpmqv.c:168
msgid "debug protocol data stream"
msgstr ""
-#: rpmqv.c:190
+#: rpmqv.c:170
msgid "debug rpmio I/O"
msgstr ""
-#: rpmqv.c:192
+#: rpmqv.c:172
msgid "debug URL cache handling"
msgstr ""
-#: rpmqv.c:200
+#: rpmqv.c:180
msgid "initialize database"
msgstr ""
-#: rpmqv.c:202
+#: rpmqv.c:182
msgid "rebuild database inverted lists from installed package headers"
msgstr ""
-#: rpmqv.c:205
+#: rpmqv.c:185
msgid "generate headers compatible with (legacy) rpm[23] packaging"
msgstr ""
-#: lib/poptBT.c:174 rpmqv.c:208
+#: lib/poptBT.c:174 rpmqv.c:188
msgid "generate headers compatible with rpm4 packaging"
msgstr ""
-#: rpmqv.c:256
-msgid "<package>"
+#: rpmqv.c:233
+msgid "save erased package files by renaming into sub-directory"
+msgstr ""
+
+#: rpmqv.c:235
+msgid "<package>+"
msgstr ""
-#: rpmqv.c:261 rpmqv.c:627
+#: rpmqv.c:239 rpmqv.c:565
msgid "skip files with leading component <path> "
msgstr ""
-#: rpmqv.c:267
-msgid "upgrade package if already installed"
+#: rpmqv.c:240
+msgid "<path>"
+msgstr ""
+
+#: rpmqv.c:245
+msgid "upgrade package(s) if already installed"
msgstr ""
-#: rpmqv.c:268 rpmqv.c:286 rpmqv.c:325
+#: rpmqv.c:246 rpmqv.c:259 rpmqv.c:293
msgid "<packagefile>+"
msgstr ""
-#: rpmqv.c:297 rpmqv.c:601
+#: rpmqv.c:268 rpmqv.c:539
msgid "do not execute scripts (if any)"
msgstr ""
-#: rpmqv.c:300 rpmqv.c:649
+#: rpmqv.c:270 rpmqv.c:587
msgid "don't execute any scriptlets triggered by this package"
msgstr ""
-#: rpmqv.c:313
-msgid "<oldpath>=<newpath>"
+#: rpmqv.c:280
+msgid "relocate files from path <old> to <new>"
+msgstr ""
+
+#: rpmqv.c:281
+msgid "<old>=<new>"
+msgstr ""
+
+#: rpmqv.c:283
+msgid "save erased package files by repackaging"
msgstr ""
-#: rpmqv.c:324
-msgid "upgrade package"
+#: rpmqv.c:292
+msgid "upgrade package(s)"
msgstr ""
-#: rpmqv.c:347
+#: rpmqv.c:312
msgid "Query options (with -q or --query):"
msgstr ""
-#: rpmqv.c:350
+#: rpmqv.c:315
msgid "Verify options (with -V or --verify):"
msgstr ""
-#: rpmqv.c:356
+#: rpmqv.c:321
msgid "Signature options:"
msgstr ""
-#: rpmqv.c:362
+#: rpmqv.c:327
msgid "Database options:"
msgstr ""
-#: rpmqv.c:368
+#: rpmqv.c:333
msgid "Build options with [ <specfile> | <tarball> | <source package> ]:"
msgstr ""
-#: rpmqv.c:373
-msgid "Common options for all rpm modes:"
-msgstr ""
-
-#: rpmqv.c:413
-#, c-format
-msgid "Usage: %s {--help}\n"
+#: rpmqv.c:339
+msgid "Install/Upgrade/Erase options:"
msgstr ""
-#: rpmqv.c:417
-#, c-format
-msgid " %s {--initdb} [--dbpath <dir>]\n"
-msgstr ""
-
-#: rpmqv.c:418
-#, c-format
-msgid " %s {--rebuilddb} [--rcfile <file:...>] [--dbpath <dir>]\n"
-msgstr ""
-
-#: rpmqv.c:422
-#, c-format
-msgid ""
-" %s {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]\n"
-msgstr ""
-
-#: rpmqv.c:425
-msgid ""
-" [--rcfile <file:...>] [--ignorearch] [--dbpath <dir>]"
-msgstr ""
-
-#: rpmqv.c:434
-msgid ""
-" [--excludedocs] [--includedocs] [--rcfile <file:...>]"
+#: rpmqv.c:344
+msgid "Common options for all rpm modes:"
msgstr ""
-#: rpmqv.c:442
+#: rpmqv.c:378
#, c-format
-msgid ""
-" %s {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file:...>]\n"
+msgid "Usage: %s {--help}\n"
msgstr ""
#: rpmqv.c:449
-msgid ""
-" [--scripts] [--root <dir>] [--rcfile <file:...>]"
-msgstr ""
-
-#: rpmqv.c:456
-#, c-format
-msgid ""
-" %s {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file:...>]\n"
-msgstr ""
-
-#: rpmqv.c:460
-#, c-format
-msgid " %s {--setperms} [-afpg] [target]\n"
-msgstr ""
-
-#: rpmqv.c:461
-#, c-format
-msgid " %s {--setugids} [-afpg] [target]\n"
-msgstr ""
-
-#: rpmqv.c:465
-#, c-format
-msgid ""
-" %s {--resign} [--rcfile <file:...>] package1 package2 ... packageN\n"
-msgstr ""
-
-#: rpmqv.c:466
-#, c-format
-msgid ""
-" %s {--addsign} [--rcfile <file:...>] package1 package2 ... packageN"
-msgstr ""
-
-#: rpmqv.c:467
-#, c-format
-msgid ""
-" %s {--checksig -K} [--nopgp] [--nogpg] [--nomd5] [--rcfile "
-"<file:...>]\n"
-msgstr ""
-
-#: rpmqv.c:511
msgid " All modes support the following options:"
msgstr ""
-#: rpmqv.c:512
+#: rpmqv.c:450
msgid " --define '<name> <body>'"
msgstr ""
-#: rpmqv.c:514
+#: rpmqv.c:452
msgid " --eval '<expr>+' "
msgstr ""
-#: rpmqv.c:515
+#: rpmqv.c:453
msgid "print the expansion of macro <expr> to stdout"
msgstr ""
-#: rpmqv.c:516
+#: rpmqv.c:454
msgid " --pipe <cmd> "
msgstr ""
-#: rpmqv.c:518
+#: rpmqv.c:456
msgid " --rcfile <file:...> "
msgstr ""
-#: rpmqv.c:519
+#: rpmqv.c:457
msgid "use <file:...> instead of default list of macro files"
msgstr ""
-#: rpmqv.c:523
+#: rpmqv.c:461
msgid " --dbpath <dir> "
msgstr ""
-#: rpmqv.c:525
+#: rpmqv.c:463
msgid " --root <dir> "
msgstr ""
-#: rpmqv.c:535
+#: rpmqv.c:473
msgid ""
" Install, upgrade and query (with -p) modes allow URL's to be used in place"
msgstr ""
-#: rpmqv.c:536
+#: rpmqv.c:474
msgid " of file names as well as the following options:"
msgstr ""
-#: rpmqv.c:537
+#: rpmqv.c:475
msgid " --ftpproxy <host> "
msgstr ""
-#: rpmqv.c:539
+#: rpmqv.c:477
msgid " --ftpport <port> "
msgstr ""
-#: rpmqv.c:541
+#: rpmqv.c:479
msgid " --httpproxy <host> "
msgstr ""
-#: rpmqv.c:543
+#: rpmqv.c:481
msgid " --httpport <port> "
msgstr ""
-#: rpmqv.c:549
+#: rpmqv.c:487
msgid " Package specification options:"
msgstr ""
-#: lib/poptQV.c:68 rpmqv.c:551
+#: lib/poptQV.c:68 rpmqv.c:489
msgid "query/verify all packages"
msgstr ""
-#: rpmqv.c:552
+#: rpmqv.c:490
msgid " -f <file>+ "
msgstr ""
-#: rpmqv.c:553
+#: rpmqv.c:491
msgid "query/verify package owning <file>"
msgstr ""
-#: rpmqv.c:554
+#: rpmqv.c:492
msgid " -p <packagefile>+ "
msgstr ""
-#: rpmqv.c:555
+#: rpmqv.c:493
msgid "query/verify (uninstalled) package <packagefile>"
msgstr ""
-#: rpmqv.c:556
+#: rpmqv.c:494
msgid " --triggeredby <pkg> "
msgstr ""
-#: rpmqv.c:557
+#: rpmqv.c:495
msgid "query/verify packages triggered by <pkg>"
msgstr ""
-#: rpmqv.c:558
+#: rpmqv.c:496
msgid " --whatprovides <cap> "
msgstr ""
-#: rpmqv.c:559
+#: rpmqv.c:497
msgid "query/verify packages which provide <cap> capability"
msgstr ""
-#: rpmqv.c:560
+#: rpmqv.c:498
msgid " --whatrequires <cap> "
msgstr ""
-#: rpmqv.c:561
+#: rpmqv.c:499
msgid "query/verify packages which require <cap> capability"
msgstr ""
-#: rpmqv.c:565
+#: rpmqv.c:503
msgid " --queryformat <qfmt> "
msgstr ""
-#: rpmqv.c:568
+#: rpmqv.c:506
msgid " Information selection options:"
msgstr ""
-#: rpmqv.c:584
+#: rpmqv.c:522
msgid "list capabilities provided by package"
msgstr ""
-#: rpmqv.c:586
+#: rpmqv.c:524
msgid "list capabilities required by package"
msgstr ""
-#: rpmqv.c:588
+#: rpmqv.c:526
msgid "print the various [un]install scriptlets"
msgstr ""
-#: rpmqv.c:590
+#: rpmqv.c:528
msgid "show the trigger scriptlets contained in the package"
msgstr ""
-#: rpmqv.c:616
+#: rpmqv.c:554
msgid " --install <packagefile>"
msgstr ""
-#: rpmqv.c:617
+#: rpmqv.c:555
msgid " -i <packagefile> "
msgstr ""
-#: rpmqv.c:626
+#: rpmqv.c:564
msgid " --excludepath <path> "
msgstr ""
-#: rpmqv.c:647
+#: rpmqv.c:585
msgid "don't execute any installation scriptlets"
msgstr ""
-#: rpmqv.c:652
+#: rpmqv.c:590
msgid " --prefix <dir> "
msgstr ""
-#: rpmqv.c:654
+#: rpmqv.c:592
msgid " --relocate <oldpath>=<newpath>"
msgstr ""
-#: rpmqv.c:663
+#: rpmqv.c:601
msgid " --upgrade <packagefile>"
msgstr ""
-#: rpmqv.c:664
+#: rpmqv.c:602
msgid " -U <packagefile> "
msgstr ""
-#: rpmqv.c:669
+#: rpmqv.c:607
msgid " --erase <package>"
msgstr ""
-#: rpmqv.c:688
+#: rpmqv.c:626
msgid " --resign <pkg>+ "
msgstr ""
-#: rpmqv.c:690
+#: rpmqv.c:628
msgid " --addsign <pkg>+ "
msgstr ""
-#: rpmqv.c:693
+#: rpmqv.c:631
msgid " --checksig <pkg>+"
msgstr ""
-#: rpmqv.c:694
+#: rpmqv.c:632
msgid " -K <pkg>+ "
msgstr ""
-#: rpmqv.c:707
+#: rpmqv.c:645
msgid "initalize database (unnecessary, legacy use)"
msgstr ""
-#: rpmqv.c:709
+#: rpmqv.c:647
msgid "rebuild database indices from existing database headers"
msgstr ""
-#: rpmqv.c:996
+#: rpmqv.c:929
msgid "Use \"--macros <file:...>\" instead.\n"
msgstr ""
-#: rpmqv.c:1071
+#: rpmqv.c:1003
msgid "--dbpath given for operation that does not use a database"
msgstr ""
-#: rpmqv.c:1158
+#: rpmqv.c:1087
msgid ""
"--notriggers may only be specified during package installation and erasure"
msgstr ""
-#: rpmqv.c:1317
+#: rpmqv.c:1241
msgid "no packages files given for rebuild"
msgstr ""
-#: rpmqv.c:1386
+#: rpmqv.c:1310
msgid "no spec files given for build"
msgstr ""
-#: rpmqv.c:1388
+#: rpmqv.c:1312
msgid "no tar files given for build"
msgstr ""
@@ -1676,87 +1623,87 @@ msgstr ""
msgid "File listed twice: %s\n"
msgstr ""
-#: build/files.c:1060
+#: build/files.c:1070
#, c-format
msgid "Symlink points to BuildRoot: %s -> %s\n"
msgstr ""
-#: build/files.c:1155
+#: build/files.c:1165
#, c-format
msgid "File doesn't match prefix (%s): %s\n"
msgstr ""
-#: build/files.c:1165
+#: build/files.c:1175
#, c-format
msgid "File not found: %s\n"
msgstr ""
-#: build/files.c:1208 build/files.c:1732 build/parsePrep.c:42
+#: build/files.c:1218 build/files.c:1742 build/parsePrep.c:42
#, c-format
msgid "Bad owner/group: %s\n"
msgstr ""
-#: build/files.c:1220
+#: build/files.c:1230
#, c-format
msgid "File %4d: %07o %s.%s\t %s\n"
msgstr ""
-#: build/files.c:1297
+#: build/files.c:1307
#, c-format
msgid "File needs leading \"/\": %s\n"
msgstr ""
-#: build/files.c:1327
+#: build/files.c:1337
#, c-format
msgid "File not found by glob: %s\n"
msgstr ""
-#: build/files.c:1382
+#: build/files.c:1392
msgid "Could not open %%files file %s: %s\n"
msgstr ""
-#: build/files.c:1391 build/pack.c:108
+#: build/files.c:1401 build/pack.c:108
#, c-format
msgid "line: %s\n"
msgstr ""
-#: build/files.c:1720
+#: build/files.c:1730
#, c-format
msgid "Bad file: %s: %s\n"
msgstr ""
#. XXX this error message is probably not seen.
-#: build/files.c:1789
+#: build/files.c:1799
#, c-format
msgid "Couldn't exec %s: %s\n"
msgstr ""
-#: build/files.c:1794
+#: build/files.c:1804
#, c-format
msgid "Couldn't fork %s: %s\n"
msgstr ""
-#: build/files.c:1876
+#: build/files.c:1886
#, c-format
msgid "%s failed\n"
msgstr ""
-#: build/files.c:1880
+#: build/files.c:1890
#, c-format
msgid "failed to write all data to %s\n"
msgstr ""
-#: build/files.c:2005
+#: build/files.c:2017
#, c-format
msgid "Finding %s: (using %s)...\n"
msgstr ""
-#: build/files.c:2033 build/files.c:2047
+#: build/files.c:2045 build/files.c:2059
#, c-format
msgid "Failed to find %s:\n"
msgstr ""
-#: build/files.c:2160
+#: build/files.c:2172
#, c-format
msgid "Processing files: %s-%s-%s\n"
msgstr ""
@@ -2225,7 +2172,7 @@ msgstr ""
#: build/spec.c:41
#, c-format
-msgid "archive = %s, fs = %s\n"
+msgid "archive = %s, fs = %s%s\n"
msgstr ""
#: build/spec.c:228
@@ -2258,40 +2205,40 @@ msgstr ""
msgid "getNextHeader: %s\n"
msgstr ""
-#: lib/cpio.c:1245
+#: lib/cpio.c:1262
#, c-format
msgid "(error 0x%x)"
msgstr ""
-#: lib/cpio.c:1248
+#: lib/cpio.c:1265
msgid "Bad magic"
msgstr ""
-#: lib/cpio.c:1249
+#: lib/cpio.c:1266
msgid "Bad/unreadable header"
msgstr ""
-#: lib/cpio.c:1267
+#: lib/cpio.c:1284
msgid "Header size too big"
msgstr ""
-#: lib/cpio.c:1268
+#: lib/cpio.c:1285
msgid "Unknown file type"
msgstr ""
-#: lib/cpio.c:1269
+#: lib/cpio.c:1286
msgid "Missing hard link"
msgstr ""
-#: lib/cpio.c:1270
+#: lib/cpio.c:1287
msgid "MD5 sum mismatch"
msgstr ""
-#: lib/cpio.c:1271
+#: lib/cpio.c:1288
msgid "Internal error"
msgstr ""
-#: lib/cpio.c:1280
+#: lib/cpio.c:1297
msgid " failed - "
msgstr ""
@@ -2570,7 +2517,7 @@ msgstr ""
msgid "dataLength() RPM_STRING_TYPE count must be 1.\n"
msgstr ""
-#: lib/header.c:207 lib/header.c:1015 lib/install.c:365
+#: lib/header.c:207 lib/header.c:1015 lib/install.c:394
#, c-format
msgid "Data type %d not supported\n"
msgstr ""
@@ -2655,17 +2602,17 @@ msgstr ""
msgid "(unknown type)"
msgstr ""
-#: lib/install.c:190 lib/uninstall.c:209
+#: lib/install.c:219
#, c-format
-msgid " file: %s action: %s\n"
+msgid " file: %s%s action: %s\n"
msgstr ""
-#: lib/install.c:215
+#: lib/install.c:244
#, c-format
msgid "user %s does not exist - using root\n"
msgstr ""
-#: lib/install.c:223
+#: lib/install.c:252
#, c-format
msgid "group %s does not exist - using root\n"
msgstr ""
@@ -2673,90 +2620,90 @@ msgstr ""
#. this would probably be a good place to check if disk space
#. was used up - if so, we should return a different error
#. XXX FIXME: Fclose with libio destroys errno
-#: lib/install.c:651
+#: lib/install.c:677
#, c-format
msgid "unpacking of archive failed%s%s: %s\n"
msgstr ""
-#: lib/install.c:652
+#: lib/install.c:678
msgid " on file "
msgstr ""
-#: lib/install.c:701
+#: lib/install.c:727
msgid "installing a source package\n"
msgstr ""
-#: lib/install.c:721
+#: lib/install.c:747
#, c-format
msgid "cannot create sourcedir %s\n"
msgstr ""
-#: lib/install.c:728 lib/install.c:759
+#: lib/install.c:754 lib/install.c:785
#, c-format
msgid "cannot write to %s\n"
msgstr ""
-#: lib/install.c:732
+#: lib/install.c:758
#, c-format
msgid "sources in: %s\n"
msgstr ""
-#: lib/install.c:752
+#: lib/install.c:778
#, c-format
msgid "cannot create specdir %s\n"
msgstr ""
-#: lib/install.c:763
+#: lib/install.c:789
#, c-format
msgid "spec file in: %s\n"
msgstr ""
-#: lib/install.c:796 lib/install.c:825
+#: lib/install.c:821 lib/install.c:850
msgid "source package contains no .spec file\n"
msgstr ""
-#: lib/install.c:843
+#: lib/install.c:868
#, c-format
msgid "renaming %s to %s\n"
msgstr ""
-#: lib/install.c:845 lib/install.c:1109 lib/uninstall.c:60
+#: lib/install.c:870 lib/install.c:1135 lib/uninstall.c:43
#, c-format
msgid "rename of %s to %s failed: %s\n"
msgstr ""
-#: lib/install.c:935
+#: lib/install.c:960
msgid "source package expected, binary found\n"
msgstr ""
-#: lib/install.c:979
+#: lib/install.c:1005
#, c-format
msgid "package: %s-%s-%s files test = %d\n"
msgstr ""
-#: lib/install.c:1023
+#: lib/install.c:1049
msgid "stopping install as we're running --test\n"
msgstr ""
-#: lib/install.c:1028
+#: lib/install.c:1054
msgid "running preinstall script (if any)\n"
msgstr ""
-#: lib/install.c:1036
+#: lib/install.c:1061
msgid "skipping %s-%s-%s install, %%pre scriptlet failed rc %d\n"
msgstr ""
-#: lib/install.c:1069
+#: lib/install.c:1095
#, c-format
msgid "%s created as %s\n"
msgstr ""
-#: lib/install.c:1105
+#: lib/install.c:1131
#, c-format
msgid "%s saved as %s\n"
msgstr ""
-#: lib/install.c:1199
+#: lib/install.c:1227
msgid "running postinstall scripts (if any)\n"
msgstr ""
@@ -3259,135 +3206,135 @@ msgstr ""
msgid "cannot open %s index\n"
msgstr ""
-#: lib/rpmdb.c:376
+#: lib/rpmdb.c:377
#, c-format
msgid "error(%d) getting \"%s\" records from %s index\n"
msgstr ""
-#: lib/rpmdb.c:495
+#: lib/rpmdb.c:498
#, c-format
msgid "error(%d) storing record %s into %s\n"
msgstr ""
-#: lib/rpmdb.c:505
+#: lib/rpmdb.c:508
#, c-format
msgid "error(%d) removing record %s from %s\n"
msgstr ""
-#: lib/rpmdb.c:740
+#: lib/rpmdb.c:743
msgid "no dbpath has been set\n"
msgstr ""
-#: lib/rpmdb.c:839
+#: lib/rpmdb.c:842
msgid ""
"old format database is present; use --rebuilddb to generate a new format "
"database\n"
msgstr ""
#. error
-#: lib/rpmdb.c:1023
+#: lib/rpmdb.c:1026
#, c-format
msgid "error(%d) counting packages\n"
msgstr ""
-#: lib/rpmdb.c:1079 lib/rpmdb.c:1621
+#: lib/rpmdb.c:1082 lib/rpmdb.c:1639
#, c-format
msgid "%s: cannot read header at 0x%x\n"
msgstr ""
-#: lib/rpmdb.c:1686
+#: lib/rpmdb.c:1704
#, c-format
msgid "removing \"%s\" from %s index.\n"
msgstr ""
-#: lib/rpmdb.c:1695
+#: lib/rpmdb.c:1713
#, c-format
msgid "removing %d entries from %s index.\n"
msgstr ""
-#: lib/rpmdb.c:1836
+#: lib/rpmdb.c:1868
#, c-format
msgid "error(%d) allocating new package instance\n"
msgstr ""
-#: lib/rpmdb.c:1910
+#: lib/rpmdb.c:1942
#, c-format
msgid "adding \"%s\" to %s index.\n"
msgstr ""
-#: lib/rpmdb.c:1919
+#: lib/rpmdb.c:1951
#, c-format
msgid "adding %d entries to %s index.\n"
msgstr ""
-#: lib/rpmdb.c:2255
+#: lib/rpmdb.c:2291
#, c-format
msgid "removing %s after successful db3 rebuild.\n"
msgstr ""
-#: lib/rpmdb.c:2281
+#: lib/rpmdb.c:2317
msgid "no dbpath has been set"
msgstr ""
-#: lib/rpmdb.c:2306
+#: lib/rpmdb.c:2342
#, c-format
msgid "rebuilding database %s into %s\n"
msgstr ""
-#: lib/rpmdb.c:2310
+#: lib/rpmdb.c:2346
#, c-format
msgid "temporary database %s already exists\n"
msgstr ""
-#: lib/rpmdb.c:2316
+#: lib/rpmdb.c:2352
#, c-format
msgid "creating directory %s\n"
msgstr ""
-#: lib/rpmdb.c:2318
+#: lib/rpmdb.c:2354
#, c-format
msgid "creating directory %s: %s\n"
msgstr ""
-#: lib/rpmdb.c:2325
+#: lib/rpmdb.c:2361
#, c-format
msgid "opening old database with dbapi %d\n"
msgstr ""
-#: lib/rpmdb.c:2336
+#: lib/rpmdb.c:2372
#, c-format
msgid "opening new database with dbapi %d\n"
msgstr ""
-#: lib/rpmdb.c:2359
+#: lib/rpmdb.c:2395
#, c-format
msgid "record number %d in database is bad -- skipping.\n"
msgstr ""
-#: lib/rpmdb.c:2396
+#: lib/rpmdb.c:2432
#, c-format
msgid "cannot add record originally at %d\n"
msgstr ""
-#: lib/rpmdb.c:2414
+#: lib/rpmdb.c:2450
msgid "failed to rebuild database: original database remains in place\n"
msgstr ""
-#: lib/rpmdb.c:2422
+#: lib/rpmdb.c:2458
msgid "failed to replace old database with new database!\n"
msgstr ""
-#: lib/rpmdb.c:2424
+#: lib/rpmdb.c:2460
#, c-format
msgid "replace files in %s with files from %s to recover"
msgstr ""
-#: lib/rpmdb.c:2434
+#: lib/rpmdb.c:2470
#, c-format
msgid "removing directory %s\n"
msgstr ""
-#: lib/rpmdb.c:2436
+#: lib/rpmdb.c:2472
#, c-format
msgid "failed to remove directory %s: %s\n"
msgstr ""
@@ -3607,6 +3554,11 @@ msgstr ""
msgid "Please contact rpm-list@redhat.com\n"
msgstr ""
+#: lib/scriptlet.c:233
+#, c-format
+msgid "execution of %s scriptlet from %s-%s-%s failed, exit status %d\n"
+msgstr ""
+
#: lib/signature.c:115
msgid "file is not regular -- skipping size check\n"
msgstr ""
@@ -3730,77 +3682,77 @@ msgstr ""
msgid "You must set \"%%_pgp_name\" in your macro file\n"
msgstr ""
-#: lib/transaction.c:466
+#: lib/transaction.c:483
msgid "========== relocations\n"
msgstr ""
-#: lib/transaction.c:469
+#: lib/transaction.c:486
#, c-format
msgid "%5d exclude %s\n"
msgstr ""
-#: lib/transaction.c:472
+#: lib/transaction.c:489
#, c-format
msgid "%5d relocate %s -> %s\n"
msgstr ""
-#: lib/transaction.c:543
+#: lib/transaction.c:560
#, c-format
msgid "excluding multilib path %s%s\n"
msgstr ""
-#: lib/transaction.c:592
+#: lib/transaction.c:609
#, c-format
msgid "excluding %s %s\n"
msgstr ""
-#: lib/transaction.c:599
+#: lib/transaction.c:616
#, c-format
msgid "relocating %s to %s\n"
msgstr ""
-#: lib/transaction.c:671
+#: lib/transaction.c:688
#, c-format
msgid "relocating directory %s to %s\n"
msgstr ""
-#: lib/transaction.c:676
+#: lib/transaction.c:693
#, c-format
msgid "excluding directory %s\n"
msgstr ""
-#: lib/transaction.c:800
+#: lib/transaction.c:817
#, c-format
msgid "%s skipped due to missingok flag\n"
msgstr ""
-#: lib/uninstall.c:74
+#: lib/uninstall.c:57
#, c-format
msgid "cannot remove %s - directory not empty\n"
msgstr ""
-#: lib/uninstall.c:78
+#: lib/uninstall.c:61
#, c-format
msgid "rmdir of %s failed: %s\n"
msgstr ""
-#: lib/uninstall.c:88
+#: lib/uninstall.c:71
#, c-format
msgid "removal of %s failed: %s\n"
msgstr ""
-#: lib/uninstall.c:151
+#: lib/uninstall.c:134
#, c-format
msgid "will remove files test = %d\n"
msgstr ""
-#: lib/uninstall.c:233
-msgid "running postuninstall script (if any)\n"
+#: lib/uninstall.c:192
+#, c-format
+msgid " file: %s action: %s\n"
msgstr ""
-#: lib/uninstall.c:446
-#, c-format
-msgid "execution of %s scriptlet from %s-%s-%s failed, exit status %d\n"
+#: lib/uninstall.c:216
+msgid "running postuninstall script (if any)\n"
msgstr ""
#: lib/verify.c:59
@@ -3829,63 +3781,6 @@ msgstr ""
msgid "Unsatisfied dependencies for %s-%s-%s: "
msgstr ""
-#: rpmio/rpmio.c:534
-msgid "Success"
-msgstr ""
-
-#: rpmio/rpmio.c:537
-msgid "Bad server response"
-msgstr ""
-
-#: rpmio/rpmio.c:540
-msgid "Server I/O error"
-msgstr ""
-
-#: rpmio/rpmio.c:543
-msgid "Server timeout"
-msgstr ""
-
-#: rpmio/rpmio.c:546
-msgid "Unable to lookup server host address"
-msgstr ""
-
-#: rpmio/rpmio.c:549
-msgid "Unable to lookup server host name"
-msgstr ""
-
-#: rpmio/rpmio.c:552
-msgid "Failed to connect to server"
-msgstr ""
-
-#: rpmio/rpmio.c:555
-msgid "Failed to establish data connection to server"
-msgstr ""
-
-#: rpmio/rpmio.c:558
-msgid "I/O error to local file"
-msgstr ""
-
-#: rpmio/rpmio.c:561
-msgid "Error setting remote server to passive mode"
-msgstr ""
-
-#: rpmio/rpmio.c:564
-msgid "File not found on server"
-msgstr ""
-
-#: rpmio/rpmio.c:567
-msgid "Abort in progress"
-msgstr ""
-
-#: rpmio/rpmio.c:571
-msgid "Unknown or unexpected error"
-msgstr ""
-
-#: rpmio/rpmio.c:1166
-#, c-format
-msgid "logging into %s as %s, pw %s\n"
-msgstr ""
-
#: rpmio/macro.c:187
#, c-format
msgid "======================== active %d empty %d\n"
@@ -3968,6 +3863,63 @@ msgstr ""
msgid "File %s is smaller than %u bytes\n"
msgstr ""
+#: rpmio/rpmio.c:534
+msgid "Success"
+msgstr ""
+
+#: rpmio/rpmio.c:537
+msgid "Bad server response"
+msgstr ""
+
+#: rpmio/rpmio.c:540
+msgid "Server I/O error"
+msgstr ""
+
+#: rpmio/rpmio.c:543
+msgid "Server timeout"
+msgstr ""
+
+#: rpmio/rpmio.c:546
+msgid "Unable to lookup server host address"
+msgstr ""
+
+#: rpmio/rpmio.c:549
+msgid "Unable to lookup server host name"
+msgstr ""
+
+#: rpmio/rpmio.c:552
+msgid "Failed to connect to server"
+msgstr ""
+
+#: rpmio/rpmio.c:555
+msgid "Failed to establish data connection to server"
+msgstr ""
+
+#: rpmio/rpmio.c:558
+msgid "I/O error to local file"
+msgstr ""
+
+#: rpmio/rpmio.c:561
+msgid "Error setting remote server to passive mode"
+msgstr ""
+
+#: rpmio/rpmio.c:564
+msgid "File not found on server"
+msgstr ""
+
+#: rpmio/rpmio.c:567
+msgid "Abort in progress"
+msgstr ""
+
+#: rpmio/rpmio.c:571
+msgid "Unknown or unexpected error"
+msgstr ""
+
+#: rpmio/rpmio.c:1166
+#, c-format
+msgid "logging into %s as %s, pw %s\n"
+msgstr ""
+
#: rpmio/rpmlog.c:24
msgid "(no error)"
msgstr ""
diff --git a/rpm.c b/rpm.c
index 90d6affb5..c9c78d2eb 100755
--- a/rpm.c
+++ b/rpm.c
@@ -52,6 +52,7 @@ enum modes {
static int allFiles;
static int allMatches;
static int badReloc;
+static int dirStash;
static int excldocs;
static int force;
extern int _ftp_debug;
@@ -77,6 +78,7 @@ static char * pipeOutput;
static char * prefix;
static int quiet;
static char * rcfile;
+static int rePackage;
static int replaceFiles;
static int replacePackages;
static char * rootdir;
@@ -106,6 +108,7 @@ static struct poptOption optionsTable[] = {
{ "badreloc", '\0', 0, &badReloc, 0, NULL, NULL},
{ "checksig", 'K', 0, 0, 'K', NULL, NULL},
{ "define", '\0', POPT_ARG_STRING, 0, GETOPT_DEFINEMACRO,NULL, NULL},
+ { "dirstash", '\0', POPT_ARG_VAL, &dirStash, 1, NULL, NULL},
{ "dirtokens", '\0', POPT_ARG_VAL, &_noDirTokens, 0, NULL, NULL},
{ "erase", 'e', 0, 0, 'e', NULL, NULL},
{ "eval", '\0', POPT_ARG_STRING, 0, GETOPT_EVALMACRO, NULL, NULL},
@@ -149,6 +152,7 @@ static struct poptOption optionsTable[] = {
#endif
{ "rebuilddb", '\0', 0, 0, GETOPT_REBUILDDB, NULL, NULL},
{ "relocate", '\0', POPT_ARG_STRING, 0, GETOPT_RELOCATE, NULL, NULL},
+ { "repackage", '\0', POPT_ARG_VAL, &rePackage, 1, NULL, NULL},
{ "replacefiles", '\0', 0, &replaceFiles, 0, NULL, NULL},
{ "replacepkgs", '\0', 0, &replacePackages, 0, NULL, NULL},
{ "resign", '\0', 0, 0, GETOPT_RESIGN, NULL, NULL},
@@ -540,7 +544,9 @@ int main(int argc, const char ** argv)
enum modes bigMode = MODE_UNKNOWN;
QVA_t *qva = &rpmQVArgs;
int arg;
- int installFlags = 0, uninstallFlags = 0, interfaceFlags = 0;
+ rpmtransFlags transFlags = RPMTRANS_FLAG_NONE;
+ rpmInstallInterfaceFlags installInterfaceFlags = INSTALL_NONE;
+ rpmEraseInterfaceFlags eraseInterfaceFlags = UNINSTALL_NONE;
int verifyFlags;
int checksigFlags = 0;
rpmResignFlags addSign = RESIGN_NEW_SIGNATURE;
@@ -1079,15 +1085,18 @@ int main(int argc, const char ** argv)
if (!poptPeekArg(optCon))
argerror(_("no packages given for uninstall"));
- if (noScripts) uninstallFlags |= RPMTRANS_FLAG_NOSCRIPTS;
- if (noTriggers) uninstallFlags |= RPMTRANS_FLAG_NOTRIGGERS;
- if (test) uninstallFlags |= RPMTRANS_FLAG_TEST;
- if (justdb) uninstallFlags |= RPMTRANS_FLAG_JUSTDB;
- if (noDeps) interfaceFlags |= UNINSTALL_NODEPS;
- if (allMatches) interfaceFlags |= UNINSTALL_ALLMATCHES;
+ if (noScripts) transFlags |= RPMTRANS_FLAG_NOSCRIPTS;
+ if (noTriggers) transFlags |= RPMTRANS_FLAG_NOTRIGGERS;
+ if (test) transFlags |= RPMTRANS_FLAG_TEST;
+ if (justdb) transFlags |= RPMTRANS_FLAG_JUSTDB;
+ if (dirStash) transFlags |= RPMTRANS_FLAG_DIRSTASH;
+ if (rePackage) transFlags |= RPMTRANS_FLAG_REPACKAGE;
+
+ if (noDeps) eraseInterfaceFlags |= UNINSTALL_NODEPS;
+ if (allMatches) eraseInterfaceFlags |= UNINSTALL_ALLMATCHES;
ec = rpmErase(rootdir, (const char **)poptGetArgs(optCon),
- uninstallFlags, interfaceFlags);
+ transFlags, eraseInterfaceFlags);
break;
case MODE_INSTALL:
@@ -1106,26 +1115,28 @@ int main(int argc, const char ** argv)
if (ignoreOs) probFilter |= RPMPROB_FILTER_IGNOREOS;
if (ignoreSize) probFilter |= RPMPROB_FILTER_DISKSPACE;
- if (test) installFlags |= RPMTRANS_FLAG_TEST;
+ if (test) transFlags |= RPMTRANS_FLAG_TEST;
/* RPMTRANS_FLAG_BUILD_PROBS */
- if (noScripts) installFlags |= RPMTRANS_FLAG_NOSCRIPTS;
- if (justdb) installFlags |= RPMTRANS_FLAG_JUSTDB;
- if (noTriggers) installFlags |= RPMTRANS_FLAG_NOTRIGGERS;
+ if (noScripts) transFlags |= RPMTRANS_FLAG_NOSCRIPTS;
+ if (justdb) transFlags |= RPMTRANS_FLAG_JUSTDB;
+ if (noTriggers) transFlags |= RPMTRANS_FLAG_NOTRIGGERS;
if (!incldocs) {
if (excldocs)
- installFlags |= RPMTRANS_FLAG_NODOCS;
+ transFlags |= RPMTRANS_FLAG_NODOCS;
else if (rpmExpandNumeric("%{_excludedocs}"))
- installFlags |= RPMTRANS_FLAG_NODOCS;
+ transFlags |= RPMTRANS_FLAG_NODOCS;
}
- if (allFiles) installFlags |= RPMTRANS_FLAG_ALLFILES;
+ if (allFiles) transFlags |= RPMTRANS_FLAG_ALLFILES;
+ if (dirStash) transFlags |= RPMTRANS_FLAG_DIRSTASH;
+ if (rePackage) transFlags |= RPMTRANS_FLAG_REPACKAGE;
/* RPMTRANS_FLAG_KEEPOBSOLETE */
- if (showPercents) interfaceFlags |= INSTALL_PERCENT;
- if (showHash) interfaceFlags |= INSTALL_HASH;
- if (noDeps) interfaceFlags |= INSTALL_NODEPS;
- if (noOrder) interfaceFlags |= INSTALL_NOORDER;
- if (upgrade) interfaceFlags |= INSTALL_UPGRADE;
- if (freshen) interfaceFlags |= (INSTALL_UPGRADE|INSTALL_FRESHEN);
+ if (showPercents) installInterfaceFlags |= INSTALL_PERCENT;
+ if (showHash) installInterfaceFlags |= INSTALL_HASH;
+ if (noDeps) installInterfaceFlags |= INSTALL_NODEPS;
+ if (noOrder) installInterfaceFlags |= INSTALL_NOORDER;
+ if (upgrade) installInterfaceFlags |= INSTALL_UPGRADE;
+ if (freshen) installInterfaceFlags |= (INSTALL_UPGRADE|INSTALL_FRESHEN);
if (!poptPeekArg(optCon))
argerror(_("no packages given for install"));
@@ -1144,7 +1155,8 @@ int main(int argc, const char ** argv)
}
ec += rpmInstall(rootdir, (const char **)poptGetArgs(optCon),
- installFlags, interfaceFlags, probFilter, relocations);
+ transFlags, installInterfaceFlags, probFilter,
+ relocations);
break;
case MODE_QUERY:
diff --git a/rpm.spec.in b/rpm.spec.in
index 8309b6221..13600865e 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -13,7 +13,7 @@ Summary: The Red Hat package management system.
Name: rpm
%define version @VERSION@
Version: %{version}
-Release: 0.32
+Release: 0.1
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{version}.tar.gz
Copyright: GPL
diff --git a/rpmqv.c b/rpmqv.c
index 14c937055..7f33cde62 100755
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -29,23 +29,8 @@ static int initdb = 0;
#define GETOPT_INSTALL 1014
#define GETOPT_RELOCATE 1016
#define GETOPT_EXCLUDEPATH 1019
-static int allFiles = 0;
-static int allMatches = 0;
-static int badReloc = 0;
-static int excldocs = 0;
-static int ignoreArch = 0;
-static int ignoreOs = 0;
-static int ignoreSize = 0;
static int incldocs = 0;
-static int justdb = 0;
-static int noOrder = 0;
-static int oldPackage = 0;
static char * prefix = NULL;
-static int replaceFiles = 0;
-static int replacePackages = 0;
-static int showHash = 0;
-static int showPercents = 0;
-static int noTriggers = 0;
#endif /* IAM_RPMEIU */
#ifdef IAM_RPMK
@@ -135,13 +120,8 @@ static int noMd5 = 0;
static int noDeps = 0;
#endif
-#if defined(IAM_RPMQV) || defined(IAM_RPMEIU)
-static int noScripts = 0;
-#endif
-
#if defined(IAM_RPMEIU)
static int force = 0;
-static int test = 0;
#endif
static struct poptOption rpmAllPoptTable[] = {
@@ -205,8 +185,7 @@ static struct poptOption rpmDatabasePoptTable[] = {
N_("generate headers compatible with (legacy) rpm[23] packaging"),
NULL},
{ "dirtokens", '\0', POPT_ARG_VAL, &_noDirTokens, 0,
- N_("generate headers compatible with rpm4 packaging"),
- NULL},
+ N_("generate headers compatible with rpm4 packaging"), NULL},
POPT_TABLEEND
};
@@ -215,117 +194,103 @@ static struct poptOption rpmDatabasePoptTable[] = {
#ifdef IAM_RPMK
static struct poptOption rpmSignPoptTable[] = {
{ "addsign", '\0', 0, 0, GETOPT_ADDSIGN,
- N_("add a signature to a package"),
- NULL },
+ N_("add a signature to a package"), NULL },
{ "resign", '\0', 0, 0, GETOPT_RESIGN,
- N_("sign a package (discard current signature)"),
- NULL },
+ N_("sign a package (discard current signature)"), NULL },
{ "sign", '\0', 0, &signIt, 0,
- N_("generate PGP/GPG signature"),
- NULL },
+ N_("generate PGP/GPG signature"), NULL },
{ "checksig", 'K', 0, 0, 'K',
- N_("verify package signature"),
- NULL },
+ N_("verify package signature"), NULL },
{ "nogpg", '\0', 0, &noGpg, 0,
- N_("skip any PGP signatures"),
- NULL },
+ N_("skip any PGP signatures"), NULL },
{ "nopgp", '\0', 0, &noPgp, 0,
- N_("skip any GPG signatures"),
- NULL },
+ N_("skip any GPG signatures"), NULL },
{ "nomd5", '\0', 0, &noMd5, 0,
- N_("do not verify file md5 checksums"),
- NULL },
+ N_("do not verify file md5 checksums"), NULL },
POPT_TABLEEND
};
#endif /* IAM_RPMK */
#ifdef IAM_RPMEIU
+static rpmtransFlags transFlags = RPMTRANS_FLAG_NONE;
+static rpmprobFilterFlags probFilter = RPMPROB_FILTER_NONE;
+static rpmInstallInterfaceFlags installInterfaceFlags = INSTALL_NONE;
+static rpmEraseInterfaceFlags eraseInterfaceFlags = UNINSTALL_NONE;
+
+#define _POPT_SET_BIT (POPT_ARG_VAL|POPT_ARGFLAG_OR)
+
static struct poptOption rpmInstallPoptTable[] = {
- { "allfiles", '\0', 0, &allFiles, 0,
+ { "allfiles", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_ALLFILES,
N_("install all files, even configurations which might otherwise be skipped"),
NULL},
- { "allmatches", '\0', 0, &allMatches, 0,
+ { "allmatches", '\0', _POPT_SET_BIT, &eraseInterfaceFlags, UNINSTALL_ALLMATCHES,
N_("remove all packages which match <package> (normally an error is generated if <package> specified multiple packages)"),
NULL},
- { "badreloc", '\0', 0, &badReloc, 0,
- N_("relocate files in non-relocateable package"),
- NULL},
+ { "badreloc", '\0', _POPT_SET_BIT, &probFilter, RPMPROB_FILTER_FORCERELOCATE,
+ N_("relocate files in non-relocateable package"), NULL},
+ { "dirstash", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_DIRSTASH,
+ N_("save erased package files by renaming into sub-directory"), NULL},
{ "erase", 'e', 0, 0, 'e',
- N_("erase (uninstall) package"),
- N_("<package>") },
- { "excludedocs", '\0', 0, &excldocs, 0,
- N_("do not install documentation"),
- NULL},
+ N_("erase (uninstall) package"), N_("<package>+") },
+ { "excludedocs", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_NODOCS,
+ N_("do not install documentation"), NULL},
{ "excludepath", '\0', POPT_ARG_STRING, 0, GETOPT_EXCLUDEPATH,
N_("skip files with leading component <path> "),
- NULL},
+ N_("<path>") },
{ "force", '\0', 0, &force, 0,
- N_("short hand for --replacepkgs --replacefiles"),
- NULL},
- { "freshen", 'F', 0, 0, 'F',
- N_("upgrade package if already installed"),
+ N_("short hand for --replacepkgs --replacefiles"), NULL},
+ { "freshen", 'F', _POPT_SET_BIT, &installInterfaceFlags,
+ (INSTALL_UPGRADE|INSTALL_FRESHEN),
+ N_("upgrade package(s) if already installed"),
N_("<packagefile>+") },
- { "hash", 'h', 0, &showHash, 0,
- N_("print hash marks as package installs (good with -v)"),
- NULL},
- { "ignorearch", '\0', 0, &ignoreArch, 0,
- N_("don't verify package architecture"),
- NULL},
- { "ignoreos", '\0', 0, &ignoreOs, 0,
- N_("don't verify package operating system"),
- NULL},
- { "ignoresize", '\0', 0, &ignoreSize, 0,
- N_("don't check disk space before installing"),
- NULL},
+ { "hash", 'h', _POPT_SET_BIT, &installInterfaceFlags, INSTALL_HASH,
+ N_("print hash marks as package installs (good with -v)"), NULL},
+ { "ignorearch", '\0', _POPT_SET_BIT, &probFilter, RPMPROB_FILTER_IGNOREARCH,
+ N_("don't verify package architecture"), NULL},
+ { "ignoreos", '\0', _POPT_SET_BIT, &probFilter, RPMPROB_FILTER_IGNOREOS,
+ N_("don't verify package operating system"), NULL},
+ { "ignoresize", '\0', _POPT_SET_BIT, &probFilter,
+ (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES),
+ N_("don't check disk space before installing"), NULL},
{ "includedocs", '\0', 0, &incldocs, 0,
- N_("install documentation"),
- NULL},
+ N_("install documentation"), NULL},
{ "install", '\0', 0, 0, GETOPT_INSTALL,
- N_("install package"),
- N_("<packagefile>+") },
- { "justdb", '\0', 0, &justdb, 0,
- N_("update the database, but do not modify the filesystem"),
- NULL},
+ N_("install package"), N_("<packagefile>+") },
+ { "justdb", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_JUSTDB,
+ N_("update the database, but do not modify the filesystem"), NULL},
{ "nodeps", '\0', 0, &noDeps, 0,
- N_("do not verify package dependencies"),
- NULL },
- { "noorder", '\0', 0, &noOrder, 0,
+ N_("do not verify package dependencies"), NULL },
+ { "noorder", '\0', _POPT_SET_BIT, &installInterfaceFlags, INSTALL_NOORDER,
N_("do not reorder package installation to satisfy dependencies"),
NULL},
- { "noscripts", '\0', 0, &noScripts, 0,
- N_("do not execute scripts (if any)"),
- NULL },
- { "notriggers", '\0', 0, &noTriggers, 0,
- N_("don't execute any scriptlets triggered by this package"),
- NULL},
- { "oldpackage", '\0', 0, &oldPackage, 0,
+ { "noscripts", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_NOSCRIPTS,
+ N_("do not execute scripts (if any)"), NULL },
+ { "notriggers", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_NOTRIGGERS,
+ N_("don't execute any scriptlets triggered by this package"), NULL},
+ { "oldpackage", '\0', _POPT_SET_BIT, &probFilter, RPMPROB_FILTER_OLDPACKAGE,
N_("upgrade to an old version of the package (--force on upgrades does this automatically)"),
NULL},
- { "percent", '\0', 0, &showPercents, 0,
- N_("print percentages as package installs"),
- NULL},
+ { "percent", '\0', _POPT_SET_BIT, &installInterfaceFlags, INSTALL_PERCENT,
+ N_("print percentages as package installs"), NULL},
{ "prefix", '\0', POPT_ARG_STRING, &prefix, 0,
N_("relocate the package to <dir>, if relocatable"),
N_("<dir>") },
{ "relocate", '\0', POPT_ARG_STRING, 0, GETOPT_RELOCATE,
- N_("relocate files from <oldpath> to <newpath>"),
- N_("<oldpath>=<newpath>") },
- { "replacefiles", '\0', 0, &replaceFiles, 0,
- N_("install even if the package replaces installed files"),
- NULL},
- { "replacepkgs", '\0', 0, &replacePackages, 0,
- N_("reinstall if the package is already present"),
- NULL},
- { "test", '\0', 0, &test, 0,
- N_("don't install, but tell if it would work or not"),
- NULL},
- { "upgrade", 'U', 0, 0, 'U',
- N_("upgrade package"),
+ N_("relocate files from path <old> to <new>"),
+ N_("<old>=<new>") },
+ { "repackage", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_REPACKAGE,
+ N_("save erased package files by repackaging"), NULL},
+ { "replacefiles", '\0', _POPT_SET_BIT, &probFilter,
+ (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
+ N_("install even if the package replaces installed files"), NULL},
+ { "replacepkgs", '\0', _POPT_SET_BIT, &probFilter, RPMPROB_FILTER_REPLACEPKG,
+ N_("reinstall if the package is already present"), NULL},
+ { "test", '\0', _POPT_SET_BIT, &transFlags, RPMTRANS_FLAG_TEST,
+ N_("don't install, but tell if it would work or not"), NULL},
+ { "upgrade", 'U', _POPT_SET_BIT, &installInterfaceFlags, INSTALL_UPGRADE,
+ N_("upgrade package(s)"),
N_("<packagefile>+") },
- { "uninstall", 'u', POPT_ARGFLAG_DOC_HIDDEN, 0, 'u',
- NULL,
- NULL},
POPT_TABLEEND
};
@@ -369,6 +334,12 @@ static struct poptOption optionsTable[] = {
NULL },
#endif /* IAM_RPMBT */
+#ifdef IAM_RPMEIU
+ { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmInstallPoptTable, 0,
+ N_("Install/Upgrade/Erase options:"),
+ NULL },
+#endif /* IAM_RPMEIU */
+
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmAllPoptTable, 0,
N_("Common options for all rpm modes:"),
NULL },
@@ -387,12 +358,6 @@ static void argerror(const char * desc) {
exit(EXIT_FAILURE);
}
-static void printHelp(void);
-static void printVersion(void);
-static void printBanner(void);
-static void printUsage(void);
-static void printHelpLine(char * prefix, char * help);
-
static void printVersion(void) {
fprintf(stdout, _("RPM version %s\n"), rpmEVR);
}
@@ -413,63 +378,36 @@ static void printUsage(void) {
fprintf(fp, _("Usage: %s {--help}\n"), __progname);
fprintf(fp, (" %s {--version}\n"), __progname);
-#ifdef IAM_RPMDB
- fprintf(fp, _(" %s {--initdb} [--dbpath <dir>]\n"), __progname);
- fprintf(fp, _(" %s {--rebuilddb} [--rcfile <file:...>] [--dbpath <dir>]\n"), __progname);
-#endif
-
#ifdef IAM_RPMEIU
- fprintf(fp, _(" %s {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]\n"), __progname);
- puts(_(" [--replacepkgs] [--replacefiles] [--root <dir>]"));
- puts(_(" [--excludedocs] [--includedocs] [--noscripts]"));
- puts(_(" [--rcfile <file:...>] [--ignorearch] [--dbpath <dir>]"));
- puts(_(" [--prefix <dir>] [--ignoreos] [--nodeps] [--allfiles]"));
- puts(_(" [--ftpproxy <host>] [--ftpport <port>]"));
- puts(_(" [--httpproxy <host>] [--httpport <port>]"));
- puts(_(" [--justdb] [--noorder] [--relocate oldpath=newpath]"));
- puts(_(" [--badreloc] [--notriggers] [--excludepath <path>]"));
- puts(_(" [--ignoresize] file1.rpm ... fileN.rpm"));
- fprintf(fp, (" %s {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]\n"), __progname);
- puts(_(" [--oldpackage] [--root <dir>] [--noscripts]"));
- puts(_(" [--excludedocs] [--includedocs] [--rcfile <file:...>]"));
- puts(_(" [--ignorearch] [--dbpath <dir>] [--prefix <dir>] "));
- puts(_(" [--ftpproxy <host>] [--ftpport <port>]"));
- puts(_(" [--httpproxy <host>] [--httpport <port>]"));
- puts(_(" [--ignoreos] [--nodeps] [--allfiles] [--justdb]"));
- puts(_(" [--noorder] [--relocate oldpath=newpath]"));
- puts(_(" [--badreloc] [--excludepath <path>] [--ignoresize]"));
- puts(_(" file1.rpm ... fileN.rpm"));
- fprintf(fp, _(" %s {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file:...>]\n"), __progname);
- puts(_(" [--dbpath <dir>] [--nodeps] [--allmatches]"));
- puts(_(" [--justdb] [--notriggers] package1 ... packageN"));
+#ifdef DYING
+--dbpath all
+--ftpproxy etc all
+--force alias for --replacepkgs --replacefiles
+--includedocs handle as option in table
+ --erase forbids many options
+#endif
#endif /* IAM_RPMEIU */
#ifdef IAM_RPMQV
- fprintf(fp, (" %s {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]\n"), __progname);
- puts(_(" [--scripts] [--root <dir>] [--rcfile <file:...>]"));
- puts(_(" [--whatprovides] [--whatrequires] [--requires]"));
- puts(_(" [--triggeredby]"));
- puts(_(" [--ftpproxy <host>] [--ftpport <port>]"));
- puts(_(" [--httpproxy <host>] [--httpport <port>]"));
- puts(_(" [--provides] [--triggers] [--dump]"));
- puts(_(" [--changelog] [--dbpath <dir>] [targets]"));
- fprintf(fp, _(" %s {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file:...>]\n"), __progname);
- puts(_(" [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]"));
- puts(_(" [--nomd5] [targets]"));
- fprintf(fp, (" %s {--querytags}\n"), __progname);
- fprintf(fp, _(" %s {--setperms} [-afpg] [target]\n"), __progname);
- fprintf(fp, _(" %s {--setugids} [-afpg] [target]\n"), __progname);
+#ifdef DYING /* XXX popt glue needing --help doco. */
+--dbpath all
+--ftpproxy etc all
+-i,--info Q
+-R,--requires Q
+-P,--provides Q
+--scripts Q
+--triggeredby Q
+--changelog Q
+--triggers Q
+--querytags !V
+--setperms V
+--setugids V
+#endif /* DYING */
#endif /* IAM_RPMQV */
-#ifdef IAM_RPMK
- fprintf(fp, _(" %s {--resign} [--rcfile <file:...>] package1 package2 ... packageN\n"), __progname);
- fprintf(fp, _(" %s {--addsign} [--rcfile <file:...>] package1 package2 ... packageN"), __progname);
- fprintf(fp, _(" %s {--checksig -K} [--nopgp] [--nogpg] [--nomd5] [--rcfile <file:...>]\n"), __progname);
- puts(_(" package1 ... packageN"));
-#endif /* IAM_RPMK */
-
}
+#ifdef DYING
static void printHelpLine(char * prefix, char * help) {
int indentLength = strlen(prefix) + 3;
int lineLength = 79 - indentLength;
@@ -710,6 +648,7 @@ static void printHelp(void) {
#endif
}
+#endif
int main(int argc, const char ** argv)
{
@@ -726,10 +665,6 @@ int main(int argc, const char ** argv)
#ifdef IAM_RPMEIU
rpmRelocation * relocations = NULL;
int numRelocations = 0;
- int installFlags = 0, uninstallFlags = 0, interfaceFlags = 0;
- int probFilter = 0;
- int upgrade = 0;
- int freshen = 0;
#endif
#if defined(IAM_RPMK)
@@ -855,6 +790,13 @@ int main(int argc, const char ** argv)
ba->buildChar = ' ';
#endif
+#ifdef IAM_RPMEIU
+ transFlags = RPMTRANS_FLAG_NONE;
+ probFilter = RPMPROB_FILTER_NONE;
+ installInterfaceFlags = INSTALL_NONE;
+ eraseInterfaceFlags = UNINSTALL_NONE;
+#endif
+
while ((arg = poptGetNextOpt(optCon)) > 0) {
optArg = poptGetOptArg(optCon);
@@ -884,14 +826,6 @@ int main(int argc, const char ** argv)
#endif /* IAM_RPMQV || IAM_RPMEIU || IAM_RPMBT */
#ifdef IAM_RPMEIU
- case 'u':
- if (bigMode != MODE_UNKNOWN && bigMode != MODE_UNINSTALL)
- argerror(_("only one major mode may be specified"));
- bigMode = MODE_UNINSTALL;
- rpmMessage(RPMMESS_ERROR, _("-u and --uninstall are deprecated and no"
- " longer work.\n"));
- rpmMessage(RPMMESS_ERROR, _("Use -e or --erase instead.\n"));
- exit(EXIT_FAILURE);
case 'e':
if (bigMode != MODE_UNKNOWN && bigMode != MODE_UNINSTALL)
@@ -905,20 +839,19 @@ int main(int argc, const char ** argv)
bigMode = MODE_INSTALL;
break;
+#ifdef DYING /* XXX handled by popt */
case 'U':
if (bigMode != MODE_UNKNOWN && bigMode != MODE_INSTALL)
argerror(_("only one major mode may be specified"));
bigMode = MODE_INSTALL;
- upgrade = 1;
break;
case 'F':
if (bigMode != MODE_UNKNOWN && bigMode != MODE_INSTALL)
argerror(_("only one major mode may be specified"));
bigMode = MODE_INSTALL;
- upgrade = 1; /* Freshen implies upgrade */
- freshen = 1;
break;
+#endif
case GETOPT_EXCLUDEPATH:
if (*optArg != '/')
@@ -1007,7 +940,6 @@ int main(int argc, const char ** argv)
rpmSetVerbosity(RPMMESS_QUIET);
if (showVersion) printVersion();
- if (help) printHelp();
if (arg < -1) {
fprintf(stderr, "%s: %s\n",
@@ -1078,7 +1010,7 @@ int main(int argc, const char ** argv)
#endif /* IAM_RPMEIU */
#ifdef IAM_RPMEIU
- if (bigMode != MODE_INSTALL && badReloc)
+ if (bigMode != MODE_INSTALL && (probFilter & RPMPROB_FILTER_FORCERELOCATE))
argerror(_("files may only be relocated during package installation"));
if (relocations && prefix)
@@ -1093,23 +1025,24 @@ int main(int argc, const char ** argv)
if (prefix && prefix[0] != '/')
argerror(_("arguments to --prefix must begin with a /"));
- if (bigMode != MODE_INSTALL && showHash)
+ if (bigMode != MODE_INSTALL && (installInterfaceFlags & INSTALL_HASH))
argerror(_("--hash (-h) may only be specified during package "
"installation"));
- if (bigMode != MODE_INSTALL && showPercents)
+ if (bigMode != MODE_INSTALL && (installInterfaceFlags & INSTALL_PERCENT))
argerror(_("--percent may only be specified during package "
"installation"));
- if (bigMode != MODE_INSTALL && replaceFiles)
+ if (bigMode != MODE_INSTALL &&
+ (probFilter & (RPMPROB_FILTER_REPLACEOLDFILES|RPMPROB_FILTER_REPLACENEWFILES)))
argerror(_("--replacefiles may only be specified during package "
"installation"));
- if (bigMode != MODE_INSTALL && replacePackages)
+ if (bigMode != MODE_INSTALL && (probFilter & RPMPROB_FILTER_REPLACEPKG))
argerror(_("--replacepkgs may only be specified during package "
"installation"));
- if (bigMode != MODE_INSTALL && excldocs)
+ if (bigMode != MODE_INSTALL && (transFlags & RPMTRANS_FLAG_NODOCS))
argerror(_("--excludedocs may only be specified during package "
"installation"));
@@ -1117,44 +1050,40 @@ int main(int argc, const char ** argv)
argerror(_("--includedocs may only be specified during package "
"installation"));
- if (excldocs && incldocs)
+ if (incldocs && (transFlags & RPMTRANS_FLAG_NODOCS))
argerror(_("only one of --excludedocs and --includedocs may be "
"specified"));
- if (bigMode != MODE_INSTALL && ignoreArch)
+ if (bigMode != MODE_INSTALL && (probFilter & RPMPROB_FILTER_IGNOREARCH))
argerror(_("--ignorearch may only be specified during package "
"installation"));
- if (bigMode != MODE_INSTALL && ignoreOs)
+ if (bigMode != MODE_INSTALL && (probFilter & RPMPROB_FILTER_IGNOREOS))
argerror(_("--ignoreos may only be specified during package "
"installation"));
- if (bigMode != MODE_INSTALL && ignoreSize)
+ if (bigMode != MODE_INSTALL &&
+ (probFilter & (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES)))
argerror(_("--ignoresize may only be specified during package "
"installation"));
- if (allMatches && bigMode != MODE_UNINSTALL)
+ if ((eraseInterfaceFlags & UNINSTALL_ALLMATCHES) && bigMode != MODE_UNINSTALL)
argerror(_("--allmatches may only be specified during package "
"erasure"));
- if (allFiles && bigMode != MODE_INSTALL)
+ if ((transFlags & RPMTRANS_FLAG_ALLFILES) && bigMode != MODE_INSTALL)
argerror(_("--allfiles may only be specified during package "
"installation"));
- if (justdb && bigMode != MODE_INSTALL && bigMode != MODE_UNINSTALL)
+ if ((transFlags & RPMTRANS_FLAG_JUSTDB) &&
+ bigMode != MODE_INSTALL && bigMode != MODE_UNINSTALL)
argerror(_("--justdb may only be specified during package "
"installation and erasure"));
#endif /* IAM_RPMEIU */
-#if defined(IAM_RPMQV) || defined(IAM_RPMEIU)
- if (bigMode != MODE_INSTALL && bigMode != MODE_UNINSTALL &&
- bigMode != MODE_VERIFY && noScripts)
- argerror(_("--noscripts may only be specified during package "
- "installation, erasure, and verification"));
-#endif /* IAM_RPMQV || IAM_RPMEIU */
-
#if defined(IAM_RPMEIU)
- if (bigMode != MODE_INSTALL && bigMode != MODE_UNINSTALL && noTriggers)
+ if (bigMode != MODE_INSTALL && bigMode != MODE_UNINSTALL &&
+ (transFlags & RPMTRANS_FLAG_NOTRIGGERS))
argerror(_("--notriggers may only be specified during package "
"installation and erasure"));
@@ -1163,7 +1092,7 @@ int main(int argc, const char ** argv)
"building, rebuilding, recompilation, installation,"
"erasure, and verification"));
- if (test && (bigMode & ~MODES_FOR_TEST))
+ if ((transFlags & RPMTRANS_FLAG_TEST) && (bigMode & ~MODES_FOR_TEST))
argerror(_("--test may only be specified during package installation, "
"erasure, and building"));
#endif /* IAM_RPMEIU */
@@ -1186,11 +1115,6 @@ int main(int argc, const char ** argv)
}
}
-#ifdef IAM_RPMEIU
- if (oldPackage && !upgrade)
- argerror(_("--oldpackage may only be used during upgrades"));
-#endif
-
#ifdef IAM_RPMK
if (noPgp && bigMode != MODE_CHECKSIG)
argerror(_("--nopgp may only be used during signature checking"));
@@ -1416,15 +1340,10 @@ int main(int argc, const char ** argv)
if (!poptPeekArg(optCon))
argerror(_("no packages given for uninstall"));
- if (noScripts) uninstallFlags |= RPMTRANS_FLAG_NOSCRIPTS;
- if (noTriggers) uninstallFlags |= RPMTRANS_FLAG_NOTRIGGERS;
- if (test) uninstallFlags |= RPMTRANS_FLAG_TEST;
- if (justdb) uninstallFlags |= RPMTRANS_FLAG_JUSTDB;
- if (noDeps) interfaceFlags |= UNINSTALL_NODEPS;
- if (allMatches) interfaceFlags |= UNINSTALL_ALLMATCHES;
+ if (noDeps) eraseInterfaceFlags |= UNINSTALL_NODEPS;
ec = rpmErase(rootdir, (const char **)poptGetArgs(optCon),
- uninstallFlags, interfaceFlags);
+ transFlags, eraseInterfaceFlags);
break;
case MODE_INSTALL:
@@ -1434,35 +1353,18 @@ int main(int argc, const char ** argv)
RPMPROB_FILTER_REPLACENEWFILES |
RPMPROB_FILTER_OLDPACKAGE;
}
- if (replaceFiles) probFilter |= RPMPROB_FILTER_REPLACEOLDFILES |
- RPMPROB_FILTER_REPLACENEWFILES;
- if (badReloc) probFilter |= RPMPROB_FILTER_FORCERELOCATE;
- if (replacePackages) probFilter |= RPMPROB_FILTER_REPLACEPKG;
- if (oldPackage) probFilter |= RPMPROB_FILTER_OLDPACKAGE;
- if (ignoreArch) probFilter |= RPMPROB_FILTER_IGNOREARCH;
- if (ignoreOs) probFilter |= RPMPROB_FILTER_IGNOREOS;
- if (ignoreSize) probFilter |= RPMPROB_FILTER_DISKSPACE;
-
- if (test) installFlags |= RPMTRANS_FLAG_TEST;
+
/* RPMTRANS_FLAG_BUILD_PROBS */
- if (noScripts) installFlags |= RPMTRANS_FLAG_NOSCRIPTS;
- if (justdb) installFlags |= RPMTRANS_FLAG_JUSTDB;
- if (noTriggers) installFlags |= RPMTRANS_FLAG_NOTRIGGERS;
+ /* RPMTRANS_FLAG_KEEPOBSOLETE */
+
if (!incldocs) {
- if (excldocs)
- installFlags |= RPMTRANS_FLAG_NODOCS;
+ if (transFlags & RPMTRANS_FLAG_NODOCS)
+ ;
else if (rpmExpandNumeric("%{_excludedocs}"))
- installFlags |= RPMTRANS_FLAG_NODOCS;
+ transFlags |= RPMTRANS_FLAG_NODOCS;
}
- if (allFiles) installFlags |= RPMTRANS_FLAG_ALLFILES;
- /* RPMTRANS_FLAG_KEEPOBSOLETE */
- if (showPercents) interfaceFlags |= INSTALL_PERCENT;
- if (showHash) interfaceFlags |= INSTALL_HASH;
- if (noDeps) interfaceFlags |= INSTALL_NODEPS;
- if (noOrder) interfaceFlags |= INSTALL_NOORDER;
- if (upgrade) interfaceFlags |= INSTALL_UPGRADE;
- if (freshen) interfaceFlags |= (INSTALL_UPGRADE|INSTALL_FRESHEN);
+ if (noDeps) installInterfaceFlags |= INSTALL_NODEPS;
if (!poptPeekArg(optCon))
argerror(_("no packages given for install"));
@@ -1481,7 +1383,8 @@ int main(int argc, const char ** argv)
}
ec += rpmInstall(rootdir, (const char **)poptGetArgs(optCon),
- installFlags, interfaceFlags, probFilter, relocations);
+ transFlags, installInterfaceFlags, probFilter,
+ relocations);
break;
case MODE_QUERY:
case MODE_VERIFY:
@@ -1522,11 +1425,6 @@ int main(int argc, const char ** argv)
verifyFlags = (VERIFY_FILES|VERIFY_DEPS|VERIFY_SCRIPT|VERIFY_MD5);
verifyFlags &= ~qva->qva_flags;
-#ifdef DYING
- if (noDeps) verifyFlags &= ~VERIFY_DEPS;
- if (noScripts) verifyFlags &= ~VERIFY_SCRIPT;
- if (noMd5) verifyFlags &= ~VERIFY_MD5;
-#endif
qva->qva_prefix = rootdir;
qva->qva_flags = verifyFlags;