public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/cpanspec] epel10: Prefer dnf over repoquery
Date: Wed, 21 Oct 2026 16:04:28 GMT	[thread overview]
Message-ID: <179259866863.1.18322402602413407419.rpms-cpanspec-3afb15bd2c78@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-10-21 16:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179259866863.1.18322402602413407419.rpms-cpanspec-3afb15bd2c78@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox