# emerge gentoo-sources defaulting to 2.4 kernel ?!

## triode

Hi all - am using gentoo-2.6.7-r13 at the moment on my desktop and when I tried to update the kernel I noticed there is a new system with no more gentoo-dev-sources. Portage says the default version for gentoo-sources is 2.6 but when I try to emerge gentoo-sources or vanilla-sources emerge is defaulting to the 2.4 kernel version. Its driving me nuts, surely I do not have to manually enter the version of 2.6 that I want to install everytime. Surely I have missed something simple...

Any suggestions?

# emerge -pv gentoo-sources

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

Calculating dependencies ...done!

[ebuild   R   ] sys-kernel/gentoo-sources-2.4.31-r1  -build -doc -symlink 0 kB

Total size of downloads: 0 kB

-----------------------------------------

 # emerge -pv portage

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

Calculating dependencies ...done!

[ebuild   R   ] sys-apps/portage-2.0.53  -build -doc (-selinux) 0 kB

Total size of downloads: 0 kB

-----------------------------------------

# uname -a

Linux wombat 2.6.7-gentoo-r13 #10 Mon Jan 2 05:16:31 CST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz GenuineIntel GNU/Linux

----------

## thoffmeyer

I know this isnt going to help much but could you post the output of `emerge info`?

----------

## triode

emerge info

Portage 2.0.53 (default-linux/x86/no-nptl/2.4, gcc-3.3.5-20050130, glibc-2.3.5-r 2, 2.6.7-gentoo-r13 i686)

=================================================================

System uname: 2.6.7-gentoo-r13 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz

Gentoo Base System version 1.6.13

dev-lang/python:     2.3.5, 2.4.2

sys-apps/sandbox:    1.2.10

sys-devel/autoconf:  2.13, 2.59-r6

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1

sys-devel/binutils:  2.16.1

sys-devel/libtool:   1.5.20

virtual/os-headers:  2.4.22-r1

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i386-pc-linux-gnu"

CFLAGS="-O3 -mcpu=pentium4 -pipe -fomit-frame-pointer"

CHOST="i386-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/ 3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/con trol"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O3 -mcpu=pentium4 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks sandbox sfperms strict"

GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirro rs.sec.informatik.tu-darmstadt.de/gentoo/ http://mirror.averse.net/pub/gentoo/ h ttp://ftp.du.se/pub/os/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://192.168.0.39/gentoo-portage"

USE="x86 X alsa apm arts audiofile avi berkdb bitmap-fonts bonobo bzip2 cdr cryp t cups curl dvd eds emboss encode esd ethereal exif expat fam ffmpeg flac foomat icdb fortran gdbm gif glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guil e idn imagemagick imlib ipv6 jack java jpeg junit lcms libg++ libwww mad mhash m ikmod mng motif mozilla mp3 mpeg mysql ncurses nls nvidia ogg oggvorbis openal o pengl oss pam pcre pdflib perl png python quicktime readline recode samba sdl sl ang speex spell ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts usb  vorbis xine xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

----------

## thoffmeyer

default-linux/x86/no-nptl/2.4, theres your problem, you have to switch to the 2.6 profile  :Smile: 

Follow this guide to switch it back to 2.6!

----------

## triode

thanks for that, running the following two lines (as root) fixed the problem

# rm -f /etc/make.profile

# ln -snf /usr/portage/profiles/default-linux/x86/2005.1 /etc/make.profile

hmmm, thought I had already done this, must have been thinking of a different puter...

----------

## brendaniabbatis

You might want to consider changing your CHOST and CBUILD to i686 with a Pentium 4.

----------

## triode

Thanks for that tip, have changed CHOST and added CBUILD to my make.conf.

----------

## Sachankara

 *triode wrote:*   

> Thanks for that tip, have changed CHOST and added CBUILD to my make.conf.

 Ehm... Never change CHOST without bootstrapping the system (a.k.a. a stage1 installation). You will run into problems if not...

Quoting the documentation: *Quote:*   

> CHOST
> 
> The CHOST variable declares the target build host for your system. This variable should already be set to the correct value. Do not edit it as that might break your system. If the CHOST variable does not look correct to you, you might be using the wrong stage3 tarball.

 

----------

## nixnut

Moved from Installing Gentoo to Kernel & Hardware.

postinstallation problem.

----------

## brendaniabbatis

 *Sachankara wrote:*   

> Ehm... Never change CHOST without bootstrapping the system (a.k.a. a stage1 installation). You will run into problems if not...

 

Oops, sorry, my bad. If you change CHOST you need to bootstrap. That's why I said "consider" it, like look into it, but that wasn't obvious. My apologies. Triode, do bootstrap your system!

----------

## schorsche

I also discovered when I updated my system today that it wants to install

```

 sys-kernel/gentoo-sources-2.4.31-r1 

```

instead of the latest 2.6.16-r1 sources and despite the fact I'm in the latest (2005.1) profile. 

What helped me (for some strange reason) was removing the option

```

>sys-kernel/gentoo-sources-2.6.13-r3

```

from my packages.mask that so far helped me from updating to the latest kernel version

(and hence going through all the trouble of recompilation) when doing emerge --world

----------

## eincello

I recently did an `emerge --sync', and now when I do `emerge -uDav system' or an `emerge -uav world' (only those combinations), portage tries to install updated kernel sources 2.4.31-r1.  Problem is, my current kernel version is 2.6.14-r5.

I've noticed on gentoo-portage.com that 2.4.31 is listed first among all gentoo-sources versions.  Could portage be mistakenly trying to "update" my kernel to a 2.4 series???  Or could something else be wrong?

My /etc/portage/package.mask file contains this line:

```

>sys-kernel/gentoo-sources-2.6.14-r5

```

And here's the gist of my /etc/make.conf :

```

USE="a52 aac acpi aim asf bash-completion buffysize divx4linux dvd dvdr

     dvdread firefox ftp gphoto2 ieee1394 imap kqemu moznoirc moznomail mozsvg

     nntp nptl nptlonly nsplugin oscar pop qemu-fast smtp softmmu sse symlink

     wifi win32codecs xpm -arts -cups -foomaticdb -gnome -kde -nls -spell"

CHOST="i686-pc-linux-gnu"

CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"

SYNC="rsync://gentoo.cites.uiuc.edu/gentoo-portage/"

RSYNC_RETRIES="3"

RSYNC_TIMEOUT=60

RSYNC_EXCLUDEFROM="/etc/portage/rsync_excludes"

PORTDIR_OVERLAY=/usr/local/portage

MAKEOPTS="-j2"

PORTAGE_NICENESS=17

AUTOCLEAN="yes"

```

This is really annoying, and I can't find any mention of this sort of problem anywhere.  Thank you kindly for any help you can offer.

----------

## iamben

make sure you arent using a 2.4 portage profile:

```
ben ~ # ls -l /etc/make.profile 

lrwxrwxrwx 1 root root 49 Feb 27 17:25 /etc/make.profile -> ..//usr/portage/profiles/default-linux/x86/2006.0

ben ~ # 

```

[/code]

----------

## eincello

All right, I'm running a 2005.1 profile:

```
~ # ls -l /etc/make.profile

lrwxrwxrwx  1 root root 48 Nov 20 02:06 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2005.1

~ #
```

It wasn't a 2.4 profile a few days ago, to my knowledge.  I'm really at a loss, could anything else be wrong?  Also, should I consider switching to the 2006.0 profile?

Update: I just switched profiles to 2006.0, and portage is _still_ trying to emerge 2.4.31-r1 into a new slot.

----------

## pianosaurus

Make sure you don't accidentaly have some old 2.4 sources installed already. That's the only reason it should try to download new 2.4 sources. Even if you don't have the files, portage could think it's there. Try equery list sources.

equery is a part of gentoolkit.

----------

## pianosaurus

Actually, this seems to be a bug. According to schorsche in this thread, removing that line from your package.mask file might work.

----------

## eincello

Thanks for your replies.  I've never had any 2.4 sources installed, and equery only lists the one I actually installed:

```
~ # equery l sources

[ Searching for package 'sources' in all categories among: ]

 * installed packages

[I--] [M ] sys-kernel/gentoo-sources-2.6.14-r5 (2.6.14-r5)

```

Removing the mask kinda works.  Before, when I didn't have the kernel version masked and a newer version was marked stable, emerge -uDav system would install the new version and autoclean the old version (I've got autoclean set in /etc/make.conf).  But now it wants to put it in a separate slot...

```
~ # emerge -uDav system

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

Calculating system dependencies ...done!

[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.15-r1  -build -doc +symlink (-ultra1) 39,086 kB 

```

I've got a hunch this coincided with a portage update a week or so ago.

Should I be filing a bug report on this?  (I've never filed a bug report before   :Embarassed:  )

----------

## niskel

Kernel sources are always suposed to go in a different slot, it is designed to do this. Just emergeing the sources does not update your actual running kernel and portage wont get rid of your old sources automatically. So there really is no harm in getting the new sources as it wont affect your system or remove your current sources (but you have to turn your symlink USE flag off or it will change how the machine works (OT: why does the symlink flage even exist? I can only really see it ever causing problems)). It is also unnecissary to mask newer versions of the kernel for this reason. This is by design.

----------

## ecatmur

Your problem is that your current kernel version has been removed from Portage.

If you don't want to install newer kernel versions, you need to copy the ebuild from /var/db/pkg/sys-kernel/gentoo-sources-###/ to your overlay.

----------

## Maedhros

Merged from here to this thread.

----------

## eincello

 *ecatmur wrote:*   

> Your problem is that your current kernel version has been removed from Portage.

 

 :Shocked: 

I can't believe I never noticed that!  All right, kernel upgrade time, no bug report today.  Thank you all kindly for your help!

----------

