diff options
author | jbj <devnull@localhost> | 1999-01-21 17:18:38 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-01-21 17:18:38 +0000 |
commit | 394f3cb1ddf52fa7829dab790e34f1dfa5886b5d (patch) | |
tree | 430b8c31fcb605b19572bf1c34e2dfcde93195c6 /lib | |
parent | 459dc6ef3eb334df673c514b67c1e343942b9a1c (diff) | |
download | librpm-tizen-394f3cb1ddf52fa7829dab790e34f1dfa5886b5d.tar.gz librpm-tizen-394f3cb1ddf52fa7829dab790e34f1dfa5886b5d.tar.bz2 librpm-tizen-394f3cb1ddf52fa7829dab790e34f1dfa5886b5d.zip |
Eliminate Makefile.inc dependence in subdirs.
Change "Bad header" to "Bad/unreadable header" for most common cpio failure.
CVS patchset: 2728
CVS date: 1999/01/21 17:18:38
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 5 | ||||
-rw-r--r-- | lib/Makefile.in | 2 | ||||
-rw-r--r-- | lib/cpio.c | 8 | ||||
-rw-r--r-- | lib/install.c | 6 |
4 files changed, 10 insertions, 11 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 6c8394dfb..d08dda5a6 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -22,11 +22,6 @@ librpm_a_SOURCES = \ rpmrc.c signature.c stringbuf.c tagtable.c \ tread.c uninstall.c verify.c transaction.c problems.c hash.c fprint.c -include ../Makefile.inc - -#rpmrc.o: rpmrc.c -# $(COMPILE) -DLIBRPMRC_FILENAME="\"$(LIBRPMRC_FILENAME)"\" -DMACROFILES=\"$(MACROFILES)\" -o $@ -c $< - tagtable.c: rpmlib.h @echo '#include "system.h"' > tagtable.c @echo '#include "rpmlib.h"' >> tagtable.c diff --git a/lib/Makefile.in b/lib/Makefile.in index 6cad45ec9..0d9aaed94 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -188,7 +188,7 @@ OBJECTS = $(librpm_a_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../Makefile.inc +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) diff --git a/lib/cpio.c b/lib/cpio.c index 3f632bf3d..2fcfe3dfb 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -528,8 +528,10 @@ int cpioInstallArchive(CFD_t *cfd, struct cpioFileMapping * mappings, ch.path = NULL; do { if ((rc = getNextHeader(cfd, &ch))) { +#if 0 /* XXX this is the failure point for an unreadable rpm */ fprintf(stderr, _("getNextHeader: %s\n"), cpioStrerror(rc)); - return CPIOERR_BAD_HEADER; +#endif + return rc; } if (!strcmp(ch.path, TRAILER)) { @@ -896,7 +898,7 @@ int cpioBuildArchive(CFD_t *cfd, struct cpioFileMapping * mappings, hlink = malloc(sizeof(*hlink)); hlink->next = hlinkList.next; hlinkList.next = hlink; - hlink->sb = sb; + hlink->sb = sb; /* structure assignment */ hlink->dev = sb.st_dev; hlink->inode = sb.st_ino; hlink->nlink = sb.st_nlink; @@ -984,7 +986,7 @@ const char * cpioStrerror(int rc) s = NULL; break; case CPIOERR_BAD_MAGIC: s = _("Bad magic"); break; - case CPIOERR_BAD_HEADER: s = _("Bad header"); break; + case CPIOERR_BAD_HEADER: s = _("Bad/unreadable header");break; case CPIOERR_OPEN_FAILED: s = "open"; break; case CPIOERR_CHMOD_FAILED: s = "chmod"; break; diff --git a/lib/install.c b/lib/install.c index a160b653a..4da3f6a50 100644 --- a/lib/install.c +++ b/lib/install.c @@ -614,8 +614,10 @@ static int installArchive(FD_t fd, struct fileInfo * files, if (rc) { /* this would probably be a good place to check if disk space was used up - if so, we should return a different error */ - rpmError(RPMERR_CPIO, _("unpacking of archive failed on file %s: %s"), - failedFile, cpioStrerror(rc)); + rpmError(RPMERR_CPIO, _("unpacking of archive failed%s%s: %s"), + (failedFile != NULL ? _(" on file") : ""), + (failedFile != NULL ? failedFile : ""), + cpioStrerror(rc)); return 1; } |