Gentoo Forums
Gentoo Forums
Quick Search: in
(SOLVED)How do I manage the 'world' file?
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Sun Nov 26, 2006 12:43 pm    Post subject: (SOLVED)How do I manage the 'world' file? Reply with quote

I do an emerge -auvDN world regurarly. There are some ebuilds that I don't want to update (e.g. gcc). What the is the correct way to remove (or add) ebuilds to the world profile?
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg


Last edited by Aniruddha on Tue Nov 28, 2006 1:33 am; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Veteran
Veteran


Joined: 14 Jul 2005
Posts: 5780

PostPosted: Sun Nov 26, 2006 1:12 pm    Post subject: Reply with quote

package.keywords, package.mask and package.unmask - there's a zillion postings on the forums about these files.

This is a different concept to the "world" file.
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Sun Nov 26, 2006 1:46 pm    Post subject: Reply with quote

PaulBredbury wrote:
package.keywords, package.mask and package.unmask - there's a zillion postings on the forums about these files.

This is a different concept to the "world" file.


Thanks for stating the obvious. :wink: I was searching for phrases like 'editing' + 'world' therefor I didn't find much. I thought I needed to edit /var/lib/portage/world by hand or something like that. With your suggestions I found a very good thread here:
http://gentoo-wiki.com/TIP_Best_practice_to_ignore_an_update

If I understand correctly I do:
Code:
# nano -w /etc/portage/package.mask

add the line:
Code:
sys-devel/gcc

And no more gcc update with emerge -auvDN world?!
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
loki99
Veteran
Veteran


Joined: 10 Oct 2003
Posts: 1955
Location: Vienna, €urope

PostPosted: Sun Nov 26, 2006 2:00 pm    Post subject: Reply with quote

No not quite. You need to add which version should be masked, something like ....
Code:
>=sys-devel/gcc-4.0.2-r3

...depending on what you want.

For more info take a look at this here. :wink:
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Sun Nov 26, 2006 3:03 pm    Post subject: Reply with quote

loki99 wrote:
No not quite. You need to add which version should be masked, something like ....
Code:
>=sys-devel/gcc-4.0.2-r3

...depending on what you want.

For more info take a look at this here. :wink:


Ok now I am confused :roll:. I now have gcc 4.1.1-r1 and I dont want to upgrade to the next major version(s). What do I put in my package.mask?
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 177
Location: Malmö, Sweden

PostPosted: Sun Nov 26, 2006 3:11 pm    Post subject: Reply with quote

Try to put
Code:
>sys-devel/gcc-4.1.1-r1
in /etc/portage/package.mask. There's more info about this in the portage man page.
_________________
man cannot be brave without being afraid
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Sun Nov 26, 2006 3:53 pm    Post subject: Reply with quote

Thanks for your patience and help. I try to grasp the idea here. I will sum the possibilities I see

Code:
Adding to package.mask :
sys-devel/gcc                           means that every version of gcc is masked
=sys-devel/gcc-4.0.2-r3            means that only gcc-4.0.2-r3  is masked
>sys-devel/gcc-4.1.1-r1            means that only packges greater than gcc-4.1.1-r1 are masked
<sys-devel/gcc-4.1.1-r1            means that every version below gcc-4.1.1-r1 is masked


Is this correct?
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
Genone
Developer
Developer


Joined: 14 Mar 2003
Posts: 7389
Location: in a weird world

PostPosted: Sun Nov 26, 2006 6:17 pm    Post subject: Reply with quote

HXC wrote:
Thanks for your patience and help. I try to grasp the idea here. I will sum the possibilities I see

Code:
Adding to package.mask :
sys-devel/gcc                           means that every version of gcc is masked
=sys-devel/gcc-4.0.2-r3            means that only gcc-4.0.2-r3  is masked
>sys-devel/gcc-4.1.1-r1            means that only packges greater than gcc-4.1.1-r1 are masked
<sys-devel/gcc-4.1.1-r1            means that every version below gcc-4.1.1-r1 is masked


Is this correct?

correct
Back to top
View user's profile Send private message
k0001
n00b
n00b


Joined: 12 Jun 2006
Posts: 38

PostPosted: Sun Nov 26, 2006 6:23 pm    Post subject: Reply with quote

yup, and you can use ">=" or "<=" too.
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Tue Nov 28, 2006 1:33 am    Post subject: Reply with quote

Great! Thanks for helping me understand. :)
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Tue Jan 09, 2007 12:38 pm    Post subject: Reply with quote

I wonder if I can use the oneshot option to remove gcc from the world?

Code:
emerge  --oneshot sys-devel/gcc


Is this advisable?
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
hielvc
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 2483
Location: Escondido, Ca

PostPosted: Tue Jan 09, 2007 1:52 pm    Post subject: Reply with quote

The --oneshot prevents adding the package to your world file, it doesnt remove it from your world file.

To look at your world file
Code:
sort /var/lib/portage/world
will give you a sorted world file listing. To check your world file ' emaint -wp ' or " emerge udept " and run " dep -wp ".

To remove a package and remove it from your world (if its in your world file) " emerge -C pkg ". DONOT DO THIS WITH linux-headers, glibc, binutils and gcc :!: :!: :!: If you remove those packages you will have broken your portage and your gentoo systems ability to emerge anything else.
_________________
emwrap.sh the wrapper for controlling emerge
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1880
Location: Nasvhille, TN

PostPosted: Tue Jan 09, 2007 2:52 pm    Post subject: Reply with quote

put into package.mask

foo/bar

to mask all versions (think that should do it, anyways)

then

=foo/bar-4.1.1

into package.unmask. If you decide to upgrade later, you can just change the version number to the new one, then emerge -u foo/bar
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Help keep Portage updated
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Fri Jan 19, 2007 11:52 am    Post subject: Reply with quote

Dralnu wrote:
put into package.mask

foo/bar

to mask all versions (think that should do it, anyways)

then

=foo/bar-4.1.1

into package.unmask. If you decide to upgrade later, you can just change the version number to the new one, then emerge -u foo/bar


I tried your suggestion but I get the following error ( I use the server make.profile:

Code:
# emerge -auvDN world

These are the packages that would be merged, in order:

Calculating world dependencies /
!!! All ebuilds that could satisfy ">=sys-devel/gcc-3.4.4" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-devel/gcc-4.1.1-r3 (masked by: package.mask)
- sys-devel/gcc-4.0.3 (masked by: package.mask, missing keyword)
- sys-devel/gcc-4.1.1 (masked by: package.mask, package.mask)
- sys-devel/gcc-4.1.1-r1 (masked by: package.mask)
- sys-devel/gcc-4.3.0_alpha20070112 (masked by: package.mask, package.mask, missing keyword)
# Mark Loeser <halcy0n@gentoo.org> (11 Apr 2006)
# GCC snapshots; use with extreme care and only report bugs if you have
# a patch

- sys-devel/gcc-3.4.6-r1 (masked by: package.mask)
- sys-devel/gcc-3.4.6-r2 (masked by: package.mask)
- sys-devel/gcc-3.4.5-r1 (masked by: package.mask)
- sys-devel/gcc-3.4.4-r1 (masked by: package.mask)
- sys-devel/gcc-4.1.0-r1 (masked by: package.mask, ~x86 keyword)
- sys-devel/gcc-4.1.0_alpha20070115 (masked by: package.mask, missing keyword)
- sys-devel/gcc-4.2.0_alpha20070117 (masked by: package.mask, package.mask, missing keyword)
- sys-devel/gcc-3.4.5 (masked by: package.mask)
- sys-devel/gcc-3.4.6 (masked by: package.mask, ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "sys-libs/glibc-2.4-r4" [ebuild])



!!! Problem resolving dependencies for app-admin/syslog-ng
!!! Depgraph creation failed.


@hielvc I always use emerge -C to remove packages. Is there an alternative? I would love to use emerge -c but this doesn't work for me:
e.g.
Code:

#equery uses nano
[ Searching for packages matching nano... ]
[ Colour Code : set unset ]
[ Legend        : Left column  (U) - USE flags from make.conf                    ]
[                  : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for app-editors/nano-2.0.1 ]
 U I
 - - debug   : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml .
 - - justify : Toggle the justify option ...
 - - minimal : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
 + + ncurses : Adds ncurses support (console display library)
 + + nls     : Adds Native Language Support (using gettext - GNU locale utilities)
 - - slang   : Adds support for the slang text display library (it's like ncurses, but different)
 + + spell   : Adds dictionary support


Code:
emerge -c nano

>>> No packages selected for removal by clean.

_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Fri Jan 19, 2007 12:50 pm    Post subject: Reply with quote

the C in emerge -C is capital. lowercase c is clean - uppercase C is unmerge.


You probably have the symbol backwards in package.mask. please post your package.mask here.
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
hielvc
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 2483
Location: Escondido, Ca

PostPosted: Fri Jan 19, 2007 12:54 pm    Post subject: Reply with quote

emerge -c and --depclean and -C are the correct ways to remove programs from your gentoo system, if you installed them with "emerge". "dep' uses emerge -C but uses its own algorythm to determine dependencies and the lack of dependencies.

You can use standard unix commands, "rm" to remove things, such as "rm -r /usr/share/info ". When you do something like this though portage is not aware of it. This true of any unix or linux system. So the moral of the story is before you start wabking and hacking things out of your system do alot of research.
_________________
emwrap.sh the wrapper for controlling emerge
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Sat Jan 20, 2007 11:13 am    Post subject: Reply with quote

sonicbhoc wrote:
the C in emerge -C is capital. lowercase c is clean - uppercase C is unmerge.


You probably have the symbol backwards in package.mask. please post your package.mask here.


I tried a lot of different combination. I'll pask package.mask + the results:

cat /etc/portage/package.mask
Code:

>=sys-devel/gcc-4.1.1
>=sys-devel/glibc-2.4-r3


Result:
Code:
These are the packages that would be merged, in order:

[ebuild  NS   ] sys-devel/gcc-3.4.6-r2  USE="fortran nls (-altivec) -bootstrap -
boundschecking -build -doc -gcj -gtk (-hardened) -ip28 -ip32r10k (-multilib) -mu
ltislot (-n32) (-n64) -nocxx -nopie -nossp -objc -test -vanilla" 27,698 kB
[ebuild     U ] sys-libs/glibc-2.4-r4 [2.4-r3] USE="nls nptl nptlonly -build -gl
ibc-compat20% -glibc-omitfp -hardened (-multilib) -profile (-selinux)" 15,711 kB


cat /etc/portage/package.mask

Code:

<=sys-devel/gcc-4.1.1
<=sys-devel/glibc-2.4-r3
>=sys-devel/gcc-4.1.1
>=sys-devel/glibc-2.4-r3


Result:
Code:
Calculating world dependencies \
!!! All ebuilds that could satisfy ">=sys-devel/gcc-3.4.4" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-devel/gcc-4.1.1-r3 (masked by: package.mask)
- sys-devel/gcc-4.0.3 (masked by: package.mask, missing keyword)
- sys-devel/gcc-4.1.1 (masked by: package.mask, package.mask)
- sys-devel/gcc-4.1.1-r1 (masked by: package.mask)
- sys-devel/gcc-4.3.0_alpha20070112 (masked by: package.mask, package.mask, missing keyword)
# Mark Loeser <halcy0n@gentoo.org> (11 Apr 2006)
# GCC snapshots; use with extreme care and only report bugs if you have
# a patch

- sys-devel/gcc-3.4.6-r1 (masked by: package.mask)
- sys-devel/gcc-3.4.6-r2 (masked by: package.mask)
- sys-devel/gcc-3.4.5-r1 (masked by: package.mask)
- sys-devel/gcc-3.4.4-r1 (masked by: package.mask)
- sys-devel/gcc-4.1.0-r1 (masked by: package.mask, ~x86 keyword)
- sys-devel/gcc-4.1.0_alpha20070115 (masked by: package.mask, missing keyword)
- sys-devel/gcc-4.2.0_alpha20070117 (masked by: package.mask, package.mask, missing keyword)
- sys-devel/gcc-3.4.5 (masked by: package.mask)
- sys-devel/gcc-3.4.6 (masked by: package.mask, ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "sys-libs/glibc-2.4-r4" [ebuild])



!!! Problem resolving dependencies for media-sound/orpheus
!!! Depgraph creation failed.


cat /etc/portage/package.mask
Code:

sys-devel/gcc
sys-devel/glibc


Result:
Code:
emerge -auvDN world

These are the packages that would be merged, in order:

Calculating world dependencies \
!!! All ebuilds that could satisfy ">=sys-devel/gcc-3.4.4" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-devel/gcc-4.1.1-r3 (masked by: package.mask)
- sys-devel/gcc-4.0.3 (masked by: package.mask, missing keyword)
- sys-devel/gcc-4.1.1 (masked by: package.mask)
- sys-devel/gcc-4.1.1-r1 (masked by: package.mask)
- sys-devel/gcc-4.3.0_alpha20070112 (masked by: package.mask, package.mask, missing keyword)
# Mark Loeser <halcy0n@gentoo.org> (11 Apr 2006)
# GCC snapshots; use with extreme care and only report bugs if you have
# a patch

- sys-devel/gcc-3.4.6-r1 (masked by: package.mask)
- sys-devel/gcc-3.4.6-r2 (masked by: package.mask)
- sys-devel/gcc-3.4.5-r1 (masked by: package.mask)
- sys-devel/gcc-3.4.4-r1 (masked by: package.mask)
- sys-devel/gcc-4.1.0-r1 (masked by: package.mask, ~x86 keyword)
- sys-devel/gcc-4.1.0_alpha20070115 (masked by: package.mask, missing keyword)
- sys-devel/gcc-4.2.0_alpha20070117 (masked by: package.mask, package.mask, missing keyword)
- sys-devel/gcc-3.4.5 (masked by: package.mask)
- sys-devel/gcc-3.4.6 (masked by: package.mask, ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "sys-libs/glibc-2.4-r4" [ebuild])



!!! Problem resolving dependencies for media-sound/orpheus
!!! Depgraph creation failed.


_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
Genone
Developer
Developer


Joined: 14 Mar 2003
Posts: 7389
Location: in a weird world

PostPosted: Sat Jan 20, 2007 11:25 am    Post subject: Reply with quote

In your case the best solution is probably to mask gcc (or the package in question) completely in package.mask and then unmask the versions you are willing to accept (e.g. the one you have installed) in package.unmask.
So if you only want gcc-1.2.3-r4 and no other version at all you'd put
Code:
sys-devel/gcc

in package.mask and
Code:
=sys-devel/gcc-1.2.3-r4
in package.unmask. You should note however that if that specific version is removed from the tree for any reason you'll have to unmask another one or setup an overlay to keep that version available. If you don't mind any revision bumps you could also put
Code:
~sys-devel/gcc-1.2.3
into package.unmask, that way portage would upgrade your gcc to for example gcc-1.2.3-r6 but not to gcc-1.2.4
Back to top
View user's profile Send private message
Aniruddha
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1700
Location: Amsterdam, The Netherlands

PostPosted: Sat Jan 20, 2007 2:20 pm    Post subject: Reply with quote

Genone wrote:
In your case the best solution is probably to mask gcc (or the package in question) completely in package.mask and then unmask the versions you are willing to accept (e.g. the one you have installed) in package.unmask.
So if you only want gcc-1.2.3-r4 and no other version at all you'd put
Code:
sys-devel/gcc

in package.mask and
Code:
=sys-devel/gcc-1.2.3-r4
in package.unmask. You should note however that if that specific version is removed from the tree for any reason you'll have to unmask another one or setup an overlay to keep that version available. If you don't mind any revision bumps you could also put
Code:
~sys-devel/gcc-1.2.3
into package.unmask, that way portage would upgrade your gcc to for example gcc-1.2.3-r6 but not to gcc-1.2.4


First off all thanks a lot for all the help. This really helped me to understand Gentoo better (and the more I learns the more I appreciate the way Gentoo handles things :)). Genone provided me with the final piece of the puzzle. All is working fine now :D
_________________
Savage2 stats:

http://savage2.s2games.com/user/sig/banner9999.jpg
Back to top
View user's profile Send private message
dagurasu
n00b
n00b


Joined: 29 Apr 2005
Posts: 71

PostPosted: Sun Jan 21, 2007 2:22 am    Post subject: Reply with quote

This is NOT the whole solution to your problem(No offense to those who suggested it, it should be the whole solution, it's just not). It will work FOR AWHILE ONLY. Once the installed version no longer exists in portage you will again get errors that there are no packages to satisfy your dependancies. This is because portage only looks at packages in the portage tree and your overlays to satisfy dependancies, and not at installed packages that aren't in either . I and barefootcoder have written scripts to automatically place installed ebuilds in your overlay so this will never happen. Unfortunately it's been a very slow work in progress. I finally have a version I think I'm really happy with which is a (very) modified version of barfefootcoders safesync script. I will post it soon.

I really get frustrated by how often this problem comes up, how often this answer is given and how often people later ask why is portage complaining about the package I masked. It's not their fault, but I and a few others have been answering this for awhile and for some reason nobody really wants to acknowledge that this is an issue. For a system to be useable in stable work environments it should be possible(like with redhat for example) to easily keep versions of software as long as reasonably possible (until it really is incompatible with everything else in your system). Anyway, I should get this script posted, it fixes the issue. Maybe Monday.

For now read about overlays and place a copy the ebuild directory tree to your overaly. Best is to copy all the files in the ebuild directory in question as well subdirectories. Just to be safe an "ebuild package digest" command wont hurt. Should it really be that complicated to have the OS not upgrade a package?
Back to top
View user's profile Send private message
Genone
Developer
Developer


Joined: 14 Mar 2003
Posts: 7389
Location: in a weird world

PostPosted: Sun Jan 21, 2007 5:43 am    Post subject: Reply with quote

dagurasu wrote:
I really get frustrated by how often this problem comes up, how often this answer is given and how often people later ask why is portage complaining about the package I masked. It's not their fault, but I and a few others have been answering this for awhile and for some reason nobody really wants to acknowledge that this is an issue.

Nobody has denied that bug 126059 exists.
Back to top
View user's profile Send private message
dagurasu
n00b
n00b


Joined: 29 Apr 2005
Posts: 71

PostPosted: Sun Jan 21, 2007 7:29 am    Post subject: Reply with quote

I didn't mean to sound disrepectful. And yet there does seems to be a big awareness issue. Maybe I've missed it but do the manuals mention in the package.mask section that you also need to put your package in an overlay if you don't want to find out about this bug after your package as already dissapeared? I'll go look up this bug report, but the one I know of, which is probably this one, but maybe not(it's the middle of night and I can't sleep, but still to lazy to check now), was closed on the grounds that it wasn't an important issue, and yet almost every time I read this board, there is a post where somebody is getting snagged by it. Look I don't fault the developers. I mean your work is free not to mention great, so I've got no right being mad for anything, which is why I said frustrated, not upset, but this bug has been known for at least well over a year and I think much longer and it is, as I and barefootcoder have proven now, solveable. Now that I've put in some work on it myself I think I do have a "right" to limited constructive criticism. I'm sure the developers can python up a much better solution than mine, so it seems to not be a priority, which is the developers' perrogative, but if this is a permanent feature of portage, maybe the rest of us on the message boards should at least stay more aware of this issue... which is why I'm spending keystrokes.
Back to top
View user's profile Send private message
dagurasu
n00b
n00b


Joined: 29 Apr 2005
Posts: 71

PostPosted: Sun Jan 21, 2007 11:32 am    Post subject: Reply with quote

The script I promised is here:

http://forums.gentoo.org/viewtopic-p-3857340.html#3857340

There's also one posted at that bug posting above, but I think you'll see that the one I link here has several more features and benefits.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT - 5 Hours
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