Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow checking for updates without syncing the database #12

Open
donbex opened this issue Jun 18, 2022 · 4 comments
Open

Allow checking for updates without syncing the database #12

donbex opened this issue Jun 18, 2022 · 4 comments

Comments

@donbex
Copy link

donbex commented Jun 18, 2022

Currently, pacwatch checks for updates by calling pacman (or a pacman wrapper) with options --noconfirm --color=always -Sy. This means that the package database will always be synced, which can leave the system in an inconsistent state if the user chooses not to update.

Therefore, it would be desirable to have the option to check for updates without syncing the package database, which could be achieved for example by using the checkupdates script from pacman-contrib.

Note that simply setting the value of the pacman_command option to checkupdates does not work, because that script does not support any of the options that pacwatch passes to pacman.

@ouuan
Copy link
Owner

ouuan commented Jun 18, 2022

How harmful an "inconsistent state" could be 🤔? I can only think of running pacman -S in an "inconsistent state" and resulting in a partial upgrade. My suggestion is to always run a pacman -Syu before any pacman -S. So I'd say the "inconsistent state" is harmful but only a little bit.

Another consideration is that the result of checkupdates could be different from the later pacman -Sy. Although this inconsistency has a low probability, I do think it's more important than the harm of a pacman -Sy without u.

@ouuan
Copy link
Owner

ouuan commented Jun 18, 2022

UPD: I just realized that we can compare the result of checkupdates against pacman -Sy.

@ouuan
Copy link
Owner

ouuan commented Jun 18, 2022

OK, maybe using checkupdates is a good choice, but I don't think there's enough motivation for it. A PR would be welcomed :)

@donbex
Copy link
Author

donbex commented Jun 18, 2022

Fair enough. Unfortunately right now I am unable to submit a PR due to my employment contract, but if/when I clear it with my employer I am happy to open one.

Either way, thanks for the quick response!

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

No branches or pull requests

2 participants