Installing packages listed in text file [Solved]

Anything that pertains to Portage

Moderator: Moderators

Installing packages listed in text file [Solved]

Postby fusion809 » Tue Sep 15, 2015 3:07

Hi,

I'd like to know if it is possible to get emerge to install all packages listed in a text file. I would like to be able to run something like
Code: Select all
emerge list.txt
where list.txt is a text file I wrote that contains a list of packages I would like installed. Here's an example list.txt file's contents:

gnome-base/gnome-desktop
x11-themes/elementary-icon-theme
x11-themes/elementary-theme
x11-libs/granite
dev-libs/folks
pantheon-base/marlin
dev-util/euclide
media-sound/noise
app-office/dexter
net-libs/gnome-online-accounts
app-editors/scratch
pantheon-base/switchboard
x11-terms/pantheon-terminal
app-office/maya
dev-db/sqlheavy
pantheon-base/plank
net-libs/liboauth
x11-libs/bamf
dev-libs/libgweather
media-libs/clutter
dev-python/rdflib
dev-libs/libgdata
x11-libs/pango
dev-libs/glib
dev-libs/libpeas
gnome-base/gsettings-desktop-schemas
media-libs/cogl
x11-libs/varka
pantheon-base/cerbere
x11-libs/gtk+
x11-wm/mutter
x11-themes/elementary-wallpapers
dev-libs/libindicator
pantheon-base/slingshot
app-dicts/lingo
gnome-extra/zeitgeist
dev-libs/libzeitgeist
dev-libs/libpeas
x11-wm/gala
dev-libs/gobject-introspection
pantheon-base/wingpanel
x11-libs/gdk-pixbuf
dev-libs/gobject-introspection-common
dev-python/isodate
gnome-extra/evolution-data-server
x11-libs/vte
dev-libs/libindicate
app-office/ergo
dev-lang/vala
dev-libs/contractor
dev-libs/libdbusmenu
net-news/feedler
dev-libs/libunity
media-video/eidete
media-video/audience
pantheon-extra/dropoff
app-office/footnote
pantheon-base/pantheon-print
mail-client/geary
dev-libs/dee
media-video/snap
media-libs/clutter-gst
media-video/cheese
x11-libs/mx
dev-util/fix-la-relink-command


Thanks for your time,
Brenton
Last edited by fusion809 on Sat Nov 07, 2015 21:52, edited 1 time in total.
Brenton Horne
Favourite distros: Arch Linux, Fedora, openSUSE, Sabayon Linux and Ubuntu.
Usernames: Fuse809 (Wikimedia), fusion809 (RuneScape), Brenton (Sabayon Wiki) and fusion809 (Gentoo Wiki).
My Blog on Sabayon | Google+
fusion809
Growing Hen
 
Posts: 116
Joined: Fri Jul 03, 2015 15:11
Location: Townsville, Australia

Re: Installing packages listed in text file

Postby svantoviit » Tue Sep 15, 2015 22:03

Put your list into /etc/potrtage/sets/ and install with
Code: Select all
emerge -a @SET
where SET is the name of your file.

For more info check https://wiki.gentoo.org/wiki//etc/portage/sets or man emerge.
svantoviit
Old Dear Hen
 
Posts: 706
Joined: Sun Feb 28, 2010 17:55

Re: Installing packages listed in text file

Postby fusion809 » Sat Nov 07, 2015 21:34

Yesterday, I wanted to install packages listed in a text file on Fedora using DNF, so I asked a question at ask.fedoraproject.org to that effect and the answer turns out to be applicable to emerge too. Namely that the Unix command 'cat' (short for concatenate) can be used. For emerge this would mean I would simply have to run the command:
Code: Select all
emerge $(cat list.txt)
Brenton Horne
Favourite distros: Arch Linux, Fedora, openSUSE, Sabayon Linux and Ubuntu.
Usernames: Fuse809 (Wikimedia), fusion809 (RuneScape), Brenton (Sabayon Wiki) and fusion809 (Gentoo Wiki).
My Blog on Sabayon | Google+
fusion809
Growing Hen
 
Posts: 116
Joined: Fri Jul 03, 2015 15:11
Location: Townsville, Australia


Return to Portage|Emerge Package Managers

Who is online

Users browsing this forum: No registered users and 1 guest