Bug 19979 - x11-driver-video-vmware is identified as unneeded by draklive-install - causes all x11 video drivers to be orphaned
Summary: x11-driver-video-vmware is identified as unneeded by draklive-install - cause...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-12-18 17:59 CET by Martin Whitaker
Modified: 2017-03-05 22:20 CET (History)
2 users (show)

See Also:
Source RPM: drakxtools-17.65-1.mga6.src.rpm
CVE:
Status comment:


Attachments
Proposed fix (1.78 KB, text/plain)
2016-12-19 15:08 CET, Martin Whitaker
Details

Description Martin Whitaker 2016-12-18 17:59:43 CET
x11-driver-video-vmware is included in the list of unused hardware support packages by draklive-install. If this package is removed, the x11-driver-video package is also removed. This leaves all the common x11 video driver packages orphaned, which will lead to a broken system if urpme --auto-orphans is run.

Looking at the differences between cauldron and mga5, this has come about because x11-driver-video-vmware has been added to rpmsrate-raw. But I don't know where the right place to fix it is.
Comment 1 Martin Whitaker 2016-12-19 15:08:50 CET
Created attachment 8801 [details]
Proposed fix

I don't know if this is the correct solution, but it works.
Martin Whitaker 2016-12-19 15:10:45 CET

Keywords: (none) => PATCH
Assignee: bugsquad => mageiatools
Source RPM: (none) => drakxtools-17.65-1.mga6.src.rpm

Comment 2 Thierry Vignaud 2016-12-19 20:38:12 CET
As I said in bug #12361, that would only prevent draklive-install to remove it and of install.
But urpme --auto-orphans will still suggest to remove it.

The issue is that draklive-install doesn't tell urpmi about needed packages.
It should.
But as it basically just dumps the live system, it doesn't tell urpmi
I suggested attachment #8651 [details] on bug #12361

CC: (none) => thierry.vignaud

Comment 3 Martin Whitaker 2016-12-19 20:59:07 CET
(In reply to Thierry Vignaud from comment #2)
> As I said in bug #12361, that would only prevent draklive-install to remove
> it and of install.
> But urpme --auto-orphans will still suggest to remove it.

It won't because x11-driver-video-vmware isn't an orphan, it's required by x11-driver-video and that's marked as manually installed.

> The issue is that draklive-install doesn't tell urpmi about needed packages.
> It should.
> But as it basically just dumps the live system, it doesn't tell urpmi
> I suggested attachment #8651 [details] on bug #12361

That's not going to help in this case, because pkgs:detect_graphical_drivers only returns proprietary drivers. But it's still a good idea, so I'll test the patch anyway.

What is the reason for pkgs:detect_graphical_drivers only returning proprietary drivers?
Comment 4 Thierry Vignaud 2016-12-19 21:01:26 CET
Another solution would be to do the same as harddrake2:
- parse rpmsrate
- get the list of needed packages
- run urpmi with that list in order to prevent urpme to remove them

See http://gitweb.mageia.org/software/drakx/tree/perl-install/standalone/harddrake2#n496

Aka we should call a func like:

# prevent urpme --auto-orphans to remove those
sub keep_needed_pkgs {
    if (my @packages = pkgs::detect_hardware_packages($in->do_pkgs)) {
        # we use uniq() because on biarch machines, we got packages twice:
        my @packages2install = uniq($in->do_pkgs->are_available(@packages));
	$in->do_pkgs->install(@packages2install);
    }
}

Then we may have to add part of the pkg list of pkgs
    # do no try to install too generic hw packages:
    my @blacklist = [ qw(...) ];
Comment 5 Thierry Vignaud 2016-12-19 21:28:17 CET
(In reply to Martin Whitaker from comment #3)
> What is the reason for pkgs:detect_graphical_drivers only returning
> proprietary drivers?

I guess b/c all free drivers are installed by default (in the old days b/c xfree86 was monolitic, then b/c we've x11-driver-video pulling the really used ones)
Comment 6 Martin Whitaker 2016-12-20 10:14:06 CET
Thinking about it more, keeping all the common video drivers installed is good in case the user changes their graphics card. So we probably don't want to change that.
Comment 7 Rémi Verschelde 2017-01-17 15:51:24 CET
(In reply to Thierry Vignaud from comment #2)
> As I said in bug #12361, that would only prevent draklive-install to remove
> it and of install.
> But urpme --auto-orphans will still suggest to remove it.

But if it's not removed, I guess x11-driver-video would be kept and its dependencies would not be seen as orphans, no? Or is x11-driver-video also seen as an orphan?
Comment 8 Martin Whitaker 2017-01-17 18:17:20 CET
(In reply to Rémi Verschelde from comment #7)
> (In reply to Thierry Vignaud from comment #2)
> > As I said in bug #12361, that would only prevent draklive-install to remove
> > it and of install.
> > But urpme --auto-orphans will still suggest to remove it.
> 
> But if it's not removed, I guess x11-driver-video would be kept and its
> dependencies would not be seen as orphans, no? Or is x11-driver-video also
> seen as an orphan?

Yes to the first question, no to the second.
Comment 9 Rémi Verschelde 2017-01-17 18:55:33 CET
So I guess the patch in comment 1 should work as a quick fix, until a better fix is worked on as described in comment 2 or comment 4?
Comment 10 Martin Whitaker 2017-01-17 19:07:48 CET
Yes, it's applied as a temporary patch in the latest sta2 ISOs.
Comment 11 Mageia Robot 2017-02-12 16:02:04 CET
commit b1e9ed8a077baf02f1a0be5959c4b39069bf7183
Author: Martin Whitaker <mageia@...>
Date:   Mon Dec 19 14:01:22 2016 +0000

    Exclude x11-driver-video-vmware from unneeded packages (mga#19979).
    
    It's required by x11-driver-video, and removing that orphans all
    the other required x11 video driver packages.
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=b1e9ed8a077baf02f1a0be5959c4b39069bf7183
Comment 12 Mageia Robot 2017-02-25 15:16:18 CET
commit e617931c7ef98da28dc9a99be9a7cc3fa06151e1
Author: Martin Whitaker <mageia@...>
Date:   Mon Dec 19 14:01:22 2016 +0000

    Exclude x11-driver-video-vmware from unneeded packages (mga#19979).
    
    It's required by x11-driver-video, and removing that orphans all
    the other required x11 video driver packages.
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=e617931c7ef98da28dc9a99be9a7cc3fa06151e1
Comment 13 Nicolas Lécureuil 2017-03-05 22:20:46 CET
tested with Sta2 live and non live, and this is fixed

Status: NEW => RESOLVED
CC: (none) => mageia
Resolution: (none) => FIXED


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