Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
portage not considering dist-kernel as gentoo-kernel-bin dep
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
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Wed Apr 07, 2021 11:02 pm    Post subject: portage not considering dist-kernel as gentoo-kernel-bin dep Reply with quote

Hi. I was going to update my system but then there was an unwanted kernel upgrade:


Code:
[ebuild  NS    ] sys-kernel/gentoo-kernel-bin-5.10.27:5.10.27::gentoo [5.4.105:5.4.105::gentoo] USE="initramfs -test" 177,446 KiB
[ebuild     U  ] virtual/dist-kernel-5.10.27:0/5.10.27::gentoo [5.4.105:0/5.4.105::gentoo] 0 KiB


Since gentoo-kernel-bin is in my world file and dist-kernel isn't, I created a mask file (etc/portage/package.mask/kernel) in order to mask gentoo-kernel-bin:
Quote:
>sys-kernel/gentoo-kernel-bin-5.4.105

I ran emerge again and had the following result:
Code:
[ebuild  N     ] sys-kernel/gentoo-kernel-5.10.27:5.10.27::gentoo  USE="initramfs -debug -savedconfig -test" 115,047 KiB
[ebuild     U  ] virtual/dist-kernel-5.10.27:0/5.10.27::gentoo [5.4.105:0/5.4.105::gentoo] 0 KiB


Edited again /etc/portage/package.mask/kernel:
Quote:
>sys-kernel/gentoo-kernel-bin-5.4.105
>virtual/dist-kernel-5.4.105


And this time there was no gentoo-kernel or dist-kernel suggested by portage

I did one last test, masking only dist-kernel. Edited /etc/portage/package.mask/kernel:
Quote:
>virtual/dist-kernel-5.4.105


Again, no gentoo-kernel or dist-kernel suggested by portage.

For some reason virtual/dist-kernel is pulling gentoo-kernel. But the problem is it's only a dependency of gentoo-kernel-bin, so if gentoo-kernel-bin is masked there's no sense in virtual/dist-kernel being upgraded. What's happening? Is this a bug?
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3926

PostPosted: Wed Apr 07, 2021 11:36 pm    Post subject: Reply with quote

please run
Code:

emerge --noreplace virtual/dist-kernel
emerge --deselect gentoo-kernel-bin

You see the way to install gentoo-kernel-bin is
Code:

emerge -1av gentoo-kernel-bin
emerge --noreplace dist-kernel

But you have already unstalled it.
So please follow the first unstruction.
_________________
:)
Back to top
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 495

PostPosted: Thu Apr 08, 2021 7:27 am    Post subject: Reply with quote

I think you missed what category dist-kernel is in: virtual. Dist-kernel is not a kernel, but just a place holder package that says either gentoo-kernel or gentoo-kernel-bin are installed so useflag combinations that need one of the two installed can just depend on virtual/dist-kernel.

Unmask it so you don't run into odd complaints from portage.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3926

PostPosted: Thu Apr 08, 2021 8:48 am    Post subject: Reply with quote

Dist-kernel should be in world file NOT gentoo-kernel-bin or vanilla-kernel etc
_________________
:)
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Thu Apr 08, 2021 9:18 pm    Post subject: Reply with quote

alamahant wrote:
please run
Code:

emerge --noreplace virtual/dist-kernel
emerge --deselect gentoo-kernel-bin

You see the way to install gentoo-kernel-bin is
Code:

emerge -1av gentoo-kernel-bin
emerge --noreplace dist-kernel

But you have already unstalled it.
So please follow the first unstruction.

virtual/dist-kernel should be in world file?

Phoenix591 wrote:

I think you missed what category dist-kernel is in: virtual. Dist-kernel is not a kernel, but just a place holder package that says either gentoo-kernel or gentoo-kernel-bin are installed so useflag combinations that need one of the two installed can just depend on virtual/dist-kernel.

Unmask it so you don't run into odd complaints from portage.
But virtual/dist-kernel is not in my world file. It was portage that asked to install it when I installed gentoo-kernel-bin.

alamahant wrote:
Dist-kernel should be in world file NOT gentoo-kernel-bin or vanilla-kernel etc
Well, I'm following section 4.2 Installing a distribution kernel from the handbook (https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Installing_a_distribution_kernel).
Gentoo Handbook wrote:
Installing a distribution kernel

To build a kernel with Gentoo patches from source, type:
Code:
root #emerge --ask sys-kernel/gentoo-kernel


System administrators who want to avoid compiling the kernel sources locally can instead use precompiled kernel images:
Code:
root #emerge --ask sys-kernel/gentoo-kernel-bin


Is the handbook outdated or with wrong information about the correct way to install gentoo-kernel-bin?
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3926

PostPosted: Thu Apr 08, 2021 9:42 pm    Post subject: Reply with quote

from
virtual/dist-kernel ebuild
Code:


RDEPEND="
   || (
      ~sys-kernel/gentoo-kernel-${PV}
      ~sys-kernel/gentoo-kernel-bin-${PV}
      ~sys-kernel/vanilla-kernel-${PV}
   )"

That is ONE of these three is a dependency for dist kernel.
This is why we run
Code:

emerge -1av gentoo-kernel-bin
emerge --noreplace dist-kernel

dist-kernel is the master and one of the three kernels is the subordinate.
dist-kernel is more like a metapckage a selector.
Same with
virtual/rust -> rust | rust-bin
Maybe we can kindly ask an oldtimer master of the forums to clarify this for us.
I might be mistaken but it doesnt feel so...
_________________
:)
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Thu Apr 08, 2021 9:56 pm    Post subject: Reply with quote

And sys-kernel/gentoo-kernel-bin ebuild has virtual/dist-kernel as a dependency:
Code:
 PDEPEND="
   >=virtual/dist-kernel-${PV}"


Most specifically a post-dependency (https://devmanual.gentoo.org/general-concepts/dependencies/#post-dependencies):
Quote:
The PDEPEND variable specifies runtime dependencies that do not strictly require being satisfied immediately. They can be merged after the package. This variable is used purely to resolve circular dependencies, while in general case RDEPEND should be used instead.


I don't know if I get it, but maybe portage installed virtual/dist-kernel in order to avoid some kind of circular dependency?
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3926

PostPosted: Thu Apr 08, 2021 10:00 pm    Post subject: Reply with quote

Yes it is strange
they both have each other as dependency
The one RDEPEND the other PDEPEND
.To me dist kernel is higher level so it should be the one in "word"
The reason we first do emerge -1av is to choose which of the three to install.
I suppose if you wanted to install more than one THEN you would need to "emerge -av" the second or third...
_________________
:)
Back to top
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 495

PostPosted: Fri Apr 09, 2021 12:16 pm    Post subject: Reply with quote

World the only way to tell portage what packages you specifically want. If you specifically want the bin version of gentoo-kernel I'd put that in world, same with the locally built version . If you want any distribution kernel and don't care which I'd put the virtual.

theoretically if the virtual had an upgrade that the currently installed not in world dependency needed a useflag or some other change for the new version to fulfill, but an alternative dependency satisfied the new version without changes I believe portage would pull in the alternate and afterwards have the old original eligible to be depcleaned.
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 231
Location: Brazil

PostPosted: Fri Apr 09, 2021 8:46 pm    Post subject: Reply with quote

Phoenix591 wrote:
World the only way to tell portage what packages you specifically want. If you specifically want the bin version of gentoo-kernel I'd put that in world, same with the locally built version . If you want any distribution kernel and don't care which I'd put the virtual.
But I never installed virtual/dist-kernel by myself. I said that it's not even in my world file in original post:
rudregues wrote:
Since gentoo-kernel-bin is in my world file and dist-kernel isn't, I created a mask file (etc/portage/package.mask/kernel) in order to mask gentoo-kernel-bin:


Right now this is my world file:
Code:
$ cat /var/lib/portage/worldworld
app-misc/neofetch
app-portage/cpuid2cpuflags
app-portage/gentoolkit
gui-wm/sway
net-misc/dhcpcd
net-misc/netifrc
net-wireless/wpa_supplicant
sys-devel/binutils
sys-devel/gcc
sys-kernel/gentoo-kernel-bin
sys-kernel/linux-firmware
sys-libs/glibc
sys-libs/gpm
sys-process/htop
x11-terms/alacritty


Phoenix591 wrote:
theoretically if the virtual had an upgrade that the currently installed not in world dependency needed a useflag or some other change for the new version to fulfill, but an alternative dependency satisfied the new version without changes I believe portage would pull in the alternate and afterwards have the old original eligible to be depcleaned.
Not sure if I undertand, but this case is similar to circular dependency? Does this happen with people that have only gentoo-kernel instead of gentoo-kernel-bin?
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 495

PostPosted: Sat Apr 10, 2021 12:04 pm    Post subject: Reply with quote

rudregues wrote:
But I never installed virtual/dist-kernel by myself.

Then don't worry about it, its not a real kernel. It was just installed because gentoo-kernel-bin said it wanted it installed.

rudregues wrote:
Since gentoo-kernel-bin is in my world file and dist-kernel isn't, I created a mask file (etc/portage/package.mask/kernel) in order to mask gentoo-kernel-bin:

Please remove that mask if you haven't yet. The mask prevents upgrades from being installed of it and makes portage mad that it's even installed at all.

rudregues wrote:

Right now this is my world file:
Code:
$ cat /var/lib/portage/worldworld
app-misc/neofetch
app-portage/cpuid2cpuflags
app-portage/gentoolkit
gui-wm/sway
net-misc/dhcpcd
net-misc/netifrc
net-wireless/wpa_supplicant
sys-devel/binutils
sys-devel/gcc
sys-kernel/gentoo-kernel-bin
sys-kernel/linux-firmware
sys-libs/glibc
sys-libs/gpm
sys-process/htop
x11-terms/alacritty

It looks like you have a couple extra things in there: gcc, glibc, and binutils. These are all core system packages which are part of the system set and are always considered part of world. They aren't hurting anything or changing anything by being there, but if you want to keep it as clean as possible you may run
Code:
emerge --deselect gcc glibc binutils

to safely remove them from the world file. Everything else is just fine.

rudregues wrote:
Not sure if I undertand, but this case is similar to circular dependency? Does this happen with people that have only gentoo-kernel instead of gentoo-kernel-bin?
Its only theoretical and not super likely to happen with the kernel. Its a potential problem if you only have a virtual for something in your world file (which you don't) and not one of the choices of dependency for the virtual. This scenario describes portage changing what choice its depending on: ie installing the other package, because due to reasons the other couldn't be upgraded without changes to useflags or other things.

Basically don't worry about it since you don't have only the virtual in your world.
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