aconfmgr icon indicating copy to clipboard operation
aconfmgr copied to clipboard

src/apply.bash: Update pacman database before installing packages

Open AleksanderBobinski opened this issue 1 year ago • 2 comments

On a fresh install it might happen that after priority files including the pacman config are installed, the pacman database is not up to date.

: Applying configuration... :: Installing priority files... ::: Installing /etc/pacman.conf... :::: Done. ::: Done. :: Configuring packages... ::: Unpinning 4 unknown packages. warning: database file for 'community' does not exist (use '-Sy' to download) warning: database file for 'multilib' does not exist (use '-Sy' to download)

This can later result in issues with finding the correct package during the "Apply packages" step.

error: target not found: lib32-vulkan-intel error: target not found: lib32-vulkan-mesa-layers error: target not found: steam error: target not found: wine

To avoid this issue do as pacman suggests and update the database before "Apply packages"

Please let me know if I missed something.

AleksanderBobinski avatar Sep 11 '24 21:09 AleksanderBobinski

Hi, unfortunately I don't think this is desired in all circumstances. I think it might also be potentially dangerous, as a database sync must always be followed by a full system upgrade - otherwise, installing a package would result in a partial upgrade.

Could we detect that the databases are missing? In which case, we could do a pacman -Syu in this case, guarded by a Confirm.

CyberShadow avatar Sep 13 '24 12:09 CyberShadow

Good catch. I didn't think about partial upgrades. Allow me to throw some code at you and please let me know if this is the right direction.

AleksanderBobinski avatar Sep 27 '24 20:09 AleksanderBobinski

Cool! Thanks for your patience!

AleksanderBobinski avatar Oct 23 '24 05:10 AleksanderBobinski