Difference between pages "User:Armanx" and "Install/Portage"

(Difference between pages)
(Created page with "{{Person |Full name=Arman R. Awatin |Email=arman@pnpa.edu.ph |Nick=armanx |Geoloc=14.609390343238172, 121.05513095855713 |Location name=CPSM, Camp Crame, Quezon City, Philippi...")
 
m (Increase consistency of formatting)
 
Line 1: Line 1:
{{Person
+
<noinclude>
|Full name=Arman R. Awatin
+
{{InstallPart|an introduction to Portage}}
|Email=arman@pnpa.edu.ph
+
</noinclude>
|Nick=armanx
+
=== Introducing Portage ===
|Geoloc=14.609390343238172, 121.05513095855713
+
 
|Location name=CPSM, Camp Crame, Quezon City, Philippines
+
Portage, the Funtoo Linux package manager has a command called <code>emerge</code> which is used to build and install packages from source. It also takes care of installing all of the package's dependencies. You call emerge like this:
|Roles={{Role
+
 
|Role type=User
+
<console>
|Role desc=messin around
+
(chroot) # ##i##emerge packagename
|Start date=2009/02/11
+
</console>
}}
+
 
|Maintains=
+
When you install a package by specifying its name in the command-line, Portage records its name in the <code>/var/lib/portage/world</code> file. It does so because it assumes that, since you have installed it by name, you want to consider it part of your system and want to keep the package updated in the future. This is a handy feature, since when packages are being added to the <code>world</code> set, we can update our entire system by typing:
|Blogs=
+
 
}}
+
<console>
yo!
+
(chroot) # ##i##emerge --sync
 +
(chroot) # ##i##emerge -auDN @world
 +
</console>
 +
 
 +
This is the "official" way to update your Funtoo Linux system. Above, we first update our Portage tree using git to grab the latest ebuilds (scripts), and then run an emerge command to update the <code>world</code> set of packages. The options specified tell <code>emerge</code> to:
 +
 
 +
* '''<code>a</code>''' - show us what will be emerged, and '''ask''' us if we want to proceed
 +
* '''<code>u</code>''' - '''update''' the packages we specify -- don't emerge them again if they are already emerged.
 +
* '''<code>D</code>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.
 +
* '''<code>N</code>''' - Update any packages that have changed ('''new''') USE settings.
 +
 
 +
You should also consider passing <code>--with-bdeps=y</code> when emerging @world, at least once in a while. This will update build dependencies as well.
 +
 
 +
Of course, sometimes we want to install a package but not add it to the <code>world</code> file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:
 +
 
 +
<console>
 +
(chroot) # ##i##emerge -1 packagename
 +
</console>
 +
 
 +
Advanced users may be interested in the [[Emerge]] wiki page.
 +
 
 +
==== Updating World ====
 +
 
 +
Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.
 +
 
 +
<console>
 +
(chroot) # ##i##emerge --sync
 +
(chroot) # ##i##emerge -auDN @world
 +
</console>
 +
 
 +
{{fancyimportant|1=
 +
Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.}}

Revision as of 03:08, February 15, 2015


Note

This is a template that is used as part of the Installation instructions which covers: an introduction to Portage. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.


Introducing Portage

Portage, the Funtoo Linux package manager has a command called emerge which is used to build and install packages from source. It also takes care of installing all of the package's dependencies. You call emerge like this:

(chroot) # emerge packagename

When you install a package by specifying its name in the command-line, Portage records its name in the /var/lib/portage/world file. It does so because it assumes that, since you have installed it by name, you want to consider it part of your system and want to keep the package updated in the future. This is a handy feature, since when packages are being added to the world set, we can update our entire system by typing:

(chroot) # emerge --sync
(chroot) # emerge -auDN @world

This is the "official" way to update your Funtoo Linux system. Above, we first update our Portage tree using git to grab the latest ebuilds (scripts), and then run an emerge command to update the world set of packages. The options specified tell emerge to:

  • a - show us what will be emerged, and ask us if we want to proceed
  • u - update the packages we specify -- don't emerge them again if they are already emerged.
  • D - Consider the entire dependency tree of packages when looking for updates. In other words, do a deep update.
  • N - Update any packages that have changed (new) USE settings.

You should also consider passing --with-bdeps=y when emerging @world, at least once in a while. This will update build dependencies as well.

Of course, sometimes we want to install a package but not add it to the world file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:

(chroot) # emerge -1 packagename

Advanced users may be interested in the Emerge wiki page.

Updating World

Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.

(chroot) # emerge --sync
(chroot) # emerge -auDN @world
Important

Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.