[pacman-dev] [Feature Suggestion] Option to install packages one-by-one when upgrading

Eli Schwartz eschwartz93 at gmail.com
Sun May 28 10:05:38 UTC 2017

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20170528/1c451d3f/attachment-0001.asc>

More information about the pacman-dev mailing list