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:
2785563
)
Unbreak handling of packages without epoch
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 2 Jun 2008 06:48:41 +0000
(09:48 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Mon, 2 Jun 2008 06:48:41 +0000
(09:48 +0300)
- rpmtdToString() returned NULL on empty data, rpmtdFormat() returns
(unknown type) which isn't exactly appropriate value for epoch...
lib/rpmte.c
patch
|
blob
|
history
diff --git
a/lib/rpmte.c
b/lib/rpmte.c
index
2212405
..
491a893
100644
(file)
--- a/
lib/rpmte.c
+++ b/
lib/rpmte.c
@@
-90,8
+90,11
@@
static void addTE(rpmts ts, rpmte p, Header h,
p->version = xstrdup(version);
p->release = xstrdup(release);
- headerGet(h, RPMTAG_EPOCH, &td, HEADERGET_MINMEM);
- p->epoch = rpmtdFormat(&td, RPMTD_FORMAT_STRING, NULL);
+ if (headerGet(h, RPMTAG_EPOCH, &td, HEADERGET_MINMEM)) {
+ p->epoch = rpmtdFormat(&td, RPMTD_FORMAT_STRING, NULL);
+ } else {
+ p->epoch = NULL;
+ }
p->arch = arch ? xstrdup(arch) : NULL;
p->archScore = arch ? rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch) : 0;