summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-07 12:09:00 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-10-07 12:09:00 +0300
commit0a2f3e12d25f0f71496cd2888b91b3399e23ca64 (patch)
tree94647b0ed184a3eb23722d128595845ccb7a2ee9 /build
parent468d5ab6cc1bd83bdef08d34e34d0cafc0c1d33b (diff)
downloadrpm-0a2f3e12d25f0f71496cd2888b91b3399e23ca64.tar.gz
rpm-0a2f3e12d25f0f71496cd2888b91b3399e23ca64.tar.bz2
rpm-0a2f3e12d25f0f71496cd2888b91b3399e23ca64.zip
Support passing extra options to dep generator scripts
Diffstat (limited to 'build')
-rw-r--r--build/rpmfc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 68c328b11..acdf9439c 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -326,6 +326,7 @@ static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
{
const char * fn = fc->fn[fc->ix];
char *buf = NULL;
+ char *mname = NULL;
StringBuf sb_stdout = NULL;
StringBuf sb_stdin;
char *av[2];
@@ -347,7 +348,7 @@ static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
case 'P':
if (fc->skipProv)
return 0;
- rasprintf(&buf, "%%{?__%s_provides}", nsdep);
+ mname = rstrscat(NULL, "__", nsdep, "_provides", NULL);
depsp = &fc->provides;
dsContext = RPMSENSE_FIND_PROVIDES;
tagN = RPMTAG_PROVIDENAME;
@@ -355,12 +356,13 @@ static int rpmfcHelper(rpmfc fc, unsigned char deptype, const char * nsdep)
case 'R':
if (fc->skipReq)
return 0;
- rasprintf(&buf, "%%{?__%s_requires}", nsdep);
+ mname = rstrscat(NULL, "__", nsdep, "_requires", NULL);
depsp = &fc->requires;
dsContext = RPMSENSE_FIND_REQUIRES;
tagN = RPMTAG_REQUIRENAME;
break;
}
+ rasprintf(&buf, "%%{?%s:%%{%s} %%{?%s_opts}}", mname, mname, mname);
av[0] = buf;
av[1] = NULL;
@@ -428,6 +430,7 @@ assert(EVR != NULL);
}
sb_stdout = freeStringBuf(sb_stdout);
free(buf);
+ free(mname);
return 0;
}