Bug 32183 - urpmi erroneously tells it will install kernels (which it then do not) by deps of other kernel.
Summary: urpmi erroneously tells it will install kernels (which it then do not) by dep...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal minor
Target Milestone: Mageia 10
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-19 16:54 CEST by Morgan Leijström
Modified: 2023-08-19 18:34 CEST (History)
0 users

See Also:
Source RPM: urpmi-8.131-2.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Morgan Leijström 2023-08-19 16:54:17 CEST
Version-Release number of selected component (if applicable):
urpmi-8.131-2.mga9

Trying a low latency kernel form Giuseppe (thanks!) from
https://copr-be.cloud.fedoraproject.org/results/ghibo/mageia9-bonus/mageia-cauldron-x86_64/06309887-kernel/
downloaded kernel-desktop and -devel, packages:

$ ls ./*5.10*
./kernel-desktop-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm  ./kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm

  And told urpmi to install them:

$ sudo urpmi ./*5.10*
För att tillfredsställa beroenden kommer följande paket att installeras:
  Paket                          Version      Release       Arkitektur 
(media "Core Updates Testing")
  kernel-desktop                 6.4.9        3.mga9        x86_64  (rekommenderas)
  kernel-desktop-devel           6.4.9        3.mga9        x86_64  (rekommenderas)
  kernel-desktop-devel-latest    6.4.9        3.mga9        x86_64  (rekommenderas)
  kernel-desktop-latest          6.4.9        3.mga9        x86_64  (rekommenderas)
(kommandorad)
  kernel-desktop-5.10.191-2.low> 1            1.mga9        x86_64  
  kernel-desktop-devel-5.10.191> 1            1.mga9        x86_64  
295MB ytterligare diskutrymme kommer att användas.
198MB paket kommer att hämtas.

(Sorry about not shifting to English)
Note that it say that because of dependencies it wants to install four 6.4.9 packages.
First question is why it wants to do that.
Second question is why it then do not do what it said...
Does not even try to install any 6.4.9 packages:

Fortsätt installationen av 6 paket? (J/n) j
varning: ./kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm: Huvud V4 RSA/SHA256 Signature, nyckel-ID 1e627740: NOKEY
Följande paket har felaktiga signaturer:
./kernel-desktop-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm: Ogiltig signatur (NOT OK (no key): ./kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm: Huvud V4 RSA/SHA256 Signature, nyckel-ID 1e627740: NOKEY)
./kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm: Ogiltig signatur (NOT OK (no key): ./kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm: Huvud V4 RSA/SHA256 Signature, nyckel-ID 1e627740: NOKEY)
Vill du fortsätta installationen? (j/N) j
installerar kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm kernel-desktop-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9.x86_64.rpm från .
Förbereder...                    ##################################################################################################################################################################################################################################################################################################
      1/6: kernel-desktop-5.10.191-2.lowlatency.ck.500hz.mga9
                                 ##################################################################################################################################################################################################################################################################################################
      2/6: kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9
                                 ##################################################################################################################################################################################################################################################################################################

nvidia-current (535.86.05-1.mga9.nonfree): Installing module.
......................................................
......
virtualbox (7.0.10-2.mga9): Installing module.
..............
......
Du borde starta om din dator för kernel-desktop-5.10.191-2.lowlatency.ck.500hz.mga9



$ rpm -qa|grep kernel
remove-old-kernels-0.99.21.7-1.mga9
kernel-firmware-20230625-1.mga9
kernel-firmware-nonfree-20230808-1.mga9.nonfree
kernel-doc-6.4.9-2.mga9
kernel-desktop-6.1.45-1.mga8-1-1.mga8
kernel-desktop-devel-6.1.45-1.mga8-1-1.mga8
kernel-userspace-headers-6.1.45-1.mga8
virtualbox-kernel-6.1.45-desktop-1.mga8-7.0.10-2.5.mga8
kernel-desktop-devel-6.4.11-4.lowlatency.mga9
kernel-desktop-6.4.11-4.lowlatency.mga9
kernel-desktop-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9
kernel-desktop-devel-5.10.191-2.lowlatency.ck.500hz.mga9-1-1.mga9

Note the absence of any 6.4.9 and any -latest kernel packages.
Comment 1 Thomas Backlund 2023-08-19 17:09:29 CEST
(In reply to Morgan Leijström from comment #0)

> Note that it say that because of dependencies it wants to install four 6.4.9
> packages.
> First question is why it wants to do that.

Because kernel-desktop recommends kernel-desktop-latest and kernel-desktop-devel recommends kernel-desktop-devel-latest

so urpmi checks for the recommends, finds the latest of them in updates_testing and adds them to the list of packages to install, and as those *-latest packages in updates_testing requires their matching real 6.4.9 kernels from updates_testing, they also get on the list to get installed.


> Second question is why it then do not do what it said...
> Does not even try to install any 6.4.9 packages:


Thats a bug (or a feature) depending on the view...

bug if you expected the 6.4.9 ones to get installed

feature as it installed only the packages you requested.

now if it's considered a feature, it needs a cosmetic fix to not list packages it does not intend to install...
Comment 2 Morgan Leijström 2023-08-19 17:26:43 CEST
(In reply to Thomas Backlund from comment #1)
> (In reply to Morgan Leijström from comment #0)
> 
> Because kernel-desktop recommends kernel-desktop-latest and
> kernel-desktop-devel recommends kernel-desktop-devel-latest
> 
> so urpmi checks for the recommends, finds the latest of them in
> updates_testing and adds them to the list of packages to install, and as
> those *-latest packages in updates_testing requires their matching real
> 6.4.9 kernels from updates_testing, they also get on the list to get
> installed.

Ah, Ok

Is it really sane for the kernel packages to request latest -latest packages?

i.e i do not want the -latest packages, i want to decide when to install new kernel.
Example: I just had removed 6.4.9 to make room...

Why not instead let normal system updating update the -latest packages
- so only if already installed, the kernel-latest package will get updated, and that in turn update the kernel?



> 
> > Second question is why it then do not do what it said...
> > Does not even try to install any 6.4.9 packages:
> 
> 
> Thats a bug (or a feature) depending on the view...
> 
> bug if you expected the 6.4.9 ones to get installed


It is a bug in urpmi that it do not do as it told user it will. 


> 
> feature as it installed only the packages you requested.
> 
> now if it's considered a feature, it needs a cosmetic fix to not list
> packages it does not intend to install...

...plus *documenting* the irregular features...
Comment 3 Thomas Backlund 2023-08-19 17:49:26 CEST
(In reply to Morgan Leijström from comment #2)
> (In reply to Thomas Backlund from comment #1)
> > (In reply to Morgan Leijström from comment #0)
> > 
> > Because kernel-desktop recommends kernel-desktop-latest and
> > kernel-desktop-devel recommends kernel-desktop-devel-latest
> > 
> > so urpmi checks for the recommends, finds the latest of them in
> > updates_testing and adds them to the list of packages to install, and as
> > those *-latest packages in updates_testing requires their matching real
> > 6.4.9 kernels from updates_testing, they also get on the list to get
> > installed.
> 
> Ah, Ok
> 
> Is it really sane for the kernel packages to request latest -latest packages?
> 


Yes, it was done to get automatic kernel updates for endusers due to our custom kernel naming that prevented normal rpm detecting new versions.

if you dont want it uninstall them (in mga8 that is), for mga9 with normal package versioning for kernels, urpmi & dnf will detect the new kernels anyway... the *-latest* packages in mga9 is only for coping with upgrading from mga8 -> mga9, and they will be gone in mga10



> i.e i do not want the -latest packages, i want to decide when to install new
> kernel.
> Example: I just had removed 6.4.9 to make room...
> 

then tell urpmi to ignore recommends with "--no-recommends" or install the rpms with rpm -i

if you feed a list of rpms to urpmi it will do exactly what a package manager is supposed to do... parse requires,conflicts,obsoletes,recommends and act accordingly...

and urpmi did point out what it intended to do, and why:
(media "Core Updates Testing")
  kernel-desktop                 6.4.9        3.mga9        x86_64  (rekommenderas)
  kernel-desktop-devel           6.4.9        3.mga9        x86_64  (rekommenderas)
  kernel-desktop-devel-latest    6.4.9        3.mga9        x86_64  (rekommenderas)
  kernel-desktop-latest          6.4.9        3.mga9        x86_64  (rekommenderas)

note the reference to "(rekommenderas)"

and you pressed "j"

(I'm ignoring the fact here the bug that it didn't do what it suggested it would do)

> Why not instead let normal system updating update the -latest packages
> - so only if already installed, the kernel-latest package will get updated,
> and that in turn update the kernel?


every package with never version will always get upgraded...

if you dont want that, add unwanted package updates to urpmi skip.list
Comment 4 Thomas Backlund 2023-08-19 18:01:40 CEST
(In reply to Thomas Backlund from comment #3)

> Yes, it was done to get automatic kernel updates for endusers due to our
> custom kernel naming that prevented normal rpm detecting new versions.


and just in case someone wonders, it has been with us for ~10+ years:

------------------------------------------------------------------------
r454193 | tmb | 2013-07-14 18:59:37 +0200 (Sun, 14 Jul 2013) | 3 lines

- make each kernel-*(-devel) suggest the matching -latest package
Comment 5 Morgan Leijström 2023-08-19 18:34:17 CEST
There are even more things in Mageia I do not understand yet :)


(In reply to Thomas Backlund from comment #3)
> (In reply to Morgan Leijström from comment #2)
> > (In reply to Thomas Backlund from comment #1)

> > Is it really sane for the kernel packages to request latest -latest packages?
> 
> Yes, it was done to get automatic kernel updates for endusers due to our
> custom kernel naming that prevented normal rpm detecting new versions.
> 
> if you dont want it uninstall them (in mga8 that is), for mga9 with normal
> package versioning for kernels, urpmi & dnf will detect the new kernels
> anyway... the *-latest* packages in mga9 is only for coping with upgrading
> from mga8 -> mga9, and they will be gone in mga10

OK Good


> > i.e i do not want the -latest packages
> 
> then tell urpmi to ignore recommends with "--no-recommends" or install the
> rpms with rpm -i

Yes. I just did not anticipate kernel to recommend -latest.


> if you feed a list of rpms to urpmi it will do exactly what a package
> manager is supposed to do... parse requires,conflicts,obsoletes,recommends
> and act accordingly...
> 
> and urpmi did point out what it intended to do, and why:

Yes


> and you pressed "j"
> 
> (I'm ignoring the fact here the bug that it didn't do what it suggested it
> would do)


I guess it is a feature that got coded in so it skips installing, and the bug here is that it still tells it will.

I suggest to let it be for now, but in Mageia 10 maybe remove the feature from urpmi for less complexity/bloat to ease its maintenance.

Target Milestone: --- => Mageia 10
Severity: normal => minor


Note You need to log in before you can comment on or make changes to this bug.