summaryrefslogtreecommitdiff
path: root/build/build.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-01-05 23:13:56 +0000
committerjbj <devnull@localhost>1999-01-05 23:13:56 +0000
commit8af5b5af8757e9385ea90770997b45f4f82c06db (patch)
treed6f50fbd74db96d5038a46d89223ab38bb7d5e9b /build/build.c
parentc7c985480ab320547dbdb977a0e8682c24710393 (diff)
downloadlibrpm-tizen-8af5b5af8757e9385ea90770997b45f4f82c06db.tar.gz
librpm-tizen-8af5b5af8757e9385ea90770997b45f4f82c06db.tar.bz2
librpm-tizen-8af5b5af8757e9385ea90770997b45f4f82c06db.zip
Expand path macros with rpmGetPath(path, ...).
CVS patchset: 2652 CVS date: 1999/01/05 23:13:56
Diffstat (limited to 'build/build.c')
-rw-r--r--build/build.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/build/build.c b/build/build.c
index b490a12cd..e3c486b67 100644
--- a/build/build.c
+++ b/build/build.c
@@ -10,26 +10,23 @@ static void doRmSource(Spec spec)
{
struct Source *p;
Package pkg;
- char buf[BUFSIZ];
unlink(spec->specFile);
for (p = spec->sources; p != NULL; p = p->next) {
if (! (p->flags & RPMBUILD_ISNO)) {
- strcpy(buf, "%{_sourcedir}/");
- expandMacros(spec, spec->macros, buf, sizeof(buf));
- strcat(buf, p->source);
- unlink(buf);
+ const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
+ unlink(fn);
+ xfree(fn);
}
}
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
for (p = pkg->icon; p != NULL; p = p->next) {
if (! (p->flags & RPMBUILD_ISNO)) {
- strcpy(buf, "%{_sourcedir}/");
- expandMacros(spec, spec->macros, buf, sizeof(buf));
- strcat(buf, p->source);
- unlink(buf);
+ const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
+ unlink(fn);
+ xfree(fn);
}
}
}