summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-02-08 21:50:38 +0000
committerjbj <devnull@localhost>2001-02-08 21:50:38 +0000
commitcc3e5fd3dbcbb94928c5fc88d4257ca3514c7805 (patch)
treee2ea0c23890144a8c6b86d1b51e359d13192ade5
parent485f508bb1a7f60fcbd7757be4acdfedb51b17ab (diff)
downloadlibrpm-tizen-cc3e5fd3dbcbb94928c5fc88d4257ca3514c7805.tar.gz
librpm-tizen-cc3e5fd3dbcbb94928c5fc88d4257ca3514c7805.tar.bz2
librpm-tizen-cc3e5fd3dbcbb94928c5fc88d4257ca3514c7805.zip
Move state machine drivers into fsmStage.
Off to fix build's yet again. CVS patchset: 4530 CVS date: 2001/02/08 21:50:38
-rw-r--r--build/pack.c4
-rw-r--r--lib/cpio.c375
-rw-r--r--lib/cpio.h2
-rw-r--r--lib/install.c21
-rw-r--r--lib/rollback.c16
-rw-r--r--lib/rollback.h24
-rw-r--r--lib/transaction.c8
-rw-r--r--lib/uninstall.c20
-rw-r--r--po/rpm.pot141
9 files changed, 327 insertions, 284 deletions
diff --git a/build/pack.c b/build/pack.c
index f9b4774c9..a61064d45 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -52,9 +52,11 @@ static int cpio_doio(FD_t fdo, Header h, CSA_t * csa, const char * fmodeMacro)
(void) Fflush(fdo);
cfd = Fdopen(fdDup(Fileno(fdo)), fmode);
- rc = fsmSetup(fi->fsm, FSM_BUILD, ts, fi, cfd,
+ rc = fsmSetup(fi->fsm, FSM_PKGBUILD, ts, fi, cfd,
&csa->cpioArchiveSize, &failedFile);
+#ifdef DYING
rc = cpioBuildArchive(fi->fsm);
+#endif
Fclose(cfd);
(void) fsmTeardown(fi->fsm);
diff --git a/lib/cpio.c b/lib/cpio.c
index 22b434f64..2d44d4c62 100644
--- a/lib/cpio.c
+++ b/lib/cpio.c
@@ -104,8 +104,9 @@ struct fsm_s {
/*@shared@*/ const char * dirName; /*!< File directory name. */
/*@shared@*/ const char * baseName; /*!< File base name. */
/*@shared@*/ const char * fmd5sum; /*!< File MD5 sum (NULL disables). */
+ unsigned fflags; /*!< File flags. */
fileAction action; /*!< File disposition. */
- fileStage goal; /*!< Install/build/erase */
+ fileStage goal; /*!< Package state machine goal. */
fileStage stage; /*!< External file stage. */
struct stat sb; /*!< Current file stat(2) info. */
struct stat osb; /*!< Original file stat(2) info. */
@@ -121,23 +122,6 @@ TFI_t fsmGetFi(const FSM_t fsm) {
return (iter ? iter->fi : NULL);
}
-#ifdef UNUSED
-static int fsmSetIndex(FSM_t fsm, int isave) {
- FSMI_t iter = fsm->iter;
- int iprev = -1;
- if (iter) {
- iprev = iter->isave;
- iter->isave = isave;
- }
- return iprev;
-}
-
-int fsmGetIndex(FSM_t fsm) {
- const FSMI_t iter = fsm->iter;
- return (iter ? iter->isave : -1);
-}
-#endif
-
#define SUFFIX_RPMORIG ".rpmorig"
#define SUFFIX_RPMSAVE ".rpmsave"
#define SUFFIX_RPMNEW ".rpmnew"
@@ -184,13 +168,14 @@ mapInitIterator(/*@kept@*/ const void * this, /*@kept@*/ const void * that)
TFI_t fi = (void *)that;
FSMI_t iter = NULL;
- if (fi) {
- iter = xcalloc(1, sizeof(*iter));
- iter->ts = ts;
- iter->fi = fi;
- iter->isave = iter->i = 0;
+ iter = xcalloc(1, sizeof(*iter));
+ iter->ts = ts;
+ iter->fi = fi;
+ switch (fi->type) {
+ case TR_ADDED: iter->i = 0; break;
+ case TR_REMOVED: iter->i = fi->fc - 1; break;
}
-
+ iter->isave = iter->i;
return iter;
}
@@ -199,126 +184,18 @@ mapInitIterator(/*@kept@*/ const void * this, /*@kept@*/ const void * that)
static int mapNextIterator(void * this) {
FSMI_t iter = this;
const TFI_t fi = iter->fi;
- int i;
-
- do {
- if (!((i = iter->i) < fi->fc))
- return -1;
- iter->i++;
- } while (0);
+ int i = -1;
+ switch (fi->type) {
+ case TR_ADDED: if (iter->i < fi->fc) i = iter->i++; break;
+ case TR_REMOVED: if (iter->i >= 0) i = iter->i--; break;
+ }
iter->isave = i;
-
return i;
}
-int pkgAction(const rpmTransactionSet ts, TFI_t fi, int i, /*@unused@*/fileStage a)
-{
- int nb = (!ts->chrootDone ? strlen(ts->rootDir) : 0);
- char * opath = alloca(nb + fi->dnlmax + fi->bnlmax + 64);
- char * o = (!ts->chrootDone ? stpcpy(opath, ts->rootDir) : opath);
- char * npath = alloca(nb + fi->dnlmax + fi->bnlmax + 64);
- char * n = (!ts->chrootDone ? stpcpy(npath, ts->rootDir) : npath);
- char * ext = NULL;
- int rc = 0;
-
- switch (fi->actions[i]) {
- case FA_REMOVE:
- break;
- case FA_BACKUP:
- if (fi->type == TR_REMOVED)
- break;
- /*@fallthrough@*/
- case FA_SKIP:
- case FA_SKIPMULTILIB:
- case FA_UNKNOWN:
- case FA_SKIPNSTATE:
- case FA_SKIPNETSHARED:
- case FA_SAVE:
- case FA_ALTNAME:
- case FA_CREATE:
- return 0;
- /*@notreached@*/ break;
- }
-
- rpmMessage(RPMMESS_DEBUG, _(" file: %s%s action: %s\n"),
- fi->dnl[fi->dil[i]], fi->bnl[i],
- fileActionString((fi->actions ? fi->actions[i] : FA_UNKNOWN)) );
-
- switch (fi->actions[i]) {
- case FA_SKIP:
- case FA_SKIPMULTILIB:
- case FA_UNKNOWN:
- case FA_CREATE:
- case FA_SKIPNSTATE:
- case FA_SKIPNETSHARED:
- case FA_ALTNAME:
- case FA_SAVE:
- return 0;
- /*@notreached@*/ break;
-
- case FA_BACKUP:
- ext = (fi->type == TR_ADDED ? SUFFIX_RPMORIG : SUFFIX_RPMSAVE);
- break;
-
- case FA_REMOVE:
- assert(fi->type == TR_REMOVED);
- /* Append file name to (possible) root dir. */
- (void) stpcpy( stpcpy(o, fi->dnl[fi->dil[i]]), fi->bnl[i]);
- if (S_ISDIR(fi->fmodes[i])) {
- rc = rmdir(opath);
- if (!rc) return rc;
- switch (errno) {
- case ENOENT: /* XXX rmdir("/") linux 2.2.x kernel hack */
- case ENOTEMPTY:
-#ifdef NOTYET
- if (fi->fflags[i] & RPMFILE_MISSINGOK)
- return 0;
-#endif
- rpmError(RPMERR_RMDIR,
- _("%s: cannot remove %s - directory not empty\n"),
- fiTypeString(fi), o);
- break;
- default:
- rpmError(RPMERR_RMDIR,
- _("%s rmdir of %s failed: %s\n"),
- fiTypeString(fi), o, strerror(errno));
- break;
- }
- return 1;
- /*@notreached@*/ break;
- }
- rc = unlink(opath);
- if (!rc) return rc;
- if (errno == ENOENT && (fi->fflags[i] & RPMFILE_MISSINGOK))
- return 0;
- rpmError(RPMERR_UNLINK, _("%s removal of %s failed: %s\n"),
- fiTypeString(fi), o, strerror(errno));
- return 1;
- }
-
- if (ext == NULL) return 0;
-
- /* Append file name to (possible) root dir. */
- (void) stpcpy( stpcpy(o, fi->dnl[fi->dil[i]]), fi->bnl[i]);
-
- /* XXX TR_REMOVED dinna do this. */
- rc = access(opath, F_OK);
- if (rc != 0) return 0;
-
- (void) stpcpy( stpcpy(n, o), ext);
- rpmMessage(RPMMESS_WARNING, _("%s: %s saved as %s\n"),
- fiTypeString(fi), o, n);
-
- rc = rename(opath, npath);
- if (!rc) return rc;
-
- rpmError(RPMERR_RENAME, _("%s rename of %s to %s failed: %s\n"),
- fiTypeString(fi), o, n, strerror(errno));
- return 1;
-
-}
-
+/**
+ */
typedef struct dnli_s {
/*@dependent@*/ TFI_t fi;
/*@only@*/ /*@null@*/ char * active;
@@ -506,31 +383,31 @@ static int saveHardLink(FSM_t fsm)
fsm->li->nsuffix = xcalloc(st->st_nlink, sizeof(*fsm->li->nsuffix));
fsm->li->files = xcalloc(st->st_nlink, sizeof(*fsm->li->files));
- if (fsm->goal == FSM_BUILD)
+ if (fsm->goal == FSM_PKGBUILD)
fsm->li->linksLeft = st->st_nlink;
- if (fsm->goal == FSM_INSTALL)
+ if (fsm->goal == FSM_PKGINSTALL)
fsm->li->linksLeft = 0;
fsm->li->next = fsm->links;
fsm->links = fsm->li;
}
- if (fsm->goal == FSM_BUILD) --fsm->li->linksLeft;
+ if (fsm->goal == FSM_PKGBUILD) --fsm->li->linksLeft;
fsm->li->filex[fsm->li->linksLeft] = fsm->ix;
fsm->li->files[fsm->li->linksLeft] = xstrdup(fsm->path);
/*@-observertrans@*/
fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix;
/*@=observertrans@*/
- if (fsm->goal == FSM_INSTALL) fsm->li->linksLeft++;
+ if (fsm->goal == FSM_PKGINSTALL) fsm->li->linksLeft++;
#if 0
fprintf(stderr, "*** %p link[%d:%d] %d filex %d %s\n", fsm->li, fsm->li->linksLeft, st->st_nlink, (int)st->st_size, fsm->li->filex[fsm->li->linksLeft], fsm->li->files[fsm->li->linksLeft]);
#endif
- if (fsm->goal == FSM_BUILD)
+ if (fsm->goal == FSM_PKGBUILD)
return (fsm->li->linksLeft > 0);
- if (fsm->goal != FSM_INSTALL)
+ if (fsm->goal != FSM_PKGINSTALL)
return 0;
if (!(st->st_size || fsm->li->linksLeft == st->st_nlink))
@@ -793,18 +670,18 @@ int fsmSetup(FSM_t fsm, fileStage goal,
const rpmTransactionSet ts, const TFI_t fi, FD_t cfd,
unsigned int * archiveSize, const char ** failedFile)
{
-#if 0
- rpmSetVerbosity(RPMMESS_DEBUG);
-#endif
+ size_t pos = 0;
+ int rc;
fsm->goal = goal;
if (cfd) {
fsm->cfd = fdLink(cfd, "persist (fsm)");
+ pos = fdGetCpioPos(fsm->cfd);
fdSetCpioPos(fsm->cfd, 0);
}
fsm->iter = mapInitIterator(ts, fi);
- if (fsm->goal == FSM_INSTALL) {
+ if (fsm->goal == FSM_PKGINSTALL) {
if (ts && ts->notify) {
(void)ts->notify(fi->h, RPMCALLBACK_INST_START, 0, fi->archiveSize,
(fi->ap ? fi->ap->key : NULL), ts->notifyData);
@@ -819,16 +696,28 @@ int fsmSetup(FSM_t fsm, fileStage goal,
*fsm->failedFile = NULL;
memset(fsm->sufbuf, 0, sizeof(fsm->sufbuf));
- if (fsm->goal != FSM_BUILD) {
+ if (fsm->goal == FSM_PKGINSTALL) {
if (ts->id > 0)
sprintf(fsm->sufbuf, ";%08x", (unsigned)ts->id);
}
- return fsmStage(fsm, FSM_CREATE);
+ rc = fsm->rc = 0;
+ rc = fsmStage(fsm, FSM_CREATE);
+
+ rc = fsmStage(fsm, fsm->goal);
+
+ if (!rc && fsm->archiveSize)
+ *fsm->archiveSize = (fdGetCpioPos(fsm->cfd) - pos);
+
+ return rc;
}
int fsmTeardown(FSM_t fsm) {
- int rc = 0;
+ int rc = fsm->rc;
+
+ if (!rc)
+ rc = fsmStage(fsm, FSM_DESTROY);
+
fsm->iter = mapFreeIterator(fsm->iter);
if (fsm->cfd) {
fsm->cfd = fdFree(fsm->cfd, "persist (fsm)");
@@ -854,7 +743,8 @@ int fsmMapPath(FSM_t fsm)
if (fi && i >= 0 && i < fi->fc) {
fsm->astriplen = fi->astriplen;
- fsm->action = (fi->actions ? fi->actions[i] : FA_UNKNOWN);
+ fsm->action = (fi->actions ? fi->actions[i] : fi->action);
+ fsm->fflags = (fi->fflags ? fi->fflags[i] : fi->flags);
fsm->mapFlags = (fi->fmapflags ? fi->fmapflags[i] : fi->mapflags);
/* src rpms have simple base name in payload. */
@@ -865,7 +755,7 @@ int fsmMapPath(FSM_t fsm)
switch (fsm->action) {
case FA_SKIP:
-if (_fsm_debug)
+if (_fsm_debug && !(fsm->goal == FSM_PKGERASE || fsm->goal == FSM_PKGCOMMIT))
fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
break;
case FA_SKIPMULTILIB: /* XXX RPMFILE_STATE_MULTILIB? */
@@ -876,6 +766,8 @@ fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action
break;
case FA_CREATE:
+if (_fsm_debug && !(fsm->goal == FSM_PKGINSTALL || fsm->goal == FSM_PKGCOMMIT))
+fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
assert(fi->type == TR_ADDED);
break;
@@ -916,7 +808,7 @@ fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action
assert(fi->type == TR_ADDED);
fsm->osuffix = SUFFIX_RPMSAVE;
break;
- case FA_REMOVE:
+ case FA_ERASE:
fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
assert(fi->type == TR_REMOVED);
break;
@@ -1241,13 +1133,14 @@ static int fsmCommitLinks(FSM_t fsm)
}
for (i = 0; i < fsm->li->nlink; i++) {
+ if (fsm->li->filex[i] < 0) continue;
if (fsm->li->files[i] == NULL) continue;
fsm->ix = fsm->li->filex[i];
rc = fsmStage(fsm, FSM_MAP);
rc = fsmStage(fsm, FSM_COMMIT);
fsm->path = _free(fsm->path);
- fsm->li->files[i] = _free(fsm->li->files[i]);
fsm->li->filex[i] = -1;
+ fsm->li->files[i] = _free(fsm->li->files[i]);
}
fsm->ix = iterIndex;
@@ -1295,17 +1188,92 @@ int fsmStage(FSM_t fsm, fileStage stage)
switch (stage) {
case FSM_UNKNOWN:
break;
- case FSM_INSTALL:
+ case FSM_PKGINSTALL:
+ while (1) {
+ /* Clean fsm, free'ing memory. Read next archive header. */
+ rc = fsmStage(fsm, FSM_INIT);
+
+ /* Exit on end-of-payload. */
+ if (rc == CPIOERR_HDR_TRAILER) {
+ rc = 0;
+ break;
+ }
+
+ /* Exit on error. */
+ if (rc) {
+ fsm->postpone = 1;
+ (void) fsmStage(fsm, FSM_UNDO);
+ break;
+ }
+
+ /* Extract file from archive. */
+ rc = fsmStage(fsm, FSM_PROCESS);
+ if (rc) {
+ (void) fsmStage(fsm, FSM_UNDO);
+ break;
+ }
+
+ /* Notify on success. */
+ (void) fsmStage(fsm, FSM_NOTIFY);
+
+ if (fsmStage(fsm, FSM_FINI))
+ break;
+ }
break;
- case FSM_ERASE:
+ case FSM_PKGERASE:
+ case FSM_PKGCOMMIT:
+ while (1) {
+ /* Clean fsm, free'ing memory. */
+ rc = fsmStage(fsm, FSM_INIT);
+
+ /* Exit on end-of-payload. */
+ if (rc == CPIOERR_HDR_TRAILER) {
+ rc = 0;
+ break;
+ }
+
+ /* Rename/erase next item. */
+ if (fsmStage(fsm, FSM_FINI))
+ break;
+ }
break;
- case FSM_BUILD:
+ case FSM_PKGBUILD:
+ while (1) {
+
+ rc = fsmStage(fsm, FSM_INIT);
+
+ /* Exit on end-of-payload. */
+ if (rc == CPIOERR_HDR_TRAILER) {
+ rc = 0;
+ break;
+ }
+
+ /* Exit on error. */
+ if (rc) {
+ fsm->postpone = 1;
+ (void) fsmStage(fsm, FSM_UNDO);
+ break;
+ }
+
+ /* Copy file into archive. */
+ rc = fsmStage(fsm, FSM_PROCESS);
+ if (rc) {
+ (void) fsmStage(fsm, FSM_UNDO);
+ break;
+ }
+
+ if (fsmStage(fsm, FSM_FINI))
+ break;
+ }
+
+ if (!rc)
+ rc = fsmStage(fsm, FSM_TRAILER);
break;
case FSM_CREATE:
{ rpmTransactionSet ts = fsmGetTs(fsm);
#define _tsmask (RPMTRANS_FLAG_PKGCOMMIT | RPMTRANS_FLAG_COMMIT)
fsm->commit = ((ts && (ts->transFlags & _tsmask) &&
- fsm->goal != FSM_COMMIT) ? 0 : 1);
+ fsm->goal != FSM_PKGCOMMIT) ? 0 : 1);
#undef _tsmask
}
fsm->path = _free(fsm->path);
@@ -1318,7 +1286,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
fsm->rdsize = fsm->wrsize = 0;
fsm->rdbuf = fsm->rdb = _free(fsm->rdb);
fsm->wrbuf = fsm->wrb = _free(fsm->wrb);
- if (fsm->goal == FSM_INSTALL || fsm->goal == FSM_BUILD) {
+ if (fsm->goal == FSM_PKGINSTALL || fsm->goal == FSM_PKGBUILD) {
fsm->rdsize = 8 * BUFSIZ;
fsm->rdbuf = fsm->rdb = xmalloc(fsm->rdsize);
fsm->wrsize = 8 * BUFSIZ;
@@ -1347,7 +1315,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
fsm->osuffix = NULL;
fsm->nsuffix = NULL;
- if (fsm->goal == FSM_INSTALL) {
+ if (fsm->goal == FSM_PKGINSTALL) {
/* Detect and create directories not explicitly in package. */
if (!fsm->mkdirsdone) {
rc = fsmStage(fsm, FSM_MKDIRS);
@@ -1360,17 +1328,17 @@ int fsmStage(FSM_t fsm, fileStage stage)
if (rc) break;
/* Identify mapping index. */
- fsm->ix = ((fsm->goal == FSM_INSTALL)
+ fsm->ix = ((fsm->goal == FSM_PKGINSTALL)
? mapFind(fsm->iter, fsm->path) : mapNextIterator(fsm->iter));
- /* On build, detect end-of-loop. */
- if ((fsm->goal == FSM_BUILD || fsm->goal == FSM_COMMIT) && fsm->ix < 0) {
+ /* On non-install, detect end-of-loop. */
+ if (fsm->goal != FSM_PKGINSTALL && fsm->ix < 0) {
rc = CPIOERR_HDR_TRAILER;
break;
}
- /* On commit, the mode must be known so that dirs don't get suffix. */
- if (fsm->goal == FSM_COMMIT) {
+ /* On non-install, mode must be known so that dirs don't get suffix. */
+ if (fsm->goal != FSM_PKGINSTALL) {
TFI_t fi = fsmGetFi(fsm);
st->st_mode = fi->fmodes[fsm->ix];
}
@@ -1393,7 +1361,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
if (rc) break;
/* On non-install, the disk file stat is what's remapped. */
- if (fsm->goal != FSM_INSTALL)
+ if (fsm->goal != FSM_PKGINSTALL)
*st = *ost; /* structure assignment */
/* Remap file perms, owner, and group. */
@@ -1401,7 +1369,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
if (rc) break;
fsm->postpone = XFA_SKIPPING(fsm->action);
- if (fsm->goal == FSM_INSTALL || fsm->goal == FSM_BUILD) {
+ if (fsm->goal == FSM_PKGINSTALL || fsm->goal == FSM_PKGBUILD) {
if (!S_ISDIR(st->st_mode) && st->st_nlink > 1)
fsm->postpone = saveHardLink(fsm);
}
@@ -1534,12 +1502,12 @@ int fsmStage(FSM_t fsm, fileStage stage)
break;
case FSM_PROCESS:
if (fsm->postpone) {
- if (fsm->goal == FSM_INSTALL)
+ if (fsm->goal == FSM_PKGINSTALL)
rc = fsmStage(fsm, FSM_EAT);
break;
}
- if (fsm->goal == FSM_BUILD) {
+ if (fsm->goal == FSM_PKGBUILD) {
if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) {
struct hardLink * li, * prev;
rc = writeLinkedFile(fsm);
@@ -1560,7 +1528,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
break;
}
- if (fsm->goal != FSM_INSTALL)
+ if (fsm->goal != FSM_PKGINSTALL)
break;
if (S_ISREG(st->st_mode)) {
@@ -1637,7 +1605,7 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
case FSM_MKLINKS:
break;
case FSM_NOTIFY: /* XXX move from fsm to psm -> tsm */
- if (fsm->goal == FSM_INSTALL || fsm->goal == FSM_BUILD) {
+ if (fsm->goal == FSM_PKGINSTALL || fsm->goal == FSM_PKGBUILD) {
rpmTransactionSet ts = fsmGetTs(fsm);
TFI_t fi = fsmGetFi(fsm);
if (ts && ts->notify && fi)
@@ -1649,7 +1617,7 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
case FSM_UNDO:
if (fsm->postpone)
break;
- if (fsm->goal == FSM_INSTALL) {
+ if (fsm->goal == FSM_PKGINSTALL) {
(void) fsmStage(fsm,
(S_ISDIR(st->st_mode) ? FSM_RMDIR : FSM_UNLINK));
@@ -1663,11 +1631,13 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
*fsm->failedFile = xstrdup(fsm->path);
break;
case FSM_FINI:
- if (!fsm->postpone) {
- if (fsm->goal == FSM_INSTALL && fsm->commit)
+ if (!fsm->postpone && fsm->commit) {
+ if (fsm->goal == FSM_PKGINSTALL)
rc = ((!S_ISDIR(st->st_mode) && st->st_nlink > 1)
? fsmCommitLinks(fsm) : fsmStage(fsm, FSM_COMMIT));
- if (fsm->goal == FSM_COMMIT && fsm->commit)
+ if (fsm->goal == FSM_PKGCOMMIT)
+ rc = fsmStage(fsm, FSM_COMMIT);
+ if (fsm->goal == FSM_PKGERASE)
rc = fsmStage(fsm, FSM_COMMIT);
}
fsm->path = _free(fsm->path);
@@ -1676,7 +1646,7 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
memset(ost, 0, sizeof(*ost));
break;
case FSM_COMMIT:
- /* Rename pre-existing, modified or unmanaged file. */
+ /* Rename pre-existing modified or unmanaged file. */
if (fsm->diskchecked && fsm->exists && fsm->osuffix) {
const char * opath = fsm->opath;
const char * path = fsm->path;
@@ -1692,6 +1662,44 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
fsm->opath = _free(fsm->opath);
fsm->opath = opath;
}
+
+ /* Remove erased files. */
+ if (fsm->goal == FSM_PKGERASE) {
+ if (fsm->action == FA_ERASE) {
+ TFI_t fi = fsmGetFi(fsm);
+ if (S_ISDIR(st->st_mode)) {
+ rc = fsmStage(fsm, FSM_RMDIR);
+ if (!rc) break;
+ switch (errno) {
+ case ENOENT: /* XXX rmdir("/") linux 2.2.x kernel hack */
+ case ENOTEMPTY:
+ /* XXX make sure that build side permits %missingok on directories. */
+ if (fsm->fflags & RPMFILE_MISSINGOK)
+ break;
+
+ /* XXX common error message. */
+ rpmError(RPMERR_RMDIR,
+ _("%s rmdir of %s failed: Directory not empty\n"),
+ fiTypeString(fi), fsm->path);
+ break;
+ default:
+ rpmError(RPMERR_RMDIR,
+ _("%s rmdir of %s failed: %s\n"),
+ fiTypeString(fi), fsm->path, strerror(errno));
+ break;
+ }
+ } else {
+ rc = fsmStage(fsm, FSM_UNLINK);
+ if (!rc) break;
+ if (!(errno == ENOENT && (fsm->fflags & RPMFILE_MISSINGOK)))
+ rpmError(RPMERR_UNLINK,
+ _("%s unlink of %s failed: %s\n"),
+ fiTypeString(fi), fsm->path, strerror(errno));
+ }
+ }
+ break;
+ }
+
if (!S_ISSOCK(st->st_mode)) { /* XXX /dev/log et al are skipped */
/* Rename temporary to final file name. */
if (!S_ISDIR(st->st_mode) &&
@@ -1726,6 +1734,7 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
}
}
}
+
/* Notify on success. */
if (!rc) rc = fsmStage(fsm, FSM_NOTIFY);
break;
@@ -1736,7 +1745,7 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
while ((fsm->li = fsm->links) != NULL) {
fsm->links = fsm->li->next;
fsm->li->next = NULL;
- if (fsm->goal == FSM_INSTALL && fsm->commit && fsm->li->linksLeft) {
+ if (fsm->goal == FSM_PKGINSTALL && fsm->commit && fsm->li->linksLeft) {
for (i = 0 ; i < fsm->li->linksLeft; i++) {
if (fsm->li->filex[i] < 0) continue;
rc = CPIOERR_MISSING_HARDLINK;
@@ -1746,7 +1755,7 @@ rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), fsm->opath, fsm->path);
break;
}
}
- if (fsm->goal == FSM_BUILD) {
+ if (fsm->goal == FSM_PKGBUILD) {
rc = CPIOERR_MISSING_HARDLINK;
}
fsm->li = freeHardLink(fsm->li);
@@ -2087,6 +2096,7 @@ if (fsm->rdnb != fsm->wrnb) fprintf(stderr, "*** short write: had %d, got %d\n",
return rc;
}
+#ifdef DYING
/** @todo Verify payload MD5 sum. */
int cpioInstallArchive(FSM_t fsm)
{
@@ -2108,7 +2118,7 @@ int cpioInstallArchive(FSM_t fsm)
rc = 0;
break;
}
- if (fsm->goal == FSM_INSTALL) {
+ if (fsm->goal == FSM_PKGINSTALL) {
if (rc) {
fsm->postpone = 1;
(void) fsmStage(fsm, FSM_UNDO);
@@ -2143,7 +2153,9 @@ int cpioInstallArchive(FSM_t fsm)
exit:
return rc;
}
+#endif
+#ifdef DYING
int cpioBuildArchive(FSM_t fsm)
{
size_t pos = fdGetCpioPos(fsm->cfd);
@@ -2182,6 +2194,7 @@ int cpioBuildArchive(FSM_t fsm)
exit:
return rc;
}
+#endif
const char *const cpioStrerror(int rc)
{
diff --git a/lib/cpio.h b/lib/cpio.h
index a7747b923..878d9372f 100644
--- a/lib/cpio.h
+++ b/lib/cpio.h
@@ -69,6 +69,7 @@ typedef enum cpioMapFlags_e {
extern "C" {
#endif
+#ifdef DYING
/** \ingroup payload
* The RPM internal equivalent of the command line "cpio -i".
*
@@ -93,6 +94,7 @@ int cpioInstallArchive(FSM_t fsm)
*/
int cpioBuildArchive(FSM_t fsm)
/*@modifies fileSystem, fsm @*/;
+#endif
/** \ingroup payload
* Return formatted error message on payload handling failure.
diff --git a/lib/install.c b/lib/install.c
index c54b76dca..4933a8640 100644
--- a/lib/install.c
+++ b/lib/install.c
@@ -436,22 +436,24 @@ static int installArchive(const rpmTransactionSet ts, TFI_t fi, int allFiles)
t = stpcpy(t, ".bzdio");
}
- {
- FD_t cfd;
- (void) Fflush(alp->fd);
+ { FD_t cfd;
cfd = Fdopen(fdDup(Fileno(alp->fd)), rpmio_flags);
cfd = fdLink(cfd, "persist (installArchive");
- rc = fsmSetup(fi->fsm, FSM_INSTALL, ts, fi, cfd, NULL, &failedFile);
+ rc = fsmSetup(fi->fsm, FSM_PKGINSTALL, ts, fi, cfd, NULL, &failedFile);
+#ifdef DYING
rc = cpioInstallArchive(fi->fsm);
+#endif
saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
Fclose(cfd);
(void) fsmTeardown(fi->fsm);
if (!rc && ts->transFlags & RPMTRANS_FLAG_PKGCOMMIT) {
- rc = fsmSetup(fi->fsm, FSM_COMMIT, ts, fi, NULL, NULL, &failedFile);
+ rc = fsmSetup(fi->fsm, FSM_PKGCOMMIT, ts, fi, NULL, NULL, &failedFile);
+#ifdef DYING
rc = cpioInstallArchive(fi->fsm);
+#endif
(void) fsmTeardown(fi->fsm);
}
}
@@ -729,6 +731,7 @@ int installBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
HGE_t hge = (HGE_t)fi->hge;
/*@observer@*/ static char * stepName = " install";
Header oldH = NULL;
+ int chrootDone = 0;
int otherOffset = 0;
int ec = 2; /* assume error return */
int rc;
@@ -809,7 +812,7 @@ int installBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
goto exit;
}
- if (ts->rootDir) {
+ if (ts->rootDir && !ts->chrootDone) {
static int _loaded = 0;
/*
@@ -824,7 +827,7 @@ int installBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
chdir("/");
/*@-unrecog@*/ chroot(ts->rootDir); /*@=unrecog@*/
- ts->chrootDone = 1;
+ chrootDone = ts->chrootDone = 1;
}
if (fi->fc > 0 && !(ts->transFlags & RPMTRANS_FLAG_JUSTDB)) {
@@ -854,9 +857,9 @@ int installBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
goto exit;
}
- if (ts->rootDir) {
+ if (ts->rootDir && chrootDone) {
/*@-unrecog@*/ chroot("."); /*@=unrecog@*/
- ts->chrootDone = 0;
+ chrootDone = ts->chrootDone = 0;
chdir(ts->currDir);
}
diff --git a/lib/rollback.c b/lib/rollback.c
index 0ba8661a5..6fadd03ba 100644
--- a/lib/rollback.c
+++ b/lib/rollback.c
@@ -68,12 +68,16 @@ void loadFi(Header h, TFI_t fi)
hge(fi->h, RPMTAG_FILESIZES, NULL, (void **) &fi->fsizes, NULL);
hge(fi->h, RPMTAG_FILESTATES, NULL, (void **) &fi->fstates, NULL);
+ fi->action = FA_UNKNOWN;
+ fi->flags = 0;
+
/* actions is initialized earlier for added packages */
if (fi->actions == NULL)
fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
switch (fi->type) {
case TR_ADDED:
+ fi->mapflags = CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID;
hge(fi->h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL);
hge(fi->h, RPMTAG_FILELINKTOS, NULL, (void **) &fi->flinks, NULL);
hge(fi->h, RPMTAG_FILELANGS, NULL, (void **) &fi->flangs, NULL);
@@ -84,6 +88,7 @@ void loadFi(Header h, TFI_t fi)
break;
case TR_REMOVED:
+ fi->mapflags = CPIO_MAP_PATH;
hge(fi->h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL);
hge(fi->h, RPMTAG_FILELINKTOS, NULL, (void **) &fi->flinks, NULL);
fi->fsizes = memcpy(xmalloc(fi->fc * sizeof(*fi->fsizes)),
@@ -179,6 +184,13 @@ void freeFi(TFI_t fi)
/*@observer@*/ const char *const fileStageString(fileStage a) {
switch(a) {
case FSM_UNKNOWN: return "unknown";
+
+ case FSM_PKGINSTALL:return "pkginstall";
+ case FSM_PKGERASE: return "pkgerase";
+ case FSM_PKGBUILD: return "pkgbuild";
+ case FSM_PKGCOMMIT: return "pkgcommit";
+ case FSM_PKGUNDO: return "pkgundo";
+
case FSM_CREATE: return "create";
case FSM_INIT: return "init";
case FSM_MAP: return "map";
@@ -243,7 +255,7 @@ void freeFi(TFI_t fi)
case FA_SAVE: return "save";
case FA_SKIP: return "skip";
case FA_ALTNAME: return "altname";
- case FA_REMOVE: return "remove";
+ case FA_ERASE: return "erase";
case FA_SKIPNSTATE: return "skipnstate";
case FA_SKIPNETSHARED: return "skipnetshared";
case FA_SKIPMULTILIB: return "skipmultilib";
@@ -252,6 +264,7 @@ void freeFi(TFI_t fi)
/*@notreached@*/
}
+#ifdef DYING
/**
*/
struct pkgIterator {
@@ -319,3 +332,4 @@ int pkgActions(const rpmTransactionSet ts, TFI_t fi, fileStage a)
}
return rc;
}
+#endif
diff --git a/lib/rollback.h b/lib/rollback.h
index bb5e7ce41..fee35ea3d 100644
--- a/lib/rollback.h
+++ b/lib/rollback.h
@@ -32,19 +32,21 @@ typedef enum fileStage_e {
FSM_UNDO = 5,
FSM_FINI = 6,
- FSM_INSTALL = 7,
- FSM_ERASE = 8,
- FSM_BUILD = 9,
-
- FSM_CREATE = _fi(17),
- FSM_MAP = _fi(18),
+ FSM_PKGINSTALL = 7,
+ FSM_PKGERASE = 8,
+ FSM_PKGBUILD = 9,
+ FSM_PKGCOMMIT = 10,
+ FSM_PKGUNDO = 11,
+
+ FSM_CREATE = _fd(17),
+ FSM_MAP = _fd(18),
FSM_MKDIRS = _fi(19),
FSM_RMDIRS = _fi(20),
FSM_MKLINKS = _fi(21),
FSM_NOTIFY = _fd(22),
- FSM_DESTROY = _fi(23),
+ FSM_DESTROY = _fd(23),
FSM_VERIFY = _fd(24),
- FSM_COMMIT = _fi(25),
+ FSM_COMMIT = _fd(25),
FSM_UNLINK = _fs(33),
FSM_RENAME = _fs(34),
@@ -92,7 +94,7 @@ typedef enum fileAction_e {
FA_SAVE, /*!< ... renamed with ".rpmsave" extension. */
FA_SKIP, /*!< ... already replaced, don't remove. */
FA_ALTNAME, /*!< ... create with ".rpmnew" extension. */
- FA_REMOVE, /*!< ... to be removed. */
+ FA_ERASE, /*!< ... to be removed. */
FA_SKIPNSTATE, /*!< ... untouched, state "not installed". */
FA_SKIPNETSHARED, /*!< ... untouched, state "netshared". */
FA_SKIPMULTILIB, /*!< ... untouched. @todo state "multilib" ???. */
@@ -131,6 +133,7 @@ enum fileTypes {
struct transactionFileInfo_s {
/* for all packages */
enum rpmTransactionType type;
+ fileAction action; /*!< File disposition default. */
/*@owned@*/ fileAction * actions; /*!< File disposition(s) */
/*@owned@*/ struct fingerPrint_s * fps; /*!< File fingerprint(s) */
HGE_t hge; /*!< Vector to headerGetEntry() */
@@ -140,6 +143,7 @@ struct transactionFileInfo_s {
/*@owned@*/ const char * version;
/*@owned@*/ const char * release;
int_32 epoch;
+ uint_32 flags; /*!< File flag default. */
const uint_32 * fflags; /*!< File flag(s) (from header) */
const uint_32 * fsizes; /*!< File size(s) (from header) */
const uint_32 * fmtimes; /*!< File modification time(s) (from header) */
@@ -239,6 +243,7 @@ void freeFi(TFI_t fi)
*/
/*@observer@*/ const char *const fileActionString(fileAction a);
+#ifdef DYING
/**
* Perform package install/remove actions for s single file.
* @todo Eliminate.
@@ -259,6 +264,7 @@ int pkgAction(const rpmTransactionSet ts, TFI_t fi, int i, fileStage a);
* @return 0 on success, otherwise no. of failures
*/
int pkgActions(const rpmTransactionSet ts, TFI_t fi, fileStage a);
+#endif
/**
* Load external data into file state machine.
diff --git a/lib/transaction.c b/lib/transaction.c
index d280b1633..a2b6260a7 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1081,7 +1081,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht,
case TR_REMOVED:
if (otherPkgNum >= 0) {
/* Here is an overlapped added file we don't want to nuke. */
- if (recs[otherPkgNum]->actions[otherFileNum] != FA_REMOVE) {
+ if (recs[otherPkgNum]->actions[otherFileNum] != FA_ERASE) {
/* On updates, don't remove files. */
fi->actions[i] = FA_SKIP;
break;
@@ -1094,7 +1094,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht,
if (fi->fstates[i] != RPMFILE_STATE_NORMAL)
break;
if (!(S_ISREG(fi->fmodes[i]) && (fi->fflags[i] & RPMFILE_CONFIG))) {
- fi->actions[i] = FA_REMOVE;
+ fi->actions[i] = FA_ERASE;
break;
}
@@ -1105,7 +1105,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht,
break;
}
}
- fi->actions[i] = FA_REMOVE;
+ fi->actions[i] = FA_ERASE;
break;
}
@@ -1130,7 +1130,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht,
ds->bneeded -= BLOCK_ROUND(fi->replacedSizes[i], ds->bsize);
break;
- case FA_REMOVE:
+ case FA_ERASE:
ds->ineeded--;
ds->bneeded -= s;
break;
diff --git a/lib/uninstall.c b/lib/uninstall.c
index f8542e5fe..62f1c4e0c 100644
--- a/lib/uninstall.c
+++ b/lib/uninstall.c
@@ -18,6 +18,8 @@ int removeBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
{
/*@observer@*/ static char * stepName = " erase";
Header h;
+ int chrootDone = 0;
+ const char * failedFile = NULL;
const void * pkgKey = NULL;
int rc = 0;
@@ -48,6 +50,12 @@ int removeBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
rpmdbFreeIterator(mi);
}
+ if (ts->rootDir && !ts->chrootDone) {
+ chdir("/");
+ /*@-unrecog@*/ chroot(ts->rootDir); /*@=unrecog@*/
+ chrootDone = ts->chrootDone = 1;
+ }
+
if (!(ts->transFlags & RPMTRANS_FLAG_NOTRIGGERS)) {
/* run triggers from this package which are keyed on installed
packages */
@@ -73,7 +81,11 @@ int removeBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
(void)ts->notify(h, RPMCALLBACK_UNINST_START, fi->fc, fi->fc,
pkgKey, ts->notifyData);
- rc = pkgActions(ts, fi, FSM_COMMIT);
+ rc = fsmSetup(fi->fsm, FSM_PKGERASE, ts, fi, NULL, NULL, &failedFile);
+#ifdef DYING
+ rc = cpioInstallArchive(fi->fsm);
+#endif
+ (void) fsmTeardown(fi->fsm);
if (ts->notify)
(void)ts->notify(h, RPMCALLBACK_UNINST_STOP, 0, fi->fc,
@@ -94,6 +106,12 @@ int removeBinaryPackage(const rpmTransactionSet ts, TFI_t fi)
return 2;
}
+ if (ts->rootDir && chrootDone) {
+ /*@-unrecog@*/ chroot("."); /*@=unrecog@*/
+ chrootDone = ts->chrootDone = 0;
+ chdir(ts->currDir);
+ }
+
if (!(ts->transFlags & RPMTRANS_FLAG_TEST))
rpmdbRemove(ts->rpmdb, ts->id, fi->record);
diff --git a/po/rpm.pot b/po/rpm.pot
index 7cd46624d..b2b23584c 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-02-06 17:33-0500\n"
+"POT-Creation-Date: 2001-02-08 16:37-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"
@@ -1472,7 +1472,7 @@ msgstr ""
msgid "no tar files given for build"
msgstr ""
-#: build/build.c:114 build/pack.c:383
+#: build/build.c:114 build/pack.c:385
msgid "Unable to open temp file.\n"
msgstr ""
@@ -1662,7 +1662,7 @@ msgstr ""
msgid "Could not open %%files file %s: %s\n"
msgstr ""
-#: build/files.c:1464 build/pack.c:119
+#: build/files.c:1464 build/pack.c:121
#, c-format
msgid "line: %s\n"
msgstr ""
@@ -1729,126 +1729,126 @@ msgstr ""
msgid "Could not canonicalize hostname: %s\n"
msgstr ""
-#: build/pack.c:63
+#: build/pack.c:65
#, c-format
msgid "create archive failed on file %s: %s\n"
msgstr ""
-#: build/pack.c:85
+#: build/pack.c:87
#, c-format
msgid "cpio_copy write failed: %s\n"
msgstr ""
-#: build/pack.c:92
+#: build/pack.c:94
#, c-format
msgid "cpio_copy read failed: %s\n"
msgstr ""
-#: build/pack.c:176
+#: build/pack.c:178
#, c-format
msgid "Could not open PreIn file: %s\n"
msgstr ""
-#: build/pack.c:183
+#: build/pack.c:185
#, c-format
msgid "Could not open PreUn file: %s\n"
msgstr ""
-#: build/pack.c:190
+#: build/pack.c:192
#, c-format
msgid "Could not open PostIn file: %s\n"
msgstr ""
-#: build/pack.c:197
+#: build/pack.c:199
#, c-format
msgid "Could not open PostUn file: %s\n"
msgstr ""
-#: build/pack.c:205
+#: build/pack.c:207
#, c-format
msgid "Could not open VerifyScript file: %s\n"
msgstr ""
-#: build/pack.c:220
+#: build/pack.c:222
#, c-format
msgid "Could not open Trigger script file: %s\n"
msgstr ""
-#: build/pack.c:246
+#: build/pack.c:248
#, c-format
msgid "readRPM: open %s: %s\n"
msgstr ""
-#: build/pack.c:256
+#: build/pack.c:258
#, c-format
msgid "readRPM: read %s: %s\n"
msgstr ""
-#: build/pack.c:277
+#: build/pack.c:279
#, c-format
msgid "readRPM: %s is not an RPM package\n"
msgstr ""
-#: build/pack.c:283
+#: build/pack.c:285
#, c-format
msgid "readRPM: reading header from %s\n"
msgstr ""
-#: build/pack.c:395
+#: build/pack.c:397
msgid "Bad CSA data\n"
msgstr ""
-#: build/pack.c:436
+#: build/pack.c:438
#, c-format
msgid "Generating signature: %d\n"
msgstr ""
-#: build/pack.c:446
+#: build/pack.c:448
#, c-format
msgid "Could not open %s: %s\n"
msgstr ""
-#: build/pack.c:483
+#: build/pack.c:485
#, c-format
msgid "Unable to write package: %s\n"
msgstr ""
-#: build/pack.c:498
+#: build/pack.c:500
#, c-format
msgid "Unable to open sigtarget %s: %s\n"
msgstr ""
-#: build/pack.c:508
+#: build/pack.c:510
#, c-format
msgid "Unable to read header from %s: %s\n"
msgstr ""
-#: build/pack.c:522
+#: build/pack.c:524
#, c-format
msgid "Unable to write header to %s: %s\n"
msgstr ""
-#: build/pack.c:532
+#: build/pack.c:534
#, c-format
msgid "Unable to read payload from %s: %s\n"
msgstr ""
-#: build/pack.c:538
+#: build/pack.c:540
#, c-format
msgid "Unable to write payload to %s: %s\n"
msgstr ""
-#: build/pack.c:565
+#: build/pack.c:567
#, c-format
msgid "Wrote: %s\n"
msgstr ""
-#: build/pack.c:630
+#: build/pack.c:632
#, c-format
msgid "Could not generate output filename for package %s: %s\n"
msgstr ""
-#: build/pack.c:647
+#: build/pack.c:649
#, c-format
msgid "cannot create %s: %s\n"
msgstr ""
@@ -2185,94 +2185,79 @@ msgstr ""
msgid "line %d: Bad %s number: %s\n"
msgstr ""
-#: lib/cpio.c:244
-#, c-format
-msgid " file: %s%s action: %s\n"
-msgstr ""
-
-#: lib/cpio.c:279
-#, c-format
-msgid "%s: cannot remove %s - directory not empty\n"
-msgstr ""
-
-#: lib/cpio.c:284
-#, c-format
-msgid "%s rmdir of %s failed: %s\n"
+#: lib/cpio.c:285
+msgid "========= Directories not explictly included in package:\n"
msgstr ""
-#: lib/cpio.c:295
+#: lib/cpio.c:287
#, c-format
-msgid "%s removal of %s failed: %s\n"
+msgid "%9d %s\n"
msgstr ""
-#: lib/cpio.c:310
+#: lib/cpio.c:1445
#, c-format
-msgid "%s: %s saved as %s\n"
+msgid "%s directory created with perms %04o.\n"
msgstr ""
-#: lib/cpio.c:316
+#: lib/cpio.c:1545 lib/cpio.c:1657
#, c-format
-msgid "%s rename of %s to %s failed: %s\n"
-msgstr ""
-
-#: lib/cpio.c:408
-msgid "========= Directories not explictly included in package:\n"
+msgid "%s saved as %s\n"
msgstr ""
-#: lib/cpio.c:410
+#: lib/cpio.c:1682
#, c-format
-msgid "%9d %s\n"
+msgid "%s rmdir of %s failed: Directory not empty\n"
msgstr ""
-#: lib/cpio.c:1477
+#: lib/cpio.c:1687
#, c-format
-msgid "%s directory created with perms %04o.\n"
+msgid "%s rmdir of %s failed: %s\n"
msgstr ""
-#: lib/cpio.c:1577 lib/cpio.c:1687
+#: lib/cpio.c:1696
#, c-format
-msgid "%s saved as %s\n"
+msgid "%s unlink of %s failed: %s\n"
msgstr ""
-#: lib/cpio.c:1705
+#: lib/cpio.c:1713
#, c-format
msgid "%s created as %s\n"
msgstr ""
-#: lib/cpio.c:2196
+#: lib/cpio.c:2209
#, c-format
msgid "(error 0x%x)"
msgstr ""
-#: lib/cpio.c:2199
+#: lib/cpio.c:2212
msgid "Bad magic"
msgstr ""
-#: lib/cpio.c:2200
+#: lib/cpio.c:2213
msgid "Bad/unreadable header"
msgstr ""
-#: lib/cpio.c:2221
+#: lib/cpio.c:2234
msgid "Header size too big"
msgstr ""
-#: lib/cpio.c:2222
+#: lib/cpio.c:2235
msgid "Unknown file type"
msgstr ""
-#: lib/cpio.c:2223
+#: lib/cpio.c:2236
msgid "Missing hard link"
msgstr ""
-#: lib/cpio.c:2224
+#: lib/cpio.c:2237
msgid "MD5 sum mismatch"
msgstr ""
-#: lib/cpio.c:2225
+#: lib/cpio.c:2238
msgid "Internal error"
msgstr ""
-#: lib/cpio.c:2234
+#: lib/cpio.c:2247
msgid " failed - "
msgstr ""
@@ -2651,52 +2636,52 @@ msgstr ""
#. * was used up - if so, we should return a different error.
#.
#. XXX FIXME: Fclose with libio destroys errno
-#: lib/install.c:465
+#: lib/install.c:467
#, c-format
msgid "unpacking of archive failed%s%s: %s\n"
msgstr ""
-#: lib/install.c:466
+#: lib/install.c:468
msgid " on file "
msgstr ""
-#: lib/install.c:507
+#: lib/install.c:509
#, c-format
msgid "cannot create %s %s\n"
msgstr ""
-#: lib/install.c:513
+#: lib/install.c:515
#, c-format
msgid "cannot write to %s\n"
msgstr ""
-#: lib/install.c:534
+#: lib/install.c:536
msgid "installing a source package\n"
msgstr ""
-#: lib/install.c:586
+#: lib/install.c:588
msgid "source package contains no .spec file\n"
msgstr ""
-#: lib/install.c:666
+#: lib/install.c:668
msgid "source package expected, binary found\n"
msgstr ""
-#: lib/install.c:736 lib/uninstall.c:24
+#: lib/install.c:739 lib/uninstall.c:26
#, c-format
msgid "%s: %s-%s-%s has %d files, test = %d\n"
msgstr ""
-#: lib/install.c:800 lib/install.c:899 lib/uninstall.c:62 lib/uninstall.c:83
+#: lib/install.c:803 lib/install.c:902 lib/uninstall.c:70 lib/uninstall.c:95
#, c-format
msgid "%s: running %s script(s) (if any)\n"
msgstr ""
-#: lib/install.c:807
+#: lib/install.c:810
msgid "skipping %s-%s-%s install, %%pre scriptlet failed rc %d\n"
msgstr ""
-#: lib/install.c:844
+#: lib/install.c:847
#, c-format
msgid " file: %s%s action: %s\n"
msgstr ""