-@@ -739,9 +823,16 @@
- /**
- * Extract Elf dependencies.
- * @param fc file classifier
-+ * @param findprov 1 to enable provides
-+ * @param findreq 1 to enable requires
-+ * @param noautoprov _noautoprov regexps
-+ * @param noautoprov_c # of _noautoprov regexps
-+ * @param noautoreq _noautoreq regexps
-+ * @param noautoreq_c # of _noautoreq regexps
- * @return 0 on success
- */
--static int rpmfcELF(rpmfc fc)
-+static int rpmfcELF(rpmfc fc, int findprov, int findreq,
-+ regex_t *noautoprov, int noautoprov_c, regex_t *noautoreq, int noautoreq_c)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
- {
-@@ -844,26 +935,31 @@
- && !(filter_GLIBC_PRIVATE != 0
- && !strcmp(s, "GLIBC_PRIVATE")))
- {
-+ int doauto;
-+
- buf[0] = '\0';
- t = buf;
- t = stpcpy( stpcpy( stpcpy( stpcpy(t, soname), "("), s), ")");
-
-+ doauto = findprov && !rpmfcMatchRegexps(noautoprov, noautoprov_c, buf, 'P');
- #if !defined(__alpha__)
- if (isElf64)
- t = stpcpy(t, "(64bit)");
- #endif
- t++;
-+
-+ if (doauto) {
-+ /* Add to package provides. */
-+ ds = rpmdsSingle(RPMTAG_PROVIDES,
-+ buf, "", RPMSENSE_FIND_PROVIDES);
-+ xx = rpmdsMerge(&fc->provides, ds);
-+
-+ /* Add to file dependencies. */
-+ xx = rpmfcSaveArg(&fc->ddict,
-+ rpmfcFileDep(t, fc->ix, ds));
-
-- /* Add to package provides. */
-- ds = rpmdsSingle(RPMTAG_PROVIDES,
-- buf, "", RPMSENSE_FIND_PROVIDES);
-- xx = rpmdsMerge(&fc->provides, ds);
--
-- /* Add to file dependencies. */
-- xx = rpmfcSaveArg(&fc->ddict,
-- rpmfcFileDep(t, fc->ix, ds));
--
-- ds = rpmdsFree(ds);
-+ ds = rpmdsFree(ds);
-+ }
- }
- auxoffset += aux->vda_next;
- }
-@@ -904,25 +1000,30 @@
- && !(filter_GLIBC_PRIVATE != 0
- && !strcmp(s, "GLIBC_PRIVATE")))
- {
-+ int doauto;
-+
- buf[0] = '\0';
- t = buf;
- t = stpcpy( stpcpy( stpcpy( stpcpy(t, soname), "("), s), ")");
-
-+ doauto = findreq && !rpmfcMatchRegexps(noautoreq, noautoreq_c, buf, 'R');
- #if !defined(__alpha__)
- if (isElf64)
- t = stpcpy(t, "(64bit)");
- #endif
- t++;