You are not logged in.
Hi
When using Gentoo I can automate a fresh install because I have my old world file which specifically contains all the programs that I need. Once I give portage my world file I just sit back and it installs everything I want automatically.
What is the best way to recreate this functionality with pacman? The only way I see to do it is to maintain a list of the required software and copy and paste the names onto the command line as:
# pacman -S pacage1 package2 package3 package4 etc.
But maybe I'm missing something?
Offline
pacman -Qq lists all the installed packages without the version numbers. I remember seeing a script posted somewhere that took that list to output into a file that could be used to reinstall, though I don't remember the mechanics. Maybe that can give you some direction to look around for though.
Offline
Maybe this is the script mcmillan is talking about: http://bbs.archlinux.org/viewtopic.php?id=28660 (or http://bbs.archlinux.org/viewtopic.php?id=23650 )
I think I remember some other solution being suggested somewhere on these forums, but I couldn't find it. I believe with this solution Pacman would also remember what packages are dependencies and what packages where installed explicitly.
For lack of better words: chair, never, toothbrush, really. Ohw, and fish!
Offline
Well I found this on the wiki. It'll print all installed packages to a file and then can be reinstalled again:
Making List of Installed Packages for Reinstall
pacman -Qqe | grep -v "$(pacman -Qmq)" > pkglist
Reinstall from Package List
pacman -S $(cat pkglist)
Unfortunately, I believe, this will install all packages as primary even dependencies. Haven't tried it yet but I think will break cleaning the system. I don't think "pacman -Rs <package>" will then be able to remove dependencies after reinstall. Am i right about this? If so, is there a way to build a world file that doesn't list dependencies?
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Like this?
pacman -Qqet | grep -v "$(pacman -Qqg base)"
Or if you have installed any foreign packages:
pacman -Qqet | grep -v "$(pacman -Qqg base)" | grep -v "$(pacman -Qqm)"
Save and reinstall them as Gen2ly explains.
Last edited by Lars Stokholm (2009-03-26 14:29:58)
Offline
Yeah, nice job. That's probably do the trick since the base install will be put on by the cd. Your first command will get all primary-packages (packages that are not dependencies) including packages from AUR. Not really sure why you'd need the second one though unless you wanted not to have packages from AUR... not included.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
I assumed Heresyte wanted a list of packages installable with pacman. Perhaps if one uses yaourt it won't be necessary, I don't really know how it works.
Offline
Ahhhhhhhhhhhh! Nice work because pacman will not be able to recognize this AUR package names (or local package names rather) and end. Thanks.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline