Skip to content

Commit

Permalink
fixup! fixup! add the posibility to upgrade while using a local repos…
Browse files Browse the repository at this point in the history
…itory
  • Loading branch information
PeterMocary committed Aug 14, 2023
1 parent 714e277 commit ac9cb20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions repos/system_upgrade/common/actors/adjustlocalrepos/actor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from leapp.actors import Actor
from leapp.libraries.actor import adjustlocalrepos
from leapp.libraries.common import mounting
from leapp.libraries.stdlib import api
from leapp.models import (
TargetOSInstallationImage,
TargetUserSpaceInfo,
Expand Down Expand Up @@ -36,6 +37,7 @@ def process(self):
target_iso = next(self.consume(TargetOSInstallationImage), None)

if not all([target_userspace_info, used_target_repos, target_repos_facts]):
api.current_logger().error("Missing required information to proceed!")
return

target_repos_facts = target_repos_facts.repositories
Expand Down
5 changes: 3 additions & 2 deletions repos/system_upgrade/common/libraries/dnfplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ def install_initramdisk_requirements(packages, target_userspace_info, used_repos
"""
Performs the installation of packages into the initram disk
"""
with _prepare_transaction(used_repos=used_repos,
target_userspace_info=target_userspace_info) as (context, target_repoids, _unused):
mount_binds = ['/:/installroot']
with _prepare_transaction(used_repos=used_repos, target_userspace_info=target_userspace_info,
binds=mount_binds) as (context, target_repoids, _unused):
if get_target_major_version() == '9':
_rebuild_rpm_db(context)
repos_opt = [['--enablerepo', repo] for repo in target_repoids]
Expand Down

0 comments on commit ac9cb20

Please sign in to comment.