diff --git a/0001-disable-TestConfigure.patch b/0001-disable-TestConfigure.patch deleted file mode 100644 index 833c32b..0000000 --- a/0001-disable-TestConfigure.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- dnf/tests/test_cli.py.orig 2013-02-04 15:26:39.727288265 +0100 -+++ dnf/tests/test_cli.py 2013-02-04 15:26:57.317345131 +0100 -@@ -57,23 +57,3 @@ class Cli(unittest.TestCase): - self.cli._configure_repos(opts) - self.assertTrue(self.yumbase._override_sigchecks) - self.assertTrue(self.yumbase.repos.getRepo("main")._override_sigchecks) -- --@mock.patch('dnf.yum.Base.doLoggingSetup', new=mock.MagicMock) --class TestConfigure(unittest.TestCase): -- def setUp(self): -- self.yumbase = base.MockYumBase("main") -- self.cli = dnf.cli.cli.Cli(self.yumbase) -- -- def test_configure(self): -- """ Test Cli.configure. -- -- For now just see that the method runs. -- """ -- self.cli.configure(['update']) -- self.assertEqual(self.cli.cmdstring, "dnf update ") -- -- def test_configure_verbose(self): -- self.cli.configure(['-v', 'update']) -- self.assertEqual(self.cli.cmdstring, "dnf -v update ") -- self.assertEqual(self.yumbase.conf.debuglevel, 6) -- self.assertEqual(self.yumbase.conf.errorlevel, 6) diff --git a/better-file-pattern-recognition-RhBug-1195385.patch b/better-file-pattern-recognition-RhBug-1195385.patch new file mode 100644 index 0000000..6b62293 --- /dev/null +++ b/better-file-pattern-recognition-RhBug-1195385.patch @@ -0,0 +1,82 @@ +From 6e854bed3827e33ec51af2bfd738c8e8cc76ad65 Mon Sep 17 00:00:00 2001 +From: Jan Silhan +Date: Mon, 9 Mar 2015 14:27:53 +0100 +Subject: [PATCH 3/4] better file pattern recognition (RhBug:1195385) + +fixes regration introduced in c388ac6 +--- + dnf/subject.py | 3 ++- + tests/repos/main.repo | 1 + + tests/test_install.py | 18 +++++++++++++++--- + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/dnf/subject.py b/dnf/subject.py +index e5ed68d..660cbd8 100644 +--- a/dnf/subject.py ++++ b/dnf/subject.py +@@ -25,6 +25,7 @@ from dnf.util import first, is_glob_pattern + + import dnf.selector + import hawkey ++import re + + class Subject(object): + # :api +@@ -77,7 +78,7 @@ class Subject(object): + + @property + def filename_pattern(self): +- return self.subj.pattern.find('/') != -1 ++ return re.search(r"^\*?/", self.subj.pattern) + + @property + def pattern(self): +diff --git a/tests/repos/main.repo b/tests/repos/main.repo +index 380c193..e44ca4e 100644 +--- a/tests/repos/main.repo ++++ b/tests/repos/main.repo +@@ -19,4 +19,5 @@ + =Pkg: trampoline 2.1 1 noarch + =Prv: henry(the_horse) + =Prv: splendid = 2.1 ++=Prv: php(a/b) + =Prv: /all/be/there +diff --git a/tests/test_install.py b/tests/test_install.py +index e0da4e6..afee8d2 100644 +--- a/tests/test_install.py ++++ b/tests/test_install.py +@@ -30,8 +30,8 @@ class CommonTest(support.ResultTestCase): + + - contains a package "lotus-3-17.x86_64" (The package can be installed.) + - contains a package "lotus-3-17.i686" (The package can be installed.) +- - contains a package "trampoline-2.1-1.noarch" that contains "*/there" and +- provides "splendid > 2.0" (The package can be installed.) ++ - contains a package "trampoline-2.1-1.noarch" that contains "*/there", ++ provides "splendid > 2.0" and "php(a/b)" (The package can be installed.) + - contains a package "mrkite-2-0.x86_64" (The package can be installed + together with the package "trampoline".) + - contains a package "mrkite-k-h-1-1.x86_64" (The package can be +@@ -61,7 +61,19 @@ class CommonTest(support.ResultTestCase): + """Test that the pkg to be installed can be specified by fname glob.""" + self.base.install("*/there") + (installed, _) = self.installed_removed(self.base) +- self.assertCountEqual(map(str, installed), ('trampoline-2.1-1.noarch',)) ++ self.assertCountEqual(map(str, installed), ++ ('trampoline-2.1-1.noarch',)) ++ ++ self.base.install("/all/*/there") ++ (installed, _) = self.installed_removed(self.base) ++ self.assertCountEqual(map(str, installed), ++ ('trampoline-2.1-1.noarch',)) ++ ++ def test_install_provide_glob(self): ++ self.base.install("php(a/b)") ++ (installed, _) = self.installed_removed(self.base) ++ self.assertCountEqual(map(str, installed), ++ ('trampoline-2.1-1.noarch',)) + + def test_install_name(self): + """Test that the package to be installed can be specified by name.""" +-- +2.4.3 + diff --git a/dnf.spec b/dnf.spec index 91cf55d..d5c0888 100644 --- a/dnf.spec +++ b/dnf.spec @@ -15,7 +15,7 @@ Name: dnf Version: 0.6.4 -Release: 1%{?snapshot}%{?dist} +Release: 2%{?snapshot}%{?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 @@ -26,6 +26,7 @@ URL: https://github.com/rpm-software-management/dnf # ./archive # tarball will be generated in $HOME/rpmbuild/sources/ Source0: http://rpm-software-management.fedorapeople.org/dnf-%{gitrev}.tar.xz +Patch0: better-file-pattern-recognition-RhBug-1195385.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext @@ -117,6 +118,8 @@ Alternative CLI to "dnf upgrade" suitable for automatic, regular execution. %prep %setup -q -n dnf +%patch0 -p1 + %if %{with python3} rm -rf py3 mkdir ../py3 @@ -243,6 +246,8 @@ popd %systemd_postun_with_restart dnf-automatic.timer %changelog +* Tue Jul 07 2015 Michal Luscon - 0.6.4-2 +- better file pattern recognition (RhBug:1195385) (Jan Silhan) * Fri Feb 27 2015 Jan Silhan - 0.6.4-1 - revert of e56dd41, does not fix BZ:1109927 now (Jan Silhan)