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.