Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge --update includes unwanted packages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
andersmusikka
n00b
n00b


Joined: 29 Apr 2004
Posts: 23

PostPosted: Thu Apr 29, 2004 8:47 pm    Post subject: emerge --update includes unwanted packages Reply with quote

Hello!

When I run:

emerge --pretend --update system --upgradeonly --verbose

I get:

These are the packages that I would merge, in order:

Calculating system dependencies ...done!
[ebuild N ] sys-kernel/linux-headers-2.4.21-r1 27,864 kB
[ebuild U ] sys-apps/baselayout-1.8.11 [1.8.6.13] -bootstrap -build -liv ecd -(selinux) -static 193 kB
[ebuild U ] sys-devel/gnuconfig-20040214 [20030708] 30 kB
.
.
.
(a few more packages)


Why does it insist on installing the sys-kernel/linux-headers -package? I don't want that! I'm running the 2.6.5-kernel!


Here's my make.conf:


# These settings were set by the catalyst build script that automatically built this stage
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
USE="mmx sse afs alsa avi cdr crypt dvd emacs encode gnome gtk icq imap
joystick jpeg opengl pdflib png readline spell usb wxwindows X xinerama
xml xmms zlib xv -kde -qt pda -cups -arts -esd -apm"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"

GENTOO_MIRRORS="ftp://ftp.uninett.no/pub/linux/Gentoo http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://212.219.247.17/sites/www.ibiblio.org/gentoo/"




Please tell me if there's any other file needed to explain this behaviour. Perhaps it's expected behaviour? 2.4.x Kernel-sources must for some reason be present? But it seems strange!

Well, anyway, thank you all gentoo-people for creating this distribution!
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Thu Apr 29, 2004 8:55 pm    Post subject: Re: emerge --update includes unwanted packages Reply with quote

andersmusikka wrote:
Perhaps it's expected behaviour? 2.4.x Kernel-sources must for some reason be present? But it seems strange!

Indeed the version of linux-headers and your kernel versions don't need to match each other.
Back to top
View user's profile Send private message
BWoso
l33t
l33t


Joined: 31 Dec 2003
Posts: 920
Location: Cleveland Ohio, USA

PostPosted: Thu Apr 29, 2004 9:03 pm    Post subject: Reply with quote

To update everything it is better to do emerge -uvUD world, at least as far as I know that is better. It will upgrade everything on your computer and all of the dependancies of the packages. The -u is --upgrade v is --verbose -U is upgrade only, and -D is dependancies. do emerge -upvUD world to see what it will upgrade. It does not matter what order you put the letters in and you only need one - . And also I just let it do all of the kernels and other stuff and it doesn't cause any problems for me.
_________________
I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!

The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain-
Back to top
View user's profile Send private message
andersmusikka
n00b
n00b


Joined: 29 Apr 2004
Posts: 23

PostPosted: Thu Apr 29, 2004 9:10 pm    Post subject: Reply with quote

Hey guys, thanks for the quick answers!

BWoso: I'll remember that. -uvUD world.

What's the difference between world and system?
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Thu Apr 29, 2004 9:53 pm    Post subject: Reply with quote

Leave out the "-U". It's buggy and superfluous with portage 2.0.50. Use /etc/portage/package.keywords instead.
Back to top
View user's profile Send private message
BWoso
l33t
l33t


Joined: 31 Dec 2003
Posts: 920
Location: Cleveland Ohio, USA

PostPosted: Thu Apr 29, 2004 10:58 pm    Post subject: Reply with quote

when you emerge package it records it in world, so when you update world it looks at everything you have emerged and updates whatever needs it, I have never had any problems with the -U, but without it I would downgrade some stuff, so I would say to use it. If anyone has had trouble with the -U let me know so I can decide if I would like to keep on using it
_________________
I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!

The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain-
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Fri Apr 30, 2004 1:58 pm    Post subject: Reply with quote

Ok, here are two reasons why "-U" is drop dead ugly (bookmarking this now so in the future I can link to it rather then writing it again and again :wink: )

Reason 1: Problems with SLOTs
This occured to quite a few people that wanted gimp-2 instead of gimp-1.2. Imagine gimp-1.2 marked stable and in SLOT 1, gimp-2 marked unstable and in SLOT 2. Now you do an "ACCEPT_KEYWORDS=~x86" emerge gimp" and get gimp-2.
Later on you consider it's time to update your system with anything similar to "emerge -U world". This will install gimp-1.2, because gimp is in the worldfile, and "-U" doesn't handle the SLOTs here as one might expect it.

Reason 2: Problems if ebuilds are removed from Portage tree
Imagine there are two versions of package foo in portage, foo-1.4 marked stable and foo-1.6 marked unstable. You want unstable and emerge it like gimp above. Some time later you update world like above, but in the meantime foo-1.6.1 came out fixing an important security hole in foo-1.6. Now there are two possibilities:
a) foo-1.6 got removed from Portage. This results in foo-1.4 getting installed, thus a downgrade instead of "-U"
b) even worse when foo-1.6 wasn't removed from Portage due to whatever reason: foo-1.6 (the one with the security hole) would stay on your system until something greater than foo-1.6 gets marked stable.

How to do it instead:
Warming up the gimp example again: First create /etc/portage.
Code:

mkdir /etc/portage

If you decide to stay with the unstable version, just do
Code:

echo "media-gfx/gimp ~x86" >> /etc/portage/package.keywords

This will be sufficient most of the time.
It's getting a little bit more complicated if you just want gimp-2.0.0, but in general stay with the stable version.
Code:

echo "~media-gfx/gimp-2.0.0 ~x86" >> /etc/portage/package.keywords

Now you'll get gimp-2.0.0, 2.0.0-r1 and so on but not 2.0.1 or greater unless they're marked stable. To be sure that gimp-1.2 doesn't get installed again in the case gimp-2.0.0 (and -rX) gets removed from the tree, additionally mask the lower versions:
Code:

echo \<media-gfx/gimp-2.0.0 >> /etc/portage/package.mask


If you do this for each unstable package, there is no need to run "-U" again.
Back to top
View user's profile Send private message
piraeus
n00b
n00b


Joined: 18 Oct 2003
Posts: 41

PostPosted: Thu May 20, 2004 2:24 pm    Post subject: Thanks! Reply with quote

"ahk!" ... <click> <copy>

touch READ
nano -w READ

<paste>

WHew... :D

(goes off to RTFM again...)
Back to top
View user's profile Send private message
bungernut
Apprentice
Apprentice


Joined: 24 Jan 2004
Posts: 172

PostPosted: Wed Jul 07, 2004 3:05 am    Post subject: So what if its too late? Reply with quote

I'll admit that I have used ACCEPT_KEYWORDS a few times and I am now interisted in doing an emerge world. Am I screwed? I dont remember whch packages I've ACCEPT_KEYWORDS to or anything (:?: How do i find out?). This also seems kinda cumbersom when you are happy with a unstable package and if/when it becomes stable you would rather keep it. Maby im just lazy though. 8)
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Wed Jul 07, 2004 1:06 pm    Post subject: Reply with quote

Nice little filthy hack for you...

Code:
cd /var/db/pkg
for p in $(grep -RiH KEYWORDS * | grep ~x86 | cut -d / -f -2); do echo ${p} ~x86; done >> /etc/portage/package.keywords

_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
bungernut
Apprentice
Apprentice


Joined: 24 Jan 2004
Posts: 172

PostPosted: Fri Jul 09, 2004 7:11 am    Post subject: I really cant believe this? Reply with quote

Code:
bung@lappy pkg $ for p in $(grep -RiH KEYWORDS * | grep ~x86 | cut -d / -f -2); do echo ${p} ~x86; done
app-portage/gentoolkit-0.2.0_pre8 ~x86
dev-java/sun-j2sdk-1.4.2 ~x86
sys-apps/portage-2.0.50-r8 ~x86
sys-devel/gcc-3.3.3-r6 ~x86
sys-devel/gcc-3.3.3-r6 ~x86
sys-libs/glibc-2.3.3.20040420 ~x86

I dont see my kernel in there (2.6.3) which had to ~x86
I know i dident use ~x86 for glibc and gcc and portage, i dont think im that stupid???

Here is some proof (i think, although im quite possibly crazy):
Code:

root@lappy src # emerge -p gcc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-devel/gcc-3.3.3-r6 


Its the same version as what i theoreticaally have ~x86 on my system and its not masked. Its not in my /etc/portage/package.keywords either???, in fact i dont even have an /etc/portage folder :?

I honestly think im going insane, if what i think is supposed to be happening then i have either proved i dident understand man emerge, man portage and this post, or i proved that i broke portage completly :cry:


Here is what im looking at:
Code:
 
root@lappy src # emerge -p system

These are the packages that I would merge, in order:

Calculating system dependencies ...done!

root@lappy src # emerge -p world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild     U ] media-libs/alsa-lib-1.0.5 [0.9.8]
[ebuild     U ] media-sound/alsa-utils-1.0.5 [0.9.8]
[ebuild     U ] x11-misc/xscreensaver-4.15 [4.14-r1]
[ebuild     U ] media-gfx/bootsplash-0.6-r16 [0.6-r11]
[ebuild  N    ] sys-kernel/gentoo-dev-sources-2.6.7-r8 
[ebuild     U ] dev-libs/libol-0.3.13 [0.3.9]
[ebuild     U ] app-admin/syslog-ng-1.6.4 [1.6.0_rc3-r1]
[ebuild  N    ] sys-kernel/gentoo-sources-2.4.26-r3 
[ebuild     U ] app-editors/vim-core-6.3 [6.2-r7]
[ebuild     U ] app-editors/gvim-6.3 [6.2-r7]
[ebuild     U ] net-ftp/ncftp-3.1.7 [3.1.6]
[ebuild     U ] sys-fs/reiserfsprogs-3.6.17 [3.6.11]
[ebuild     U ] x11-base/xfree-4.3.0-r6 [4.3.0-r3]
[ebuild  N    ] media-libs/libexif-0.5.12-r1 
[ebuild  N    ] x11-libs/gtkglarea-1.99.0 
[ebuild  N    ] dev-python/pygtk-2.0.0-r1 
[ebuild  N    ] media-gfx/gimp-2.0.0 
[ebuild     U ] app-editors/nano-1.3.2-r1 [1.2.2]
[ebuild     U ] app-doc/howto-ps-20040317 [20021121]
[ebuild     U ] sys-apps/cronbase-0.3 [0.2.1-r2]
[ebuild     U ] sys-apps/vixie-cron-3.0.1-r4 [3.0.1-r3]
[ebuild     U ] media-sound/alsaplayer-0.99.76 [0.99.75-r1]
[ebuild     U ] media-video/mplayer-1.0_pre4 [0.92-r1]
[ebuild  N    ] net-www/mozilla-launcher-1.12 
[ebuild     U ] net-www/mozilla-firefox-0.8-r3 [0.7-r1]
[ebuild     U ] net-fs/samba-3.0.4-r1 [2.2.8a]
[ebuild     U ] x11-misc/xlockmore-5.12 [5.08.2]
[ebuild     U ] app-editors/kile-1.6.3 [1.6.1]
[ebuild     U ] gnome-extra/gcalctool-4.3.51 [4.3.16]
[ebuild     U ] net-im/gaim-0.79-r1 [0.77]
[ebuild     U ] x11-plugins/gaim-encryption-2.27 [2.25]
[ebuild     U ] x11-libs/qt-3.3.2 [3.3.0-r1]
[ebuild  N    ] dev-java/java-gtk-0.8.3 
[ebuild     U ] dev-tex/preview-latex-0.8.1 [0.7.8]
[ebuild     U ] sys-boot/grub-0.94-r1 [0.93.20030118]
[ebuild  N    ] media-sound/alsa-driver-1.0.5a 
[ebuild  N    ] dev-libs/boost-1.31.0 
[ebuild  N    ] dev-db/metakit-2.4.9.3-r2 
[ebuild     U ] media-sound/zinf-2.2.5-r1 [2.2.3]
[ebuild     U ] sys-apps/pcmcia-cs-3.2.5-r1 [3.2.4]
[ebuild     U ] net-p2p/gtk-gnutella-0.93.3 [0.92]


Perhaps im confused with the fact that the packages are stable now?? and wernt for example not when I installed them a gazillion billion years ago?? When I emerge one again for example i did:
Code:

root@lappy src # emerge -v gentoolkit

then again:

Code:
 bung@lappy pkg $ for p in $(grep -RiH KEYWORDS * | grep ~x86 | cut -d / -f -2); do echo ${p} ~x86; done
app-portage/gentoolkit-0.2.0_pre8 ~x86
dev-java/sun-j2sdk-1.4.2 ~x86
sys-apps/portage-2.0.50-r8 ~x86
sys-devel/gcc-3.3.3-r6 ~x86
sys-devel/gcc-3.3.3-r6 ~x86
sys-libs/glibc-2.3.3.20040420 ~x86


its still the ~x86 package? Shouldent it go to stable after said emerge????
Perhaps you can suggest reading for young grasshopper?
Check out my signiture, i think this post is most definetly prime meterial that everyone should read, thanks for helping us understand :)[[/code]
_________________
Two idiots make a wrong
Back to top
View user's profile Send private message
hepta_sean
Apprentice
Apprentice


Joined: 27 Apr 2004
Posts: 246
Location: Berlin, Germany

PostPosted: Fri Jul 09, 2004 8:12 am    Post subject: Re: I really cant believe this? Reply with quote

bungernut wrote:
Code:
bung@lappy pkg $ for p in $(grep -RiH KEYWORDS * | grep ~x86 | cut -d / -f -2); do echo ${p} ~x86; done
app-portage/gentoolkit-0.2.0_pre8 ~x86
dev-java/sun-j2sdk-1.4.2 ~x86
sys-apps/portage-2.0.50-r8 ~x86
sys-devel/gcc-3.3.3-r6 ~x86
sys-devel/gcc-3.3.3-r6 ~x86
sys-libs/glibc-2.3.3.20040420 ~x86

I dont see my kernel in there (2.6.3) which had to ~x86
I know i dident use ~x86 for glibc and gcc and portage, i dont think im that stupid???


robmoss2k's hack was a little too filthy, it just greps for "~x86" in the package database. Since the term "~x86" appears in two comments in the ebuild of gcc, it is added to the list.

I would instead suggest to do:
Code:
emerge -puvD world


If this puts out packages it wants to downgrade ("[ebuild UD]"), these were emerged with "~x86" or have been hardmasked (due to security or other serious issues). If you want to keep them, add them to /etc/portage/package.keywords and try again.

Quote:
Here is what im looking at:
Code:
root@lappy src # emerge -p system

These are the packages that I would merge, in order:

Calculating system dependencies ...done!

root@lappy src # emerge -p world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild     U ] media-libs/alsa-lib-1.0.5 [0.9.8]
...


Why do you do emerge -p ... and not emerge -pu ...? You want to update, don't you?

I don't know, what emerge thinks it's doing, when doing emerge -p world. It would seem logical, that it wants to remerge everything, since that is, what it does, when you give a single package, but it doesn't. :?
Back to top
View user's profile Send private message
bungernut
Apprentice
Apprentice


Joined: 24 Jan 2004
Posts: 172

PostPosted: Sat Jul 10, 2004 2:42 am    Post subject: about emerge -p Reply with quote

I was only intending to show you all what emerge was trying to do, hense pretend.
_________________
Two idiots make a wrong
Back to top
View user's profile Send private message
hepta_sean
Apprentice
Apprentice


Joined: 27 Apr 2004
Posts: 246
Location: Berlin, Germany

PostPosted: Sat Jul 10, 2004 5:49 pm    Post subject: Re: about emerge -p Reply with quote

bungernut wrote:
I was only intending to show you all what emerge was trying to do, hense pretend.


I understood, why you use the "-p" switch, that's obvious. What I did not understand was, why you do not use "-u" switch.

You do not want to emerge new packages, but update existing ones, hence use "-u". Probably you will also want to use the "-D" switch, which stands for "--deep" and means that dependencies of packages in the world are also updated.

Otherwise you will always only update the packages in the world themselves and never their dependencies.
Back to top
View user's profile Send private message
fyfe
n00b
n00b


Joined: 17 Apr 2004
Posts: 1

PostPosted: Sat Oct 16, 2004 4:39 pm    Post subject: Reply with quote

robmoss wrote:
Nice little filthy hack for you...

Code:
cd /var/db/pkg
for p in $(grep -RiH KEYWORDS * | grep ~x86 | cut -d / -f -2); do echo ${p} ~x86; done >> /etc/portage/package.keywords


This'll work perfectly with one small alteration, add ^ before KEYWORDS and grep will only pick lines that begin with KEYWORDS and ignore the lines that start with comments. That way you get the true list of ebuilds that were build with ~86
_________________
"Instead, people would take pains to tell her that beauty was only skin-deep, as if a man ever fell for an attractive pair of kidneys."
(Terry Pratchett, Maskerade)
Back to top
View user's profile Send private message
Bluesmoke
n00b
n00b


Joined: 14 May 2004
Posts: 20
Location: San Jose, CA

PostPosted: Wed Mar 16, 2005 6:57 pm    Post subject: Reply with quote

I've seen several posts say put
Code:
ACCEPT_KEYWORDS=
into your make.conf is this the Official Accepted Way or is this Not Good(TM), if the latter i've really screwed up 2 systems ;-p
_________________
Linux User 268664
Gentoo Linux 2005.0 / AMD Athon64 3400+ Desktop
Gentoo Linux 2005.0 / AMD Athlon64 3400+ Laptop
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Wed Mar 16, 2005 7:12 pm    Post subject: Reply with quote

robmoss wrote:
Nice little filthy hack for you...

Code:
cd /var/db/pkg
for p in $(grep -RiH KEYWORDS * | grep ~x86 | cut -d / -f -2); do echo ${p} ~x86; done >> /etc/portage/package.keywords


:cool:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
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
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