summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-01-13 20:24:00 +0000
committerjbj <devnull@localhost>1999-01-13 20:24:00 +0000
commitfc0c2ddc4ff37f2f220ef01134fb9597f50f1784 (patch)
treeeabe05466f74b9b2884626c0b88c566ba26f5bf4
parentbc0404541a5041b9745055cd9d7b226423c85084 (diff)
downloadlibrpm-tizen-fc0c2ddc4ff37f2f220ef01134fb9597f50f1784.tar.gz
librpm-tizen-fc0c2ddc4ff37f2f220ef01134fb9597f50f1784.tar.bz2
librpm-tizen-fc0c2ddc4ff37f2f220ef01134fb9597f50f1784.zip
Fix: sub-packages require name from header (which is not %{name}).
CVS patchset: 2699 CVS date: 1999/01/13 20:24:00
-rw-r--r--build/files.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/build/files.c b/build/files.c
index 3ba33f674..01ef6448c 100644
--- a/build/files.c
+++ b/build/files.c
@@ -685,10 +685,20 @@ static int parseForSimple(Spec spec, Package pkg, char *buf,
fl->processingFailed = 1;
res = 1;
} else {
- /* XXX FIXME: this is easy to do as macro expansion */
/* XXX WATCHOUT: buf is an arg */
- strcpy(buf, "%{_docdir}/%{name}-%{version}");
- expandMacros(spec, spec->macros, buf, BUFSIZ);
+ { const char *ddir, *name, *version;
+
+ headerGetEntry(pkg->header, RPMTAG_NAME, NULL,
+ (void *) &name, NULL);
+ headerGetEntry(pkg->header, RPMTAG_VERSION, NULL,
+ (void *) &version, NULL);
+
+ ddir = rpmGetPath("%{_docdir}/", name, "-", version, NULL);
+ strcpy(buf, ddir);
+ xfree(ddir);
+ }
+
+ /* XXX FIXME: this is easy to do as macro expansion */
if (! fl->passedSpecialDoc) {
pkg->specialDoc = newStringBuf();