[pacman-dev] [Feature Suggestion] Option to install packages one-by-one when upgrading
Hello all This is my first email to the pacman mailing-list and I am writing to suggest and discuss a possible feature for future versions of pacman. [Problem] Whenever a full system upgrade is run with pacman -Syyu, pacman downloads all the packages which need to be installed and then upgrades all at once. This approach sometimes leads to problems on computers with unreliable internet connections as in my case. It often happens that while downloading one of then several packages to be upgraded, one of the download will get corrupted and in the end when it tries to install, none of the packages would get upgraded due to a single corrupted package. In such a case, I run pacman -Scc followed by pacman -Syyu to try and upgrade again leading to lots of wasted data and time. [Suggested Solution] What I suggest is that a new commandline flag be created in pacman which changes the default behaviour. When the flag is enabled, pacman downloads upgrade files for a single package (or a few interdependent packages) and upgrade it and then move on to upgrade other packages. Thus installing packages one-by-one. [Request] Please let me know if this is a possibility or is there another way my problem can be solved without modifying pacman. I am willing to contribute the patch myself if you can guide me on how to proceed. Would like to know if anyone is interested. -- Lakshay Garg Senior Undergraduate, EE IIT Kanpur
On Sun, May 28, 2017 at 07:45:02AM +0530, Lakshay Garg wrote:
[Problem] Whenever a full system upgrade is run with pacman -Syyu, pacman downloads all the packages which need to be installed and then upgrades all at once. This approach sometimes leads to problems on computers with unreliable internet connections as in my case. It often happens that while downloading one of then several packages to be upgraded, one of the download will get corrupted and in the end when it tries to install, none of the packages would get upgraded due to a single corrupted package. In such a case, I run pacman -Scc followed by pacman -Syyu to try and upgrade again leading to lots of wasted data and time.
[Suggested Solution] What I suggest is that a new commandline flag be created in pacman which changes the default behaviour. When the flag is enabled, pacman downloads upgrade files for a single package (or a few interdependent packages) and upgrade it and then move on to upgrade other packages. Thus installing packages one-by-one.
[Request] Please let me know if this is a possibility or is there another way my problem can be solved without modifying pacman. I am willing to contribute the patch myself if you can guide me on how to proceed. Would like to know if anyone is interested.
Downloaded packages are still in your cache and won't need to be downloaded again on your next -Syu unless they're already corrupted; by blindly running -Scc you're doing exactly the thing you're trying to avoid. (The best thing you can do to save data is ceasing to unnecessarily pass -y twice every time you upgrade.) I also don't see changes in -u behavior ever being supported as it would facilitate partial updates.
Downloaded packages are still in your cache and won't need to be downloaded again on your next -Syu unless they're already corrupted;
Trying to run pacman -Syyu again after downloading the packages does not upgrade the packages and give some message about packages being corrupted.
blindly running -Scc you're doing exactly the thing you're trying to avoid. (The best thing you can do to save data is ceasing to unnecessarily pass -y twice every time you upgrade.)
I tried to upgrade without running pacman -Scc first but I still get the same message about packages being corrupted. Please let me know if I am missing something. -- Lakshay
On Sun, May 28, 2017 at 09:58:15AM +0530, Lakshay Garg wrote:
I tried to upgrade without running pacman -Scc first but I still get the same message about packages being corrupted.
Please let me know if I am missing something.
https://wiki.archlinux.org/index.php/Pacman#.22Failed_to_commit_transaction_...
On 05/27/2017 10:15 PM, Lakshay Garg wrote:
[Problem] Whenever a full system upgrade is run with pacman -Syyu, pacman downloads all the packages which need to be installed and then upgrades all at once. This approach sometimes leads to problems on computers with unreliable internet connections as in my case. It often happens that while downloading one of then several packages to be upgraded, one of the download will get corrupted and in the end when it tries to install, none of the packages would get upgraded due to a single corrupted package. In such a case, I run pacman -Scc followed by pacman -Syyu to try and upgrade again leading to lots of wasted data and time.
1) Do not run pacman -Syyu because using a double -y flag forces you to waste bandwidth by redownloading the repository databases whether they have been updated or not. This should only be used when trying to e.g. downgrade your system via the Arch Linux Archive. 2) pacman will already offer to delete packages which it claims are corrupted. Using pacman -Scc merely deletes all the other packages which weren't corrupted, thereby wasting far more time and data.
[Suggested Solution] What I suggest is that a new commandline flag be created in pacman which changes the default behaviour. When the flag is enabled, pacman downloads upgrade files for a single package (or a few interdependent packages) and upgrade it and then move on to upgrade other packages. Thus installing packages one-by-one.
[Request] Please let me know if this is a possibility or is there another way my problem can be solved without modifying pacman. I am willing to contribute the patch myself if you can guide me on how to proceed. Would like to know if anyone is interested.
pacman will never add a feature designed to horribly break peoples' systems, so absolutely not. :) This would either be no different from what is currently done (in the event that all packages get updated either way), or else upgrade one package and then die before upgrading anything else. Partial updates are not supported, therefore *all packages* are always considered to be interdependent. What you need to do is figure out why your internet connection problem is corrupting your package files instead of merely failing to download them, and fix that. Alternatively, delete the corrupted files *only*, and try again. This is not a situation where pacman itself needs to get a new option. -- Eli Schwartz
participants (3)
-
beest
-
Eli Schwartz
-
Lakshay Garg