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

Arch Linux speed improvements #828

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

LukeShortCloud
Copy link
Contributor

This PR makes the following changes:

  • Pacman repository cache is only updated once, at the beginning, instead of every command.
  • Pacman will no longer re-install packages. Without the --needed argument, pacman -S will re-install packages.
  • Pacman upgrades are no longer run every time. They only run if, from within the container, distrobox-init --upgrade is ran. This is the expected behavior.

This addresses performance concerns brought up here: #826

I manually tested this and can confirm that re-entering a stopped Arch Linux container is much faster and that upgrades still work.

* Add the "--needed" argument to Pacman to only install new packages.
* Pacman cache is also only updated once instead of during every
command.

These changes makes entering an Arch Linux container much faster.

Resolves 89luca89#826

Signed-off-by: Luke Short <ekultails@gmail.com>
Upgrades should only run when the "--upgrade" argument is passsed.

Related 89luca89#826

Signed-off-by: Luke Short <ekultails@gmail.com>
@D3vil0p3r
Copy link

It is useful. The usage of pacman -Sy <pkgname> is very dangerous and not supported on Arch. It must be used only for global upgrading.
Source: https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported

@xz-dev
Copy link
Contributor

xz-dev commented Jul 31, 2023

It's merged to dustrobox-boost, you can use it to create image for distrobox faster.

@LukeShortCloud
Copy link
Contributor Author

@xz-dev Thanks for sharing! Your project looks very promising: a faster Rust implementation of distrobox with additional tweaks added on-top.

@89luca89 Is there any chance we can also get this PR merged into upstream distrobox? I've been using this for a month for my Arch Linux container and it has been working great. Apparently distrobox-boost takes a similar approach for package management on Arch Linux. I'm open to feedback!

@89luca89
Copy link
Owner

89luca89 commented Aug 3, 2023

Thanks @LukeShortCloud
That's very appreciated :)

@89luca89 89luca89 merged commit 39ae791 into 89luca89:main Aug 3, 2023
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

Successfully merging this pull request may close these issues.

4 participants