Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Add --distro-sync mode #21

Open
2 tasks
wgwoods opened this issue Oct 14, 2013 · 2 comments
Open
2 tasks

Add --distro-sync mode #21

wgwoods opened this issue Oct 14, 2013 · 2 comments

Comments

@wgwoods
Copy link
Contributor

wgwoods commented Oct 14, 2013

Add a flag to make fedup download and install packages, even if they're older than what's already on the system.

  • look into how yum does distro-sync
  • figure out if we need to pass extra flags in system-upgrade-fedora.c
@wgwoods wgwoods modified the milestone: 0.9.0 Oct 29, 2014
@AdamWill
Copy link

So this almost looks really easy - we can just call the distroSyncPkgs() method. But there's one small-yet-big snag: that's not in the __init__.py implementation of the YumBase class; it's in YumBaseCli, the one from cli.py, with a comment:

#  Note that we aren't in __init__ yet for a couple of reasons, but we 
# probably will get there for 3.2.28.

so, yeah, I'm not taking bets on that happening. We could just have fedup's UpgradeDownloader class inherit from YumBaseCli instead of YumBase, but of course that's a pretty big change and might have many other consequences.

Things look better for DNF. At first glance it has the same split, but actually method distro_sync_userlist from class BaseCli calls method distro_sync from class Base; if/when fedup moves to DNF, we can just call distro_sync instead of update in build_update_transaction.

@AdamWill
Copy link

Bah. yum's CLI stuff isn't installed as a module at all, it goes to /usr/share/yum-cli , so you can't try inheriting from YumBaseCli at all.

The really ugly hack of dropping the whole distroSyncPkgs method into UpgradeDownloader and changing its return statements to drop the messages, then a single change to build_update_transaction to call self.distroSyncPkgs([]) instead of self.update() actually seems to work in a very quick test, but there's probably no clean way to do that unless we get yum to put the method somewhere fedup can use it sensibly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants