Find the answer to your Linux question:
Results 1 to 6 of 6
Good day, I was wondering, what is portage tree. Is it a list of the available progra,s/applications that you can emerge, applications that you have installed, int he portage tree ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2003
    Location
    UK - England
    Posts
    19

    Portage Tree?


    Good day,

    I was wondering, what is portage tree. Is it a list of the available progra,s/applications that you can emerge, applications that you have installed, int he portage tree are they flagged as installed? How does it work?

    DislexiK

  2. #2
    Just Joined! chammer's Avatar
    Join Date
    Oct 2004
    Location
    Hampton, VA, USA
    Posts
    14

    Re: Portage Tree?

    Quote Originally Posted by DislexiK
    Good day,

    I was wondering, what is portage tree. Is it a list of the available progra,s/applications that you can emerge, applications that you have installed, int he portage tree are they flagged as installed? How does it work?

    DislexiK
    the portage tree is basically a directory based layout of applications which are available for you to install through the portage system (though you are free to install apps yourself).

    it doesnt really show you what you have installed, though you can do like emerge -p foo and it will tell you for instance:

    Latest Version Available: x.x.x
    Latest Version Installed: x.x.x

    however, you can install a util called 'epm' which is available through portage (emerge -p epm) and run it like so:

    mercury: ~> epm -qa|grep postfix
    postfix-2.1.3

    which is a nifty way of seeing what you have installed and what version it is.

    as for the final question, yes they are flagged as installed once the emerge is completed. the portage system keeps a running database of whats installed, what version is installed, what compile settings you used, and more under /var/db/pkg.

    hope this helps.

  3. #3
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    They way I've understood it it's a list/tree of applications. It contains meta data about the apps (meta data = data about the data, think "description, size of the apps"), and it also contains instrucitons for emerge which tells it how it should emerge the app, what files to use and what requirements it has, what it provides (eg it provides somethign some other app has as an depency/requirement - for instance: cdrtools provides "cdrtools" which X-CD-Roast depends on, so if I "emerge xcdroast" it will check is "cdrtools" is installed, if not it installs that before X-CD-Roast is installed).
    The protage tree can be showed with this command (note: this is probably not the prefereable way, but it sort of works )
    Code:
    tree -d /usr/portage/ | grep -v files
    it'll print loads of lines, add ' | less' to the end of the command above if you want to use arrowkeys/pageup/pagedown to scroll the output.
    it starts like this for me:
    Code:
    /usr/portage/
    |-- app-accessibility
    |   |-- SphinxTrain
    |   |-- at-poke
    |   |-- brltty
    |   |-- dasher
    |   |-- eflite
    |   |-- emacspeak
    |   |-- emacspeak-ss
    |   |-- epos
    as we can see it starts with the "app-accessibillity" 'branch', the 'branch' contains applications, which are accessibillity apps (if it wasn't clear).
    there are many other branches, eg, games-arcade, games-rpg, net-www.
    Usually you don't need to know the branch of which an app belongs, you usually just need to type: "emerge appname".

    I think info like if the app is installed is stored in the portage-tree. I think there is a more detailed and better description of the portage on the gentoo homepage, www.gentoo.org
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Nov 2003
    Location
    UK - England
    Posts
    19
    Thank you the both of you, thats exactly the information I was looking for, in regards to the meta data is this stored in the portage tree for example:

    /usr/portage/
    |-- app-accessibility
    | |-- SphinxTrain

    For SphinxTrain directory it would consist of the dependencies, infromation about the program etc here? And if I were to install this, it would mark down the install and the version in the database of the programs I have installed via emerge?

    Kind Regards

    DislexiK

  6. #5
    Just Joined! chammer's Avatar
    Join Date
    Oct 2004
    Location
    Hampton, VA, USA
    Posts
    14
    Quote Originally Posted by DislexiK
    Thank you the both of you, thats exactly the information I was looking for, in regards to the meta data is this stored in the portage tree for example:

    /usr/portage/
    |-- app-accessibility
    | |-- SphinxTrain

    For SphinxTrain directory it would consist of the dependencies, infromation about the program etc here? And if I were to install this, it would mark down the install and the version in the database of the programs I have installed via emerge?

    Kind Regards

    DislexiK
    in the example you have given, here is whats in the directory for it:

    orion: /usr/portage/app-accessibility/SphinxTrain> ls
    ChangeLog Manifest SphinxTrain-0.9.1-r1.ebuild files metadata.xml

    ChangeLog lists changes for the ebuilds or anything else relating to the port itself (not an application changelog as you'd expect).

    Manifest is md5sum's of the files for the application which get download. if the md5sum on any file doesnt match against those in the Manifest, it doesnt get merged.

    file-version.ebuild is the brains. it tells portage what the app is, what dependencies it has and the versions it requires of those deps, any specific use flags it needs and basically tells portage what to merge when, how, and how to clean up after itself.

    files is a directory containing any extra files that need to be run against the downloaded tarball, patches for example.

    here is a listing of that one for this example:

    orion: /usr/portage/app-accessibility/SphinxTrain/files> ls
    digest-SphinxTrain-0.9.1-r1 gcc.patch

    and lastly...

    metadata.xml contains some basic information in xml format about what the application is, where its home page is, and what catagory the application is considered as. in this case its accessibility/sound.

    hope this helps.

  7. #6
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    And if you're still looking for a very nifty way to view the gentoo portage tree, check out http://www.gentoo-portage.com

    They have a very featureful gentoo site running there, including USE guides and the complete portage tree.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •