{
const char * fn = fc->fn[fc->ix];
char *buf = NULL;
+ char *mname = NULL;
StringBuf sb_stdout = NULL;
StringBuf sb_stdin;
char *av[2];
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;
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;
}
sb_stdout = freeStringBuf(sb_stdout);
free(buf);
+ free(mname);
return 0;
}
#%__find_obsoletes ???
#
-# Path to scripts to autogenerate per-interpreter package dependencies,
+# Path to scripts to autogenerate per-interpreter package dependencies.
+# If the script supports extra options they can be passed by defining
+# <helper_macro>_opts macro(s), eg in spec:
+# %define __ocaml_requires_opts -i Warnings
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmconfigdir}/rpmdeps {--provides|--requires}.