From 3702e142c5a157caf7ebe1aa46e7ea50af3ec501 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 30 Sep 2016 07:45:26 +0200 Subject: [PATCH] Add alias 'rpm' for 'type=' option (RHBZ #1380580) Signed-off-by: Igor Gnatenko --- ...pm-as-alias-for-rpm-md-RhBug-1380580.patch | 31 +++++++++++++++++++ dnf.spec | 10 ++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 0001-repo-add-rpm-as-alias-for-rpm-md-RhBug-1380580.patch diff --git a/0001-repo-add-rpm-as-alias-for-rpm-md-RhBug-1380580.patch b/0001-repo-add-rpm-as-alias-for-rpm-md-RhBug-1380580.patch new file mode 100644 index 0000000..daddbf4 --- /dev/null +++ b/0001-repo-add-rpm-as-alias-for-rpm-md-RhBug-1380580.patch @@ -0,0 +1,31 @@ +From 168b799164bc39a9bed6b63bd87c4a550da975b5 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Fri, 30 Sep 2016 07:35:07 +0200 +Subject: [PATCH] repo: add 'rpm' as alias for 'rpm-md' (RhBug:1380580) + +libzypp does this as well for some time: +https://github.com/openSUSE/libzypp/commit/6b22871a0aab134538edcb6e3d0321330817baaa + +Reported-by: Kevin Fenzi +References: https://bugzilla.redhat.com/show_bug.cgi?id=1380580 +Signed-off-by: Igor Gnatenko +--- + dnf/repo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dnf/repo.py b/dnf/repo.py +index 5dcf227..fcc408a 100644 +--- a/dnf/repo.py ++++ b/dnf/repo.py +@@ -893,7 +893,7 @@ class Repo(dnf.conf.RepoConf): + def _valid(self): + if len(self.baseurl) == 0 and not self.metalink and not self.mirrorlist: + return "Repository %s has no mirror or baseurl set." % self.id +- supported_types = ['rpm-md', 'repomd', 'rpmmd', 'yum', 'YUM'] ++ supported_types = ['rpm-md', 'rpm', 'repomd', 'rpmmd', 'yum', 'YUM'] + if self.type and self.type not in supported_types: + return "Repository '{}' has unsupported type: 'type={}', " \ + "skipping.".format(self.id, self.type) +-- +2.10.0 + diff --git a/dnf.spec b/dnf.spec index a397b1d..830b4bb 100644 --- a/dnf.spec +++ b/dnf.spec @@ -25,12 +25,15 @@ Name: dnf Version: 2.0.0 -Release: 0.rc1.1%{?dist} +Release: 0.rc1.2%{?dist} Summary: Package manager forked from Yum, using libsolv as a dependency resolver # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ and GPLv2 and GPL URL: https://github.com/rpm-software-management/dnf Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +# https://github.com/rpm-software-management/dnf/pull/627 +# https://bugzilla.redhat.com/show_bug.cgi?id=1380580 +Patch0001: 0001-repo-add-rpm-as-alias-for-rpm-md-RhBug-1380580.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext @@ -177,7 +180,7 @@ Requires(postun): systemd Alternative CLI to "dnf upgrade" suitable for automatic, regular execution. %prep -%autosetup +%autosetup -p1 mkdir build %if %{with python3} mkdir build-py3 @@ -322,6 +325,9 @@ popd %endif %changelog +* Fri Sep 30 2016 Igor Gnatenko - 2.0.0-0.rc1.2 +- Add alias 'rpm' for 'type=' option (RHBZ #1380580) + * Thu Sep 29 2016 Michal Luscon 2.0.0-0.rc1.1 - See http://dnf.readthedocs.io/en/latest/release_notes.html