Bug 16134 - urpme --auto-orphans proposes to remove package that can't be removed
Summary: urpme --auto-orphans proposes to remove package that can't be removed
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard: MGA5TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 20:46 CEST by Sander Lepik
Modified: 2023-06-22 12:11 CEST (History)
3 users (show)

See Also:
Source RPM: urpmi-8.06-1.mga5.src.rpm, tk
CVE:
Status comment:


Attachments
fix bogus orphan packages (when one of their file is needed by a file require) (1.19 KB, patch)
2015-08-28 16:27 CEST, Thierry Vignaud
Details | Diff
Similar problem in urpme --auto-orphans on mga5-x86-64 (4.45 KB, text/plain)
2016-04-05 20:59 CEST, Shlomi Fish
Details

Description Sander Lepik 2015-06-16 20:46:30 CEST
Description of problem:

# LC_ALL=C urpme --auto-orphans --debug
getting lock on urpmi
parsing: /etc/urpmi/mediacfg.d/Devel-2-alpha2-x86_64
parsing: /etc/urpmi/mediacfg.d/Official-2-x86_64
examining synthesis file [/var/lib/urpmi/Core Release/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Release/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Tainted Release/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Core 32bit Release/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/local/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Google Chrome/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/google-chrome/synthesis.hdlist.cz]
computing unrequested orphans
opening rpmdb (root=, write=)
reading and cleaning /var/lib/rpm/installed-through-deps.list
To satisfy dependencies, the following 5 packages will be removed (58MB):
  
(orphan packages)
  cdrkit-1.1.11-7.mga5.x86_64
  kernel-desktop-3.19.4-2.mga5-1-1.mga5.x86_64
  nvidia-current-kernel-3.19.4-desktop-2.mga5-346.59-3.mga5.nonfree.x86_64
  tk-8.5.15-3.mga5.x86_64
  virtualbox-kernel-3.19.4-desktop-2.mga5-4.3.26-6.mga5.x86_64
Remove 5 packages? (y/N) y
removing cdrkit-1.1.11-7.mga5.x86_64 kernel-desktop-3.19.4-2.mga5-1-1.mga5.x86_64 nvidia-current-kernel-3.19.4-desktop-2.mga5-346.59-3.mga5.nonfree.x86_64 tk-8.5.15-3.mga5.x86_64 virtualbox-kernel-3.19.4-desktop-2.mga5-4.3.26-6.mga5.x86_64
opening rpmdb (root=, write=1)
created transaction for installing on / (remove=5, install=0, upgrade=0)
trans: scheduling removal of kernel-desktop-3.19.4-2.mga5-1-1.mga5.x86_64
trans: scheduling removal of nvidia-current-kernel-3.19.4-desktop-2.mga5-346.59-3.mga5.nonfree.x86_64
trans: scheduling removal of cdrkit-1.1.11-7.mga5.x86_64
trans: scheduling removal of tk-8.5.15-3.mga5.x86_64
trans: scheduling removal of virtualbox-kernel-3.19.4-desktop-2.mga5-4.3.26-6.mga5.x86_64
Removal failed:
        /usr/bin/wish is needed by (installed) xorriso-1.3.8-4.mga5.x86_64
unlocking urpmi database
EXITING (pid=1760)

Reproducible: 

Steps to Reproduce:
Samuel Verschelde 2015-06-17 11:44:13 CEST

Whiteboard: (none) => MGA5TOO

Comment 1 David Walser 2015-06-19 01:01:30 CEST
Probably because it doesn't know about file deps.  xorriso should require tk explicitly instead of using file deps.

Source RPM: urpmi-8.06-1.mga5.src.rpm => urpmi-8.06-1.mga5.src.rpm, tk

Comment 2 Thierry Vignaud 2015-08-28 15:43:16 CEST
Yes and no.
We do ignore most file deps in synthesis & thus for installing packages.
But we should not break computing orphans b/c of file deps.

The issue here is that it's an auto deps b/c of /usr/bin/xorriso-tcltk.
We actually try to remap such interpreter deps to the right package:
http://svnweb.mageia.org/packages/cauldron/rpm/current/SOURCES/script-no-file-deps.diff?revision=721936&view=markup

What happens here is that xorriso doesn't BR tk and thus this deps
isn't remaped.
One solution is to add BR on tk in xorriso.spec.
Another would be alter script.req, sg like replacing:
   echo $INTERP|grep -Ev $BLACKLIST
by:
   case $INTERP in
   # special cases for interpreters not in basesystem & not always BR:
   */csh) echo tcsh ;;
   */expect) echo expect ;;
   */fontforge) echo fontforge ;;
   */node) echo nodejs ;;
   */php) echo php ;;
   */wish) echo tk ;;
   # default case:
   *) echo $INTERP;;
   esac

This indeed fixes (really workaround) it.

(I'll remove the $BLACKLIST filtering there as it was already done earlier)
Comment 3 Thierry Vignaud 2015-08-28 16:27:55 CEST
Created attachment 6977 [details]
fix bogus orphan packages (when one of their file is needed by a file require)

This patch fixes it too but adds some cost.
Comment 4 Shlomi Fish 2016-04-05 20:59:07 CEST
Created attachment 7635 [details]
Similar problem in urpme --auto-orphans on mga5-x86-64

This is a similar problem I'm running into in Mageia v5.

CC: (none) => shlomif

Marja Van Waes 2017-12-02 12:26:23 CET

CC: (none) => mageiatools, marja11

Comment 5 Thierry Vignaud 2022-07-28 07:50:22 CEST
I can reproduce it, trying to debug it…
Morgan Leijström 2023-06-22 12:11:10 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=31699


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