-@@ -739,9 +816,11 @@
- /**
- * Extract Elf dependencies.
- * @param fc file classifier
-+ * @param findprov 1 to enable provides
-+ * @param findreq 1 to enable requires
- * @return 0 on success
- */
--static int rpmfcELF(rpmfc fc)
-+static int rpmfcELF(rpmfc fc,int findprov,int findreq)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
- {
-@@ -853,17 +932,19 @@
- t = stpcpy(t, "(64bit)");
- #endif
- t++;
-+
-+ if (findprov) {
-+ /* Add to package provides. */
-+ ds = rpmdsSingle(RPMTAG_PROVIDES,
-+ buf, "", RPMSENSE_FIND_PROVIDES);
-+ xx = rpmdsMerge(&fc->provides, 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));
-+ /* Add to file dependencies. */
-+ xx = rpmfcSaveArg(&fc->ddict,
-+ rpmfcFileDep(t, fc->ix, ds));
-
-- ds = rpmdsFree(ds);
-+ ds = rpmdsFree(ds);
-+ }
- }
- auxoffset += aux->vda_next;
- }
-@@ -914,15 +995,17 @@
- #endif
- t++;
-
-- /* Add to package dependencies. */
-- ds = rpmdsSingle(RPMTAG_REQUIRENAME,
-- buf, "", RPMSENSE_FIND_REQUIRES);
-- xx = rpmdsMerge(&fc->requires, ds);
-+ if (findreq) {
-+ /* Add to package dependencies. */
-+ ds = rpmdsSingle(RPMTAG_REQUIRENAME,
-+ buf, "", RPMSENSE_FIND_REQUIRES);
-+ xx = rpmdsMerge(&fc->requires, ds);
-
-- /* Add to file dependencies. */
-- xx = rpmfcSaveArg(&fc->ddict,
-- rpmfcFileDep(t, fc->ix, ds));
-- ds = rpmdsFree(ds);
-+ /* Add to file dependencies. */
-+ xx = rpmfcSaveArg(&fc->ddict,
-+ rpmfcFileDep(t, fc->ix, ds));
-+ ds = rpmdsFree(ds);
-+ }
- }
- auxoffset += aux->vna_next;
- }
-@@ -947,6 +1030,7 @@
- /* Files with executable bit set only. */
- if (fc->skipReq || !(st->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
- /*@innercontinue@*/ continue;
-+ if (!findreq) continue;
- /* Add to package requires. */
- depsp = &fc->requires;
- tagN = RPMTAG_REQUIRENAME;
-@@ -959,6 +1043,7 @@
- /* Add to package provides. */
- if (fc->skipProv)
- /*@innercontinue@*/ continue;
-+ if (!findprov) continue;
- depsp = &fc->provides;
- tagN = RPMTAG_PROVIDENAME;
- dsContext = RPMSENSE_FIND_PROVIDES;
-@@ -997,7 +1082,7 @@
- /*@=branchstate =uniondef @*/
-
- /* For DSO's, provide the basename of the file if DT_SONAME not found. */
-- if (!fc->skipProv && isDSO && !gotSONAME) {
-+ if (findprov && !fc->skipProv && isDSO && !gotSONAME) {
- depsp = &fc->provides;
- tagN = RPMTAG_PROVIDENAME;
- dsContext = RPMSENSE_FIND_PROVIDES;
-@@ -1045,7 +1130,7 @@