You are not logged in.

#1 2008-07-10 16:22:05

Heresyte
Member
Registered: 2008-07-10
Posts: 19

Automating a fresh install? Gentoo world file equivalent?

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

#2 2008-07-10 18:39:53

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Automating a fresh install? Gentoo world file equivalent?

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

#3 2008-07-10 19:29:59

lldmer
Member
From: Amsterdam
Registered: 2008-05-17
Posts: 119

Re: Automating a fresh install? Gentoo world file equivalent?

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

#4 2009-03-26 13:55:57

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Automating a fresh install? Gentoo world file equivalent?

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

#5 2009-03-26 14:29:14

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

Re: Automating a fresh install? Gentoo world file equivalent?

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

#6 2009-03-26 16:29:28

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Automating a fresh install? Gentoo world file equivalent?

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

#7 2009-03-26 17:47:43

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

Re: Automating a fresh install? Gentoo world file equivalent?

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

#8 2009-07-18 18:45:16

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Automating a fresh install? Gentoo world file equivalent?

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

Board footer

Powered by FluxBB