You are not logged in.

#1 2018-11-28 19:52:18

MikeW
Member
Registered: 2011-10-19
Posts: 66

[SOLVED] restoring packages from list

I am was looking into restoring packages using pacman and yay just incase I need to reinstall. What I am seeing is that the needed flag seems to work for native packages but not aur packages when using yay. The commands I am using is as follows.

- Backup the packages
pacman -Qqe > packages.txt   # Resulting file includes all explictly installed native and aur packages.

- Restore the packages
yay -S --needed - < packages.txt

The restore command skips all native packages which is what I want but does not skip when it comes to the aur packages. What am I missing here?

Last edited by MikeW (2018-11-29 01:00:10)

Offline

#2 2018-11-28 19:56:05

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] restoring packages from list

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-11-28 22:31:19

Morganamilo
Package Maintainer (PM)
Registered: 2017-12-05
Posts: 77

Re: [SOLVED] restoring packages from list

MikeW wrote:

The restore command skips all native packages which is what I want but does not skip when it comes to the aur packages. What am I missing here?

Are you sure it's not just bumping the pkgver to see if should skip the package, and you're confusing this for building the package?

Offline

#4 2018-11-29 00:50:07

MikeW
Member
Registered: 2011-10-19
Posts: 66

Re: [SOLVED] restoring packages from list

Morganamilo wrote:
MikeW wrote:

The restore command skips all native packages which is what I want but does not skip when it comes to the aur packages. What am I missing here?

Are you sure it's not just bumping the pkgver to see if should skip the package, and you're confusing this for building the package?

You may be right there, I guess I was expecting it to skip in the same way it did for the native packages. I let it continue on and it does download the pkgbuild, and eventually skips it once it knows it can.  tweaked the command a bit so there is less prompting. This is all for a script that I hope I don't actually need to use. smile The intent is to make disaster recovery easier though.

yay -S --needed --nouseask --nocleanmenu --nodiffmenu --removemake - < ~/packages.txt

actually even better this seems to be what I was after.

yay -S --needed --noconfirm - < ~/packages.txt

Last edited by MikeW (2018-11-29 00:55:30)

Offline

Board footer

Powered by FluxBB