public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/cpanspec] epel10: Prefer dnf over repoquery
@ 2026-10-21 16:04 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-10-21 16:04 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/cpanspec
Branch : epel10
Commit : 3afb15bd2c785622f3d3b3f03c68f0141bc2e6d4
Author : Petr Šabata <contyk@redhat.com>
Date   : 2015-09-03T10:59:51+02:00
Stats  : +32/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/cpanspec/c/3afb15bd2c785622f3d3b3f03c68f0141bc2e6d4?branch=epel10

Log:
Prefer dnf over repoquery

---
diff --git a/cpanspec-1.78-Prefer-dnf-over-repoquery.patch b/cpanspec-1.78-Prefer-dnf-over-repoquery.patch
new file mode 100644
index 0000000..0b376b9
--- /dev/null
+++ b/cpanspec-1.78-Prefer-dnf-over-repoquery.patch
@@ -0,0 +1,25 @@
+diff --git a/cpanspec b/cpanspec
+index a15765a..0af4e85 100755
+--- a/cpanspec
++++ b/cpanspec
+@@ -490,11 +490,17 @@ sub check_rpm($) {
+ sub check_repo($) {
+     my $dep=shift;
+ 
+-    my $repoquery="/usr/bin/repoquery";
+-    return undef if (!-x $repoquery);
++    my ($repoquery, $repoqueryopts);
++    if (-x ($repoquery = '/usr/bin/dnf')) {
++        $repoqueryopts = "whatprovides '${dep}'"
++    } elsif (-x ($repoquery = '/usr/bin/repoquery')) {
++        $repoqueryopts = "--whatprovides '${dep}'"
++    } else {
++        return undef
++    }
+ 
+     verbose("Running $repoquery to check for $dep.  This may take a while...");
+-    my @out=`$repoquery --whatprovides "$dep"`;
++    my @out=`$repoquery $repoqueryopts 2>/dev/null`;
+ 
+     if ($? != 0) {
+         #warn "backtick (repoquery) failed with return value $?";

diff --git a/cpanspec.spec b/cpanspec.spec
index dd845c1..42c7874 100644
--- a/cpanspec.spec
+++ b/cpanspec.spec
@@ -1,6 +1,6 @@
 Name:           cpanspec
 Version:        1.78
-Release:        22%{?dist}
+Release:        23%{?dist}
 Summary:        RPM spec file generation utility
 License:        GPL+ or Artistic
 Group:          Development/Tools
@@ -9,6 +9,7 @@ Source0:        http://sourceforge.net/downloads/%{name}/%{name}/%{version}/%{na
 Patch0:         %{name}-1.78-Change-optimize-to-optflags.patch
 Patch1:         %{name}-1.78-Strip-any-version-comparison-operator-from-the-perl-BR.patch
 Patch2:         %{name}-1.78-Escape-slashes-in-filters.patch
+Patch3:         %{name}-1.78-Prefer-dnf-over-repoquery.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -16,7 +17,7 @@ BuildRequires:  perl
 BuildRequires:  perl(Module::Build)
 Requires:       perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
 Requires:       /usr/bin/curl
-Requires:       /usr/bin/repoquery
+Requires:       /usr/bin/dnf
 Requires:       rpm-build
 
 %description
@@ -32,6 +33,7 @@ contained in the spec file is correct.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 perl Build.PL installdirs=vendor
@@ -50,6 +52,9 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} +
 %{_mandir}/man1/*
 
 %changelog
+* Thu Sep 03 2015 Petr Šabata <contyk@redhat.com> - 1.78-23
+- Prefer dnf over repoquery
+
 * Thu Jun 25 2015 Petr Šabata <contyk@redhat.com> - 1.78-22
 - Correct the dep list
 - Modernize and clean the spec a bit

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-21 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 16:04 [rpms/cpanspec] epel10: Prefer dnf over repoquery 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox