jjk-jacky / kalu

Keep Arch Linux Up-to-date -- an upgrade notifier for Arch Linux
Other
60 stars 15 forks source link

Add $PACKAGES variable support for repository upgrade command #53

Closed Tank-Missile closed 6 years ago

Tank-Missile commented 7 years ago

The $PACKAGES variable can be used for the AUR upgrade command but not the repository upgrade command.

jjk-jacky commented 7 years ago

I'm not sure I get it, why would you need it there? For AUR it might be usesul to know which packages actually need to be worked on/updated, but for the sysupgrade all you need to run is pacman -Syu basically (though you might want to run it inside a terminal emulator obviously...), the list of packages will be determined by pacman on its own.

Tank-Missile commented 7 years ago

Well, my thought process is that kalu already tells you what packages need to be upgraded in the repos, and so checking again through -Syu seems redundant.

jjk-jacky commented 7 years ago

Ah, but it isn't redundant, and it is in fact the way pacman works. The only way to do a (proper) sysupgrade is via -Syu, so pacman will sync the dbs (because kalu works on temporary copies only), then properly check & determine what needs to be updated.

There's no need to give it a list of packages. (You would only do that if you also wanted, at the same time, to install new packages.)

Tank-Missile commented 7 years ago

I think I see. Pacman synchronizes the databases while kalu relies only on checking cached packages, so upgrading with a given list may not be accurate?

jjk-jacky commented 7 years ago

Yes, it's very possible that dbs could have been updated (again) in between.

And again, proper sysupgrade are done via pacman's -u which rightfully always computes which packages to upgrade, so there's realy no need to give it a list of packages anyways. More importantly, the list you give if for packages to install as well; There's no way to give pacman a list of packages to upgrade.

Hence $PACKAGES isn't useful here.