Skip to content

Commit

Permalink
Set the destdir option
Browse files Browse the repository at this point in the history
  • Loading branch information
pkratoch committed Nov 22, 2024
1 parent 7ccf173 commit 8851deb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
5 changes: 1 addition & 4 deletions pyanaconda/modules/payloads/payload/dnf/dnf_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,7 @@ def set_download_location(self, path):
:param path: a path to the package directory
"""
# FIXME: Reimplement the assignment.
# for repo in self._base.repos.iter_enabled():
# repo.pkgdir = path

self._base.get_config().destdir = path
self._download_location = path

def download_packages(self, callback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,18 +538,10 @@ def _install_packages_failed(self, base, transaction, progress):
"""Simulate the failed installation of packages."""
progress.error("The p1 package couldn't be installed!")

@pytest.mark.skip("Not implemented")
def test_set_download_location(self):
"""Test the set_download_location method."""
r1 = self._add_repo("r1")
r2 = self._add_repo("r2")
r3 = self._add_repo("r3")

self.dnf_manager.set_download_location("/my/download/location")

assert r1.pkgdir == "/my/download/location"
assert r2.pkgdir == "/my/download/location"
assert r3.pkgdir == "/my/download/location"
assert self._get_configuration().destdir == "/my/download/location"

def test_download_location(self):
"""Test the download_location property."""
Expand Down

0 comments on commit 8851deb

Please sign in to comment.