Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Unmask script

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
jagerman
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Thu Jun 27, 2002 6:42 pm
Location: Vancouver, BC, Canada

Unmask script

  • Quote

Post by jagerman » Fri Mar 21, 2003 6:36 pm

For whatever reason, the gentoo developers seem to throw everything into package.mask - though on some rare occasions, they'll use the ~x86, seemingly at random. I'd much rather have something else - `x86 perhaps - which is used for beta programs, in addition to the ~x86 for experimental ones.

Thus, to fix my problem, a couple months ago I got fed up enough. Every time I `emerge rsync', it replaces the package.mask file, which I had, of course, changed. Then, the several packages that I've unmasked are of course masked again, and the few masks that I added myself for packages that aren't working for me are removed. So, it made an `emerge rsync' a painstaking process - so I wrote a script called 'unmask', which simply had a big perl regular expression for unmasking packages, and a list of packages to add to the end of package.mask. After each emerge rsync, I'd just run my script and I'd have all the unwanted masks commented out, and all the wanted ones added back in.

It worked for me for a couple months (I unmask about 25 packages, and mask 8), until a friend of mine decided to write something much more sophisticated (it beats me as to why, since he just adds two masks, but he did). This new one is far more sophisticated in that it doesn't simply have a list of things in the file, as mine did, but it performs a merge of /usr/local/portage/profiles/package.mask and the /usr/portage/profiles/package.mask.

Since there is no way to attach a file to a post (hint, hint, forum maintainers), I've put it up here:

http://www.gforum.org/unmask

It requires perl, PORTDIR_OVERLAY enabled, and a $PORTDIR_OVERLAY/profiles/package.mask file.

Here is my sample /usr/local/portage/profiles/package.mask file:

Code: Select all

# Don't want to deal with this yet
>=dev-perl/mod_perl-1.99
# Don't want to deal with this yet
>=net-www/apache-2
# The ATI drivers don't support this yet
>=x11-base/xfree-4.2.99
# Can't emerge this until I find a new working kernel
>=sys-apps/lm_sensors-2.7.0
# Broken kernel
=sys-kernel/gentoo-sources-2.4.20-r1
# won't compile. Darn.
=app-text/docbook-sgml-utils-0.6.12
# Doesn't compiled (missing semicolons!? Who releases these ebuilds??)
=net-fs/samba-2.2.8_pre1
# Reports speed as -inf
>=sys-apps/hdparm-5.3

# <azarah@gentoo.org> (07 Jan 2003)
# new alpha release.  do not use tmpfs by default for dep cache, and
# move dep cache dir to /var/state/init.d.  also some raid updates.
!>=sys-apps/baselayout-1.8.6.0
#!=sys-apps/baselayout-1.8.6.1
#!=sys-apps/baselayout-1.8.6.2
#!=sys-apps/baselayout-1.8.6.3
#!=sys-apps/baselayout-1.8.6.4

# <phoenix@gentoo.org> (21 Nov 2002)
# The huge nsplugins mask. These plugins use
# the new layout (/usr/lib/nsbrowser/plugins)
# and should work in both mozilla and phoenix.
!=app-text/acroread-5.06-r2
!=net-www/netscape-flash-6.0b-r1
!=net-www/netscape-plugger-4.0-r2
!=media-video/realplayer-8-r3
!=app-text/djvu-3.5.9-r1
!=dev-java/sun-jdk-1.4.1.01-r1
!=dev-java/sun-jdk-1.3.1.06-r1
!=dev-java/ibm-jdk-1.4.0-r2
!=dev-java/ibm-jre-1.4.0-r2
!=dev-java/ibm-jdk-1.3.1-r2
!=dev-java/ibm-jre-1.3.1-r2

# MySQL 4
!>=dev-db/mysql-4.0.1_alpha

# Gtk2 version of glade:
!>=dev-util/glade-1.1.0
!>=dev-util/glademm-1.1.0

# gimp-1.3 supports perl 5.8 (1.2 does not)
!>=media-gfx/gimp-1.3.5

# evolution beta and friends. may cause breakage!
!>=net-mail/evolution-1.3.1
!>=gnome-extra/gal-1.99
!>=app-text/gnome-spell-1.0
!>=gnome-extra/gtkhtml-3.0
!>=gnome-extra/libgtkhtml-3.0
!>=net-libs/libsoup-1.99

# depends on moz gtk2 which is not well tested yet
!>=net-www/galeon-1.3.2
The items with a leading ! indicate something for the script to unmask, otherwise the mask is added to the normal packages.mask file. What's interesting to note is this:

!>=sys-apps/baselayout-1.8.6.0

That does just what you expect it to do - it unmasks any baselayout mask that applies to 1.8.6.0 or above (thus actually unmasking 5 lines in the file).

Please download it, and give it a try - I saved it to /usr/local/bin/unmask, but anywhere in your path will work. If you use sudo, as I do, it'll let you run it as a user; otherwise you have to be root.
Top
bsolar
Bodhisattva
Bodhisattva
User avatar
Posts: 2764
Joined: Sun Jan 12, 2003 5:14 pm

  • Quote

Post by bsolar » Fri Mar 21, 2003 7:03 pm

That's interesting, and you might want to write a report in bugzilla. It's the right place to propose improvments of portage.
I may not agree with what you say, but I'll defend to the death your right to say it.
Top
axxackall
l33t
l33t
User avatar
Posts: 651
Joined: Wed Nov 06, 2002 4:04 pm
Location: Toronto, Ontario, 3rd Rock From Sun

  • Quote

Post by axxackall » Fri Mar 21, 2003 7:22 pm

Excelent implementation! I did something similar with my home-made scripts (same concept with custom masks in OVERLAY), planning to generalize it. But now I'll throw it away. Your way is much better.

I recommend you to submit it to bugzilla - perhaps they will include it into gentoolkit. Many users will appreciate it. If you are in doubts about users - use a Poll in the chat forum.
Top
jagerman
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Thu Jun 27, 2002 6:42 pm
Location: Vancouver, BC, Canada

  • Quote

Post by jagerman » Fri Mar 21, 2003 8:02 pm

axxackall wrote:I recommend you to submit it to bugzilla - perhaps they will include it into gentoolkit.
Done!

http://bugs.gentoo.org/show_bug.cgi?id=17952
Top
bline
n00b
n00b
Posts: 2
Joined: Thu Oct 17, 2002 8:49 pm
Location: Vancouver
Contact:
Contact bline
Website

Re: Unmask script

  • Quote

Post by bline » Fri Mar 21, 2003 8:51 pm

jagerman wrote:(it beats me as to why, since he just adds two masks, but he did).
Hey, I plan on adding more later...
Top
jagerman
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Thu Jun 27, 2002 6:42 pm
Location: Vancouver, BC, Canada

Re: Unmask script

  • Quote

Post by jagerman » Fri Mar 21, 2003 9:18 pm

bline wrote:Hey, I plan on adding more later...
I was just messing around (my original unmask script was just a big hack, and a nuissance to add to) - hopefully this'll make it into gentoolkit.
Top
jagerman
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Thu Jun 27, 2002 6:42 pm
Location: Vancouver, BC, Canada

  • Quote

Post by jagerman » Mon Mar 24, 2003 3:41 am

I've uploaded an updated version, with a few changes - such as comments, and I switched it to use '/usr/lib/portage/bin/portageq' instead of parsing 'emerge info' - but unfortunately it makes it slow because each call takes about half a second - on my Athlon 3000++ system. Nice fast Python. :evil:
Top
NeGz
n00b
n00b
User avatar
Posts: 4
Joined: Tue Mar 11, 2003 2:20 pm
Location: Perth, WA
Contact:
Contact NeGz
Website

  • Quote

Post by NeGz » Wed Jul 16, 2003 9:57 pm

That's the most useful thing I've seen all day, thanks jagerman and co.
Works well for masking the latest baselayout quickly after an emerge sync, since it breaks glftpd's zipscript for me.

As mentioned earlier, this would be very handy built into portage, perhaps as emerge --unmask sync, or just something it does as standard, though emerge sync && unmask works fine for now. :)
Top
jagerman
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Thu Jun 27, 2002 6:42 pm
Location: Vancouver, BC, Canada

  • Quote

Post by jagerman » Wed Jul 16, 2003 10:22 pm

NeGz wrote:As mentioned earlier, this would be very handy built into portage, perhaps as emerge --unmask sync, or just something it does as standard, though emerge sync && unmask works fine for now. :)
Given the direction Gentoo seems to be taking lately*, I doubt this will ever making it into emerge. A gentoolkit tool, perhaps, but emerge is doubtful.

* This is my feeling of late - developers are slow to release new or updated ebuilds, and experimental packages/releases are officially "BAD" - witness the CVS package purge, for example. ~x86 tends to be the "testing" phase of packages, rather than the "experimental" phase it was meant to be. Don't get me wrong - I still think Gentoo's above any other distribution, but it's losing some of the "cool" factor by going more mainstream in packages and development. :( I guess that's what happen when things get bigger. :cry:
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

  • Quote

Post by robmoss » Thu Jul 17, 2003 2:22 am

I take it you know about /etc/portage/package.unmask?

However, I must say, I've been getting increasingly irritated at the fact that I'm unable to mask multiple (or even all) versions of specific packages myself. This should be very useful, and hopefully a little easier to work with than my rather confusing concatenation of sed-based shell scripts. Thanks! :D
Top
TGL
Bodhisattva
Bodhisattva
Posts: 1978
Joined: Sun Jun 02, 2002 12:13 pm
Location: Rennes, France

  • Quote

Post by TGL » Sat Jul 19, 2003 4:37 pm

robmoss2k wrote:However, I must say, I've been getting increasingly irritated at the fact that I'm unable to mask multiple (or even all) versions of specific packages myself.
With portage-2.0.48-*, you can create a custom mask file, named /etc/portage/profiles/package.mask. Syntax is the same as the /usr/portage/profiles/package.mask, think of it as if it was concatenate to the official mask (actually, it's nearly what is done). With portage-2.0.49_pre*, it should be named /etc/portage/package.mask, which is more consistent with the package.unmask.[/i]
Top
jagerman
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Thu Jun 27, 2002 6:42 pm
Location: Vancouver, BC, Canada

  • Quote

Post by jagerman » Sat Jul 19, 2003 10:36 pm

The /etc/portage/package.{mask,unmask} files (2.0.49_pre) are pretty nice; I've stopped using the unmask script above in favour of them. It doesn't do everything the unmask script does, but it does what I need nontheless. I only wish it was documented somewhere (perhaps creating empty package.mask/unmask files with descriptive comments at the top) as to exactly what the files do (hint, hint).
Top
xlyz
Veteran
Veteran
User avatar
Posts: 1470
Joined: Sun Oct 27, 2002 8:04 pm
Location: Italy

  • Quote

Post by xlyz » Tue Jul 29, 2003 7:47 pm

I feel dumb but I'm not able to use package.unmask

does it work with latest stable portage (currently 2.0.48-r5)? how?

EDIT ****

never mind, I were dumb. I was just using > instead of < :oops:
Top
Post Reply

13 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic