Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{upgrade} does not expand to 1 even though at least one slot can be upgraded #111

Open
Flowdalic opened this issue May 31, 2023 · 7 comments

Comments

@Flowdalic
Copy link
Contributor

Flowdalic commented May 31, 2023

Shouldn't the output of the following be 'true'

# FORMAT='{upgrade}true{else}false{}' eix --exact --pure-packages sys-kernel/gentoo-kernel
false

given that eix sys-kernel/gentoo-kernel shows

 # eix sys-kernel/gentoo-kernel
[?] sys-kernel/gentoo-kernel
     Available versions:  
     (5.4.242) 5.4.242-r2^tu
     (5.4.243) ~5.4.243^tu
     (5.4.244) 5.4.244^tu
     (5.10.179) 5.10.179-r2^tu
     (5.10.180) ~5.10.180^tu
     (5.10.181) 5.10.181^tu
     (5.15.110) 5.15.110-r2^tu
     (5.15.111) ~5.15.111^tu
     (5.15.112) ~5.15.112^tu
     (5.15.113) ~5.15.113^tu
     (5.15.114) 5.15.114^tu
     (6.1.27) 6.1.27-r2^tu{gpkg}
     (6.1.28) ~6.1.28^tu
     (6.1.29) ~6.1.29^tu
     (6.1.30) ~6.1.30^tu
     (6.1.31) 6.1.31^tu
     (6.2.16) ~6.2.16^tu
     (6.3.4) ~6.3.4-r1^tu
     (6.3.5) ~6.3.5^tu
       {debug hardened +initramfs savedconfig test}
     Installed versions:  6.1.21(6.1.21)^t(10:25:24 2023-04-04)(initramfs -debug -hardened -savedconfig -test) 6.1.22(6.1.22)^t(08:32:58 2023-04-04)(initramfs -debug -hardened -savedconfig -test) 6.1.27-r2(6.1.27)^t{gpkg}(21:39:40 2023-05-30)(initramfs -debug -hardened -savedconfig -test) 6.2.13(6.2.13)^t(10:56:21 2023-04-28)(initramfs -debug -hardened -savedconfig -test)
     Homepage:            https://wiki.gentoo.org/wiki/Project:Distribution_Kernel https://www.kernel.org/
     Description:         Linux kernel built with Gentoo patches

where 6.1.31 is stable and installable? Also note that [?] besides the package name. I would have expected [?U].

@vaeth
Copy link
Owner

vaeth commented Jun 1, 2023

Do you have either set UPGRADE_TO_HIGHEST_SLOT=false or do you have sys-kernel/gentoo-kernel in /etc/portage/package.slot_upgrade_forbid?

@vaeth
Copy link
Owner

vaeth commented Jun 1, 2023

There was a typo on the eix manpage UPDATE_TO_HIGHEST_SLOT (false) instead of UPGRADE_TO_HIGHEST_SLOT (correct).

@Flowdalic
Copy link
Contributor Author

Do you have either set UPGRADE_TO_HIGHEST_SLOT=false

No, also explicitly setting UPGRADE_TO_HIGHEST_SLOT=true does not change this behavior

$ UPGRADE_TO_HIGHEST_SLOT=true FORMAT='{upgrade}true{else}false{}' eix --exact --pure-packages sys-kernel/gentoo-kernel
false

or do you have sys-kernel/gentoo-kernel in /etc/portage/package.slot_upgrade_forbid

I didn't even know that such a file exists. It appears to be eix specific and does not affect portage (at least I could find the string "slot_upgrade_forbid" in portage's source), right?

@vaeth
Copy link
Owner

vaeth commented Jun 4, 2023

I tried to reproduce the problem by removing my package.accept_keywords for gentoo-sources and lying about the installed version in /var/db/pkg. However, I get [U?] as expected (I did not try the manual {upgrade} check, because this is redundant as being implicitly called when displaying the [U?]).

In the moment I have no idea what might cause the problem for you.

No, also explicitly setting UPGRADE_TO_HIGHEST_SLOT=true does not change this behavior

Please verify that eix --print UPGRADE_TO_HIGHEST_SLOT really prints true. (This is just a desparate attempt, as I really cannot imagine any other cause). Also, please try to regenerate the database with eix-update (perhaps some subtle corruption has happened.)

It appears to be eix specific and does not affect portage

This conjecture is correct. I introduced it as a way to customize UPGRADE_TO_HIGHEST_SLOT per package. Perhaps not the greatest mechanism, but that's how it is now.

@vaeth
Copy link
Owner

vaeth commented Jun 5, 2023

Another possibility (though even more unlikely): Please verify that eix --print SLOT_UPGRADE_FORBID indeed prints the expected path /etc/portage/package.slot_upgrade_forbid.

@Flowdalic
Copy link
Contributor Author

I just remember what may be the missing piece. I have a user set file /etc/portage/sets/kernel-preserved:

=sys-kernel/gentoo-kernel-6.1.22
=sys-kernel/gentoo-kernel-6.2.13
=sys-kernel/gentoo-kernel-6.1.27-r2
=sys-kernel/gentoo-kernel-6.1.21

maybe this is confusing eix?

@vaeth
Copy link
Owner

vaeth commented Jun 9, 2023

No. eix does not do any dependency resolution. These files are only used to check whether a package is in world{,_sets}. I tried nevertheless, and it had no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants