projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
152ec46
)
Log an error on short lead (RhBug:511101)
author
Panu Matilainen
<pmatilai@redhat.com>
Tue, 14 Jul 2009 11:25:58 +0000
(14:25 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Tue, 21 Jul 2009 06:52:27 +0000
(09:52 +0300)
- if lead read returns short without it being an IO error, treat it
as a case of "not an rpm package"
(cherry picked from commit
d8071161f98ff703846281466cccf880e9dcb5c5
)
lib/rpmlead.c
patch
|
blob
|
history
diff --git
a/lib/rpmlead.c
b/lib/rpmlead.c
index
7c21e26
..
14487f2
100644
(file)
--- a/
lib/rpmlead.c
+++ b/
lib/rpmlead.c
@@
-123,8
+123,10
@@
rpmRC rpmLeadRead(FD_t fd, rpmlead lead)
rpmlog(RPMLOG_ERR, _("read failed: %s (%d)\n"),
Fstrerror(fd), errno);
return RPMRC_FAIL;
+ } else {
+ rpmlog(RPMLOG_ERR, _("not an rpm package\n"));
+ return RPMRC_NOTFOUND;
}
- return RPMRC_NOTFOUND;
}
lead->type = ntohs(lead->type);
lead->archnum = ntohs(lead->archnum);