Skip to content

Commit

Permalink
package: remote_location() takes basedir into account
Browse files Browse the repository at this point in the history
If the package location in the repodata contains basedir, it needs to be
taken into account when calculating the package's remote_location.

Resolves: #2130

= changelog =
msg:           Fix package location if baseurl is present in the metadata
type:          bugfix
resolves:      #2130
  • Loading branch information
m-blaha committed Sep 18, 2024
1 parent a1aa8d0 commit 8c285a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dnf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ def remote_location(self, schemes=('http', 'ftp', 'file', 'https')):
"""
if self._from_system or self._from_cmdline:
return None
if self.baseurl:
return os.path.join(self.baseurl, self.location.lstrip("/"))
return self.repo.remote_location(self.location, schemes)

def _is_local_pkg(self):
Expand Down

0 comments on commit 8c285a9

Please sign in to comment.