filbranden / rpms / dnf

Forked from rpms/dnf 4 years ago
Clone

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

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