skimppimppin along! NEWS   FORUM   DOWNLOAD   LINKS    
HOME ACCOUNT PRIVATE MESSAGE  
Login
Username:

Password:


Lost Password?

Register now!

Main Menu

Search

skimpydog.com Forum Index
   Gentoo Base
  Portage

Browsing this Thread:   2 Anonymous Users

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
Portage
#1
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8767
EXP : 83
Group:
Webmasters
Registered Users
Offline
Working with portage is quite a hassle at times - it really depends on what you are needing as to what you will have to do.

For example, if you are using old packages (outdated system), and there are many updates available, you may have to update many packages in order to satasify dependencies. Often it is good to limit the package that is allowed to be used by using "/etc/portage/package.mask" if you are happy with your current build, and upgrade as necessary.

Sometimes you will emerge something, and it will build and install properly, and other times there will be an error.

Often you will need to unmask a package in order to build it in, and you WILL NOT want these packages to be reemerged if you were to "emerge world" in the future - the package will remain on the system, but will not re-emerge.

Therefore there's the "--oneshot", or "-1" flag.


A good example for this, as of today anyhoo (12/18/2009), is emerging "gnome-system-tools" (hard masked, and arch masked), and I will show the difference with ntp-client (no mask).

First off, use etc/portage/package.keywords to tell the system it is allowed to be installed (even though it's masked).

Then, use /etc/portage/package.unmask to tell your system which version is allowed to be installed.

Therefore, I assume you will have a list of applications you use in your package.keywords, such as:

vi /etc/portage/package.keywords
app-admin/system-tools-backends
app-admin/system-tools
dev-libs/liboobs


In package.unmask, you will require the same as, or similar to the following (apparently this will depend on portage, this is what I decided to use):

vi /etc/portage/package.unmask
=app-admin/gnome-system-tools-2.20.0
=app-admin/system-tools-backends-2.6.1-r1
=dev-libs/liboobs-2.20.0


Then you can emerge what you need:

Emerge gnome-system-tools liboobs oneshot accepting ~x86 packages without building in samba support
ACCEPT_KEYWORDS="~x86" USE="-samba" emerge -p1Nv gnome-system-tools liboobs


In the command, there are a few things that are being done.

First:
ACCEPT_KEYWORDS="~x86"

This is being used to prevent us from screwing anything up by allowing the emergence of packages that are being tested - globally.

--This is merely allowing us to emerge "~x86" packages for only what is being emerged.

-- Since we are limiting the versions of these packages as it is using the "package.unmask", it should be apparent as to what will be emerged, and from what tree (stable {no mask} or tested {masked}).
-- now we could just add the "~x86" flag to package.unmask, such as
=app-admin/gnome-system-tools-2.20.0 ~x86
=app-admin/system-tools-backends-2.6.1-r1~x86
=dev-libs/liboobs-2.20.0~x86
but I do not want to allow this because I do not want to continue to use testing packages once a stable release is unmasked (in otherwords, I want to prevent this from being emerged automatically - I can manually remove the unmask, and keywords once this have been marked as stable).

Second:
USE="-samba"

This is being done because apparently the package "dev-libs/liboobs" has issues with samba at the moment.
-- Since my /etc/make.conf includes samba, I have to manually remove this from being built in to prevent known build errors.

Third:
emerge -p1Nv gnome-system-tools liboobs

This will allow the following:
Emerge
-p == --pretend (Let's see what portage wants to do first)
-1 == --oneshot (do not add package to world file as it's being tested)
-N == --newuse (I recently modified my use flags in /etc/make.conf)
-v == --verbose (I like to see what's going on)
gnome-system-tools & liboobs


Make it live on boot:
rc-update add system-tools-backends default


Depending on how updated your system is, there may be several packages included for the install.

If you notice the packages that are wanting to be built in all are "~x86" packages, you may want to install stable builds for what you can, then install testing packages as needed.



emerge ntp:
emerge -pv ntp
cp /usr/share/ntp/ntp.conf /etc/ntp.conf
rc-update add ntp-client default

--The first line will emerge ntp-client, related packages (dependencies).
--The second line will copy the sample config to the proper location.
--The third line will start the service on boot.
Posted on: 2009/12/18 18:31
Create PDF from Post Print
Top
Re: Portage
#2
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8767
EXP : 83
Group:
Webmasters
Registered Users
Offline
Knowing which files you may be required to edit, and what should be in them can be a challenge to keep up with.

Here are a couple files from my test environment to show as example:

/etc/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="-O2 -march=i686 -pipe"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"
USE="flac mad ogg theora vorbis dvb Azur Cobalt Djoole
Glattering I_Cairo MacOSX TapisVert Ubuntu Verde Wood
gnome-keyring latex3 music omega pstricks publishers
science tex4ht xetex xindy builder texlive exif bonjour
ipod musicbrainz bash-completion bluetooth gphoto2 fuse
chaplin dvdr dvdrip a52 cdaudio cdda wavpack wma sndfile
fam resolvconf dhcpcd mail powermanager shortcuts
showDesklets showDesktop slider stacks switcher systray
terminal tomboy weather wifi xmms alsaMixer clock cpusage
dustbin gauge-test Cairo-Penguin Dbus logout netspeed
compiz-icon win32codecs gnomecd sound dri autoipd usb xv
xvid consolekit compiz-fusion themes rendering gnome-integration
divx quicktime realmedia wmp en_US gmedia branding emerald
mmx mikmod cleartype directfb joystick glitz svg english gd
samba gnome zip mysql apache2 php ffmpeg raw win32codex ftp
mg2 cgi spell xml bzip2 tar.gz acpi curl pdf avi mpg mpeg
jadetex truetype vim mp3 utils -selinux java Xaw3d laptop
dvd cups zlib jpeg jpeg2k gif bmp png jpg python dbus tetex
hal gtk gnome opengl cairo -arts -qt3 -qt4 -kde alsa cdr
e16 enlightenment X glibc Locales mdnsresponder-compat"
INPUT_DEVICES="keyboard mouse evdev synaptics vmmouse"
VIDEO_CARDS="intel radeon nv voodoo fbdev sis tdfx trident vesa vmware glint "
LINGUAS="en_US"
CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv
clicksmart310 digigr8 digita dimagev dimera3500 directory
enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a
kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200
kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek
panasonic_coolshot panasonic_dc1000 panasonic_dc1580
panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung
sierra sipix_blink sipix_blink2 sipix_web2 smal sonix
sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674
stv0680 sx330z template topfield toshiba_pdrm11"
source /usr/local/portage/layman/make.conf
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/ /usr/local/portage/cairo-dock-overlay/"


/etc/portage/package.keywords
dev-python/compizconfig-python
x11-wm/compiz
x11-wm/compiz-fusion
x11-plugins/compiz-plugins-main
x11-plugins/compiz-plugins-extra
x11-plugins/compiz-plugins-unsupported
x11-wm/emerald
x11-themes/emerald-themes
x11-apps/ccsm
x11-libs/libcompizconfig
x11-libs/compizconfig-backend-gconf
x11-libs/compizconfig-backend-kconfig
x11-libs/compiz-bcop
x11-apps/simple-ccsm
x11-apps/fusion-icon
app-admin/system-tools-backends
app-admin/system-tools
dev-libs/liboobs


/etc/portage/package.mask
>dev-lang/python-2.6
>dev-python/pycairo-1.4.12
>sys-fs/udev-126
>dev-python/gnome-python-base-2.26.1
>dev-python/gnome-desktop-python-2.26.0
>dev-python/libgnomecanvas-python-2.26.1
>dev-python/libgnomeprint-python-2.26.0
>media-sound/alsa-utils-1.0.17
>dev-python/gnome-python-desktop-base-2.26.0
>dev-python/gnome-keyring-python-2.26.0
>dev-python/libwnck-python-2.26.0
>gnome-base/gnome-control-center-2.26.0
>gnome-base/gnome-2.26.3
#>x11-drivers/xf86-video-intel-2.6.3-r1
#>x11-base/xorg-server-1.5.3-r6


/etc/portage/package.unmask
=app-admin/gnome-system-tools-2.20.0
=app-admin/system-tools-backends-2.6.1-r1
=dev-libs/liboobs-2.20.0


/etc/portage/package.use
gnome-base/gnome-sesion branding
Posted on: 2009/12/18 19:30
Create PDF from Post Print
Top
Re: Portage
#3
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8767
EXP : 83
Group:
Webmasters
Registered Users
Offline
So a lil bit about portage, ebuilds, and masking or masked packages.

The ebuild file is reference to the repo that the download will be obtained from. This also dictates what build of the package you want/need.

The ebuild will declare what the package depends on, and what packages will depend on it.

On occasion you will find a 9999 build. These builds are development releases - can be buggy.

If you need to install one of these dev releases you may add like the following for the package to your /etc/portage/package.keywords:
echo "=www-client/chromium-bin-9999 **" >> /etc/portage/package.keywords

-- Don't forget to add the "**" at the end of it or you will not be able to use that ebuild.
Posted on: 2010/2/20 11:51
Create PDF from Post Print
Top
Re: Portage
#4
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8767
EXP : 83
Group:
Webmasters
Registered Users
Offline
I would like to mention about the file:

/var/lib/portage/world

Inside of it are the list of apps you have installed, or are installed; and let's say you install something such as:

www-client/chromium-bin-9999

Technically this would be an unstable package, and you would need to hard-unmask it with:

echo "=www-client/chromium-bin-9999 **" >> /etc/portage/package.keywords


Then let's say you perform the command:

emerge -v =www-client/chromium-bin-9999


This will add the file to be re-installed in the future to your "world". This means it will try to re-install it later, and let's say that you do not want it to be installed later, you just want it installed, and that's that.

This means you meant to have run:
emerge -v1 =www-client/chromium-bin-9999

*The -1 (--oneshot) will prevent the file from being added to the world file (database).

You can Remove or Remark it out of the world file with:

vi /var/lib/portage/world


Then put a "#" at the beginning of the line, or just remove it.

Such as:
...
sys-process/vixie-cron
virtual/libc
www-apps/mythweb
#www-client/chromium-bin
www-client/elinks
www-client/firefox
www-plugins/adobe-flash
...


The next time you go to "emerge -pv world", it will not harass you telling you it's maskACCEPT_KEYWORDS="~x86"ed, or even no longer available. Although if it's no longer available, you may not want to keep that copy, and instead remove the installed, and install the newer release.

I re-iterate this because anytime you use:
ACCEPT_KEYWORDS="~x86"

or anything like this, you may not want to stay on that unstable build - this can be damaging to your system long term if you are not careful.
Posted on: 2010/11/21 1:16
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.
Links