Bug 32123 - urpmi install from repo despite i give it local file - because of dependencies chain
Summary: urpmi install from repo despite i give it local file - because of dependencie...
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-18 23:26 CEST by Morgan Leijström
Modified: 2023-07-19 13:51 CEST (History)
2 users (show)

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


Attachments

Description Morgan Leijström 2023-07-18 23:26:54 CEST
Description of problem:  bug or intended(documented?) behaviour?

Version: urpmi-8.131-1


Steps to Reproduce:
I downloaded a specific kernel rpm, and told urpmi to install it.
Then it wanted to instead fetch kernel from release repo!


$ LC_ALL=C sudo urpmi ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release")
  kernel-desktop                 6.4.3        1.mga9        x86_64  (recommended)
  kernel-desktop-latest          6.4.3        1.mga9        x86_64  (recommended)
(command line)
  kernel-desktop-6.1.34-2.mga8   1            1.mga8        x86_64  
170MB of additional disk space will be used.
151MB of packages will be retrieved.
Proceed with the installation of the 3 packages? (Y/n) n

Disabled core release repo and it worked:

$ LC_ALL=C sudo urpmi ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
installing kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm from .
Preparing...                     ################################################################################
      1/1: kernel-desktop-6.1.34-2.mga8
Comment 1 Dave Hodgins 2023-07-19 06:27:47 CEST
When installing an rpm from a file, just use "rpm -i thefilename", not urpmi.

CC: (none) => davidwhodgins

Comment 2 Morgan Leijström 2023-07-19 07:55:05 CEST
Thanks.

But about urpmi - do it always try to use later version of a package in any repo even when user define a specific version?
Morgan Leijström 2023-07-19 08:01:05 CEST

Summary: urpmin install from repo despite i give it local file => urpmi install from repo despite i give it local file

Comment 3 Jani Välimaa 2023-07-19 09:23:57 CEST
It's because the pkg you were trying to install most probably recommends 'kernel-desktop-latest' and that's pulling the 'extra' pkgs. One solution is to install with --no-recommends.

What's the output of
$ urpmq --recommends ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm

CC: (none) => jani.valimaa

Comment 4 Jani Välimaa 2023-07-19 09:29:52 CEST
(In reply to Dave Hodgins from comment #1)
> When installing an rpm from a file, just use "rpm -i thefilename", not urpmi.
Why to use rpm, if we have a specific tool to install pkgs?

Anyway, it's better to always use 'rpm -U' instead. It'll handle removing the old pkg, if any, and properly handles configuration files.
Comment 5 Morgan Leijström 2023-07-19 11:12:32 CEST
OK this seem to work "as designed", though confusing.
If i tell it to install a specific kernel, If there is no desktop-latest installed, urpmi install latest desktop-latest and kernel it finds in repos.
If there is a desktop-latest of any version installed, urpmi install given kernel.


]$ urpmq --recommends ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
cpupower
iw
kernel-desktop-latest
microcode


   With no desktop-latest package installed:

$ LC_ALL=C sudo urpmi --test ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
[sudo] password for morgan: 
Sorry, try again.
[sudo] password for morgan: 
To satisfy dependencies, the following packages are going to be installed:
(test only, installation will not be actually done)
  Package                        Version      Release       Arch    
(medium "Core Release")
  kernel-desktop                 6.4.3        1.mga9        x86_64  (recommended)
  kernel-desktop-latest          6.4.3        1.mga9        x86_64  (recommended)
(command line)
  kernel-desktop-6.1.34-2.mga8   1            1.mga8        x86_64 


   It works to give it a specific desktop-latest in same round:

$ LC_ALL=C sudo urpmi --test ./kernel-desktop-latest-6.1.34-2.mga8.x86_64.rpm kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
installing kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
./kernel-desktop-latest-6.1.34-2.mga8.x86_64.rpm
Preparing...                     ################################################################################
Installation is possible


   And yes --no-recommends works

$ LC_ALL=C sudo urpmi --test --no-recommends ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm
installing kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm from .
Preparing...                     ################################################################################
Installation is possible


   And here with kernel-desktop-latest-6.1.38-3.mga8 already installed

$ LC_ALL=C sudo urpmi --test ./kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm

installing kernel-desktop-6.1.34-2.mga8-1-1.mga8.x86_64.rpm from .
Preparing...                     ################################################################################
Installation is possible


So urpmi and involved packages do work as intended - though it may be confusing in this simple usage.

I ordered a simple coffee from local shop, but got another coffee from another town because my order needed a cake with it that needed that other cofee...  ;)

Thank you for the explanations and tips!

Status: NEW => RESOLVED
Resolution: (none) => INVALID
Summary: urpmi install from repo despite i give it local file => urpmi install from repo despite i give it local file - because of dependencies chain

Comment 6 Morgan Leijström 2023-07-19 11:20:39 CEST
...and if I had already had any cake on my table of any sort i would have got the local coffee i ordered.

Resolution: INVALID => FIXED

Comment 7 Morgan Leijström 2023-07-19 13:51:22 CEST
did not intend to change flag...

Resolution: FIXED => INVALID


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