Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
permanent package.unmask & package.mask
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Redson
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2003
Posts: 137

PostPosted: Thu Jul 24, 2003 5:43 am    Post subject: permanent package.unmask & package.mask Reply with quote

Every time you sync your portage tree, /usr/portage/profiles/package.mask is overwritten with a new one, which means any changes you've made to it are lost. But what if you're using, say, the Abiword development version and don't want to have to update one file every single time you emerge rsync? Until recently, unhealthy hacks or complicated home-brewed shell scripts were necessary, but the portage gods have recently provided us with a safe way to override the package.mask file. Two ways in fact: one to unmask packages, and one to mask packages that keep trying to install themselves every time you emerge -up world.

If you want (for example) the development version of Abiword to be unmasked, you first need to create the directory in which these new files will reside. As root, type:
Code:
# mkdir /etc/portage

Note that this directory is in /etc, not /usr like the main .mask file.

Now to unmask the Abiword development version. Fire up your favorite text editor and open up /etc/portage/package.unmask and add the following:
Code:
>=app-office/abiword-1.99.0


Now test it out to make sure this works. emerge sync and search for abiword and you should see:
Code:
# ACCEPT_KEYWORDS='~x86' emerge -s abiword
Searching...
[ Results for search key : abiword ]
[ Applications found : 1 ]
 
*  app-office/abiword
      Latest version available: 1.99.1
      Latest version installed: 1.99.1
      Size of downloaded files: 17,675 kB
      Homepage:    http://www.abisource.com
      Description: Fully featured yet light and fast cross platform word processor.


And you'll never have to update /usr/portage/profiles/package.mask again! But what about running emerge -up world still trying to install the old version of abiword? This can be remedied with your own personal package.mask. Open your favorite text editor again and open up /etc/portage/package.mask and insert the following:
Code:
<app-office/abiword-1.1

And emerge -up world will stop trying to convince you that you need that old and annoyingly bug-free version of abiword.

This is also the correct way for those of you who don't want to see apache-2 and mysql-4 anywhere near your machines, but would still like updates of the apache-1 and/or mysql-3 series. Just add the following to /etc/portage/package.mask:
Code:
>=net-www/apache-2
>=dev-db/mysql-4.0.0

and portage will never try and upgrade your version of apache to apache-2 or your database to mysql-4 while still maintaing bug fixes and other updates to the apache-1 and mysql-3 series.

EDIT: If you mask the apache2 series, make sure you have +apache and -apache2 in your use variables so you get the right versions of mod_php and other extensions.

Hope that helps some people out there, let me know if you feel I should change/add something!

Take care
_________________
Redson
http://watchred.com/


Last edited by Redson on Thu Jul 24, 2003 4:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 146
Location: Ohio

PostPosted: Thu Jul 24, 2003 10:59 am    Post subject: Reply with quote

Thanks! I was actually looking for info/experiences of people who have upgraded Apache 1.3 > 2.0 on Gentoo.. As I run a web server, it's a bit of a hassle.. This will allow me to update everything else (MySQL and PHP) without causing any serious problems... I think. At least I can mask out Apache 2 and handle the easier things (MySQL and PHP shouldn't be too rough).
Back to top
View user's profile Send private message
Corvy
n00b
n00b


Joined: 16 Apr 2003
Posts: 34

PostPosted: Mon Aug 11, 2003 11:07 pm    Post subject: Reply with quote

I just found that creating a package.unmask in /etc/portage works nicely aswell. Just add the line that you want to be unmasked from /usr/portage/profile/package.mask to /etc/portage/package.unmask and you are free to go! :)
_________________
Best regards
Stian B. Barmen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum