Blame SOURCES/0003-Remove-unnecessary-code-for-set-cacheonly.patch

72d647
From aebbc222b85a7949a705360ea51b7c987126c2d8 Mon Sep 17 00:00:00 2001
72d647
From: Jaroslav Mracek <jmracek@redhat.com>
72d647
Date: Tue, 28 Nov 2017 09:21:40 +0100
72d647
Subject: [PATCH 3/3] Remove unnecessary code for set cacheonly
72d647
72d647
Attribute repo._md_only_cached is set on different place during
72d647
_progress_demands().
72d647
---
72d647
 dnf/repo.py       | 5 -----
72d647
 tests/test_cli.py | 2 --
72d647
 2 files changed, 7 deletions(-)
72d647
72d647
diff --git a/dnf/repo.py b/dnf/repo.py
72d647
index e9ce597e..75a11a47 100644
72d647
--- a/dnf/repo.py
72d647
+++ b/dnf/repo.py
72d647
@@ -858,11 +858,6 @@ class Repo(dnf.conf.RepoConf):
72d647
         else:
72d647
             return self._try_revive_by_repomd()
72d647
 
72d647
-    def _configure_from_options(self, opts):
72d647
-        if getattr(opts, 'cacheonly', None):
72d647
-            self._md_only_cached = True
72d647
-        super(Repo, self)._configure_from_options(opts)
72d647
-
72d647
     def disable(self):
72d647
         # :api
72d647
         self.enabled = False
72d647
diff --git a/tests/test_cli.py b/tests/test_cli.py
72d647
index f4ea27ee..8963783a 100644
72d647
--- a/tests/test_cli.py
72d647
+++ b/tests/test_cli.py
72d647
@@ -136,8 +136,6 @@ class CliTest(TestCase):
72d647
         self.assertTrue(self.base.repos['comb'].enabled)
72d647
         self.assertFalse(self.base.repos["comb"].gpgcheck)
72d647
         self.assertFalse(self.base.repos["comb"].repo_gpgcheck)
72d647
-        self.assertEqual(self.base.repos["comb"]._sync_strategy,
72d647
-                         dnf.repo.SYNC_ONLY_CACHE)
72d647
 
72d647
     def test_configure_repos_expired(self, _):
72d647
         """Ensure that --cacheonly beats the expired status."""
72d647
-- 
72d647
2.13.6
72d647