summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2004-11-05 20:43:10 +0000
committerjbj <devnull@localhost>2004-11-05 20:43:10 +0000
commit945b4f65ef02782ed93443751fe3d8f455cf25af (patch)
treebeae4bc3f0ad5c2bc04e599f609c4862b17a3792 /lib
parent50596fe84b032b34dbc5c851eed2da67fc55d4fa (diff)
downloadrpm-945b4f65ef02782ed93443751fe3d8f455cf25af.tar.gz
rpm-945b4f65ef02782ed93443751fe3d8f455cf25af.tar.bz2
rpm-945b4f65ef02782ed93443751fe3d8f455cf25af.zip
w00t! rpm -q -W https://wellfleet.jbj.org/rawhide/test milestone!
CVS patchset: 7545 CVS date: 2004/11/05 20:43:10
Diffstat (limited to 'lib')
-rw-r--r--lib/signature.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/signature.c b/lib/signature.c
index 0eb0f7724..82d91edbb 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -124,8 +124,13 @@ static inline rpmRC printSize(FD_t fd, int siglen, int pad, int datalen)
/*@modifies fileSystem @*/
{
struct stat st;
+ int fdno = Fileno(fd);
- if (fstat(Fileno(fd), &st) < 0)
+ /* HACK: workaround for davRead wiring. */
+ if (fdno == 123456789) {
+ st.st_size = 0;
+ st.st_size -= sizeof(struct rpmlead)+siglen+pad+datalen;
+ } else if (fstat(fdno, &st) < 0)
return RPMRC_FAIL;
/*@-sizeoftype@*/
@@ -314,8 +319,12 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
}
/* Print package component sizes. */
- if (headerGetEntry(sigh, RPMSIGTAG_SIZE, NULL,(void **)&archSize, NULL))
+ if (headerGetEntry(sigh, RPMSIGTAG_SIZE, NULL,(void **)&archSize, NULL)) {
rc = printSize(fd, sigSize, pad, *archSize);
+ if (rc != RPMRC_OK)
+ (void) snprintf(buf, sizeof(buf),
+ _("sigh sigSize(%d): BAD, fstat(2) failed\n"), sigSize);
+ }
}
exit: