Bug 6061 - mgaapplet-upgrade-helper removes nonfree and tainted repo (and so radeon-firmware) when upgrading to next Mageia version
Summary: mgaapplet-upgrade-helper removes nonfree and tainted repo (and so radeon-firm...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: release_blocker major
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard: 3alpha3 3beta1 MGA2TOO
Keywords: PATCH
: 6148 (view as bug list)
Depends on: 8892 9744
Blocks: 8016 8157
  Show dependency treegraph
 
Reported: 2012-05-23 19:18 CEST by Jeff Robins
Modified: 2013-05-16 17:56 CEST (History)
14 users (show)

See Also:
Source RPM: mgaonline
CVE:
Status comment:


Attachments
Patch to re enable Tainted and Non Free repos on upgrade (1.57 KB, patch)
2012-11-12 00:48 CET, Derek Jennings
Details | Diff
subroutine to enable media (551 bytes, patch)
2013-03-16 22:47 CET, Derek Jennings
Details | Diff
patch to enable media if they were previously enabled (902 bytes, patch)
2013-03-16 22:49 CET, Derek Jennings
Details | Diff
enable nonfree/tainted during upgrade (1.38 KB, patch)
2013-05-02 21:02 CEST, AL13N
Details | Diff
Patch from comment 40 modified to work with current testing version (1.37 KB, patch)
2013-05-03 01:09 CEST, Dave Hodgins
Details | Diff
enable nonfree/tainted during upgrade (1.01 KB, patch)
2013-05-08 23:35 CEST, AL13N
Details | Diff
mgaapplet enable nonfree tainted during upgrade (1.01 KB, patch)
2013-05-10 00:41 CEST, AL13N
Details | Diff
mgaapplet enable nonfree tainted during upgrade backported for mga2 (964 bytes, patch)
2013-05-10 00:41 CEST, AL13N
Details | Diff
Working patch (2.01 KB, patch)
2013-05-10 03:31 CEST, Dave Hodgins
Details | Diff
mgaapplet enable nonfree tainted during upgrade for mga2 (1.27 KB, patch)
2013-05-11 00:38 CEST, AL13N
Details | Diff

Description Jeff Robins 2012-05-23 19:18:42 CEST
Description of problem:
I have 2 systems which were running Mageia 1 and I used mgaapplet-upgrade-helper to upgrade the syatems to Mageia 1.  Both systems have AMD graphics and had radeon-firmware installed.  radeon-firmware was no longer installed after the upgrade.  The non-free repository is not enabled by default, even though it was enabled in the Mageia 1 install, so adding radeon-firmware requires extra steps.

I managed to get radeon-firmware installed, but there are a bunch of errors when building the initrd and the system still won't boot to KDE.  The error message below looks very close to the one I got at home, but was generated by installing radeon-firmware on a i586 system I have at work.

"E: libkmod: index_mm_open: major version check fail: 65537 instead of 2953311319"

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install Mageia 1 on system with AMD graphics.
2. Install radeon-firmware
3. Use mgaapplet to upgrade to Mageia 2
Manuel Hiebel 2012-05-23 19:30:33 CEST

Component: Release (media or process) => RPM Packages
Summary: mgaapplet-upgrade-helper removes radeon-firmware when upgrading to Mageia 2 => mgaapplet-upgrade-helper removes nonfree repo (and so radeon-firmware) when upgrading to Mageia 2
Source RPM: (none) => mgaonline

Manuel Hiebel 2012-05-23 19:30:59 CEST

Blocks: (none) => 3342
Assignee: bugsquad => thierry.vignaud

Comment 1 Manuel Hiebel 2012-05-23 19:45:21 CEST
As a fast workaround, maybe enable again the nonfree repo as default ?

https://bugs.mageia.org/show_bug.cgi?id=617

sysadmin, comment ?

Severity: normal => critical

Comment 2 Pascal Terjan 2012-05-23 19:49:37 CEST
Installing non free software to users by default is not a sysadmin decision...

CC: (none) => pterjan

Manuel Hiebel 2012-05-23 19:50:11 CEST

CC: (none) => ennael1

Comment 3 Jeff Robins 2012-05-23 20:09:39 CEST
Maybe we should check which repos are enabled when the upgrade process starts and leave the upgraded system in the same state?  This is going to be a huge problem if we're removing installed packages on upgrade simply because they came from non-free or tainted.
Comment 4 Jeff Robins 2012-05-23 20:11:22 CEST
(In reply to comment #0)
> "E: libkmod: index_mm_open: major version check fail: 65537 instead of
> 2953311319"
 
This seems to come from version 2.6.xx kernels still existing in grub's menu.lst file.  So it's an unrelated problem.
Comment 5 Thierry Vignaud 2012-05-23 20:24:03 CEST
It can't be critical since it's like this for years (previously we weren't enabling restricted, non-free or plf media too)
Comment 6 Manuel Hiebel 2012-05-23 20:27:03 CEST
ok but it was not so annoying with the old year

the "learn more about this new version" go now to the release notes which contain a warning.

Severity: critical => major

Comment 7 Jeff Robins 2012-05-23 20:45:19 CEST
I didn't find it so critical for Mageia 1 because I was moving from Mandriva to Mageia and so I was expecting problems.  This is Mageia to Mageia, so I guess I was expecting to skip most of these issues.  I also knew that we had renamed and realigned the repos versus Mandriva.

Also, with Mageia 1 I was able to pass "radeon.modeset=0" to the kernel and get a graphical boot on the first boot.  I was not able to do that here.  I have yet to get the system to boot to KDE, even after installing the radeon-firmware package.
Comment 8 Manuel Hiebel 2012-05-29 12:50:08 CEST
*** Bug 6148 has been marked as a duplicate of this bug. ***

CC: (none) => derekjenn

AL13N 2012-06-03 12:44:03 CEST

CC: (none) => alien

Comment 9 Richard Crane 2012-06-03 13:32:08 CEST
Moving from Mageia 1 to Mageia 2 has proved to be far more difficult than it should have.
Surely the applet can be configured so that if you are using tainted/nonfree repositories prior to updating then those will be enabled during the update.

Ok understood that the 'free' philosophy might not like this - but if Mageia is going to provide these repositories then surely either continuing to use them when an upgrade happens or an option to say something like 'I notice you are using tainted and or Nonfree repositories for this distribution. Would you like to to continue using them in the new distribution?' should be possible.

CC: (none) => c138535

Comment 10 Jeff Robins 2012-06-05 09:00:16 CEST
I did finally get the system up and running, but I had to install the proprietary ATI driver, which I had installed before, but did not upgrade because the non-free repo was not enabled during the upgrade process.

I think that ignoring the users previous decision to use non-free and therefore causing the upgrade to have problems is a big mistake.  I can fully understand not making the decision to use non-free for the user, but in the cases where the user has already chosen to use non-free, then their decision should be honored.

--Jeff
Comment 11 AL13N 2012-06-05 09:12:12 CEST
it's not that we don't want to, it's more that the code required to detect nonfree and/or tainted (backports, testing, etc...) is not that trivial:

* consider that people can have any amount and types of old and new repositories, this detection will miss often, likely resulting in worse things than this.
* it is much easier to ask the people during upgrade/install
* for the installer, i myself (maybe others) might be planning of rewriting this a bit to make it more transparent
* perhaps for mgaapplet, this can be done the same.

so, imho it's more a feature than a bug, even though it's a feature that will likely solve this "bug" and others like it.

I can only encourage you to participate in Mageia, so that we have more time to implement features like this. (bugsquad or QA or doc or i18n or ...)
Comment 12 Jeff Robins 2012-06-05 09:30:03 CEST
I'm currently going through the packaging mentoring, so I'm trying to do my part. :)
Comment 13 AL13N 2012-06-05 13:02:43 CEST
awesome :)
Comment 14 Marja Van Waes 2012-06-11 16:55:47 CEST
Added tainted repo to this bug, because the applet not respecting existing choices for nonfree *and* tainted is on doktor5000's list the most reported issues in the forums.

Solving this for tainted at the same time as for nonfree will probably not be a lot of extra work

CC: (none) => doktor5000, marja11
Summary: mgaapplet-upgrade-helper removes nonfree repo (and so radeon-firmware) when upgrading to Mageia 2 => mgaapplet-upgrade-helper removes nonfree and tainted repo (and so radeon-firmware) when upgrading to Mageia 2

Marcello Anni 2012-06-25 17:02:21 CEST

CC: (none) => marcello.anni

Comment 15 Marja Van Waes 2012-07-06 15:03:18 CEST
Please look at the bottom of this mail to see whether you're the assignee of this  bug, if you don't already know whether you are.


If you're the assignee:

We'd like to know for sure whether this bug was assigned correctly. Please change status to ASSIGNED if it is, or put OK on the whiteboard instead.

If you don't have a clue and don't see a way to find out, then please put NEEDHELP on the whiteboard.

Please assign back to Bug Squad or to the correct person to solve this bug if we were wrong to assign it to you, and explain why.

Thanks :)

**************************** 

@ the reporter and persons in the cc of this bug:

If you have any new information that wasn't given before (like this bug being valid for another version of Mageia, too, or it being solved) please tell us.

@ the reporter of this bug

If you didn't reply yet to a request for more information, please do so within two weeks from now.

Thanks all :-D
Thierry Vignaud 2012-09-06 17:48:17 CEST

Status: NEW => ASSIGNED

Comment 16 Marcello Anni 2012-09-14 12:29:28 CEST
this problem should verify also in mageia 3 upgrade, right?
Comment 17 Jeff Robins 2012-09-16 18:56:51 CEST
I don't see any info on any changes that were done, so I would assume so.  Unfortunately I don't have a box I can test this on right now.  I do have a virtual machine, but it shouldn't require any non-free drivers.

--Jeff
Comment 18 Pascal Terjan 2012-09-16 19:18:46 CEST
Media names are stable between release (at least currently) so it should not be hard to keep a hash media name => status and re-enable them.
Comment 19 Manuel Hiebel 2012-11-05 16:50:56 CET
This message is a reminder that Mageia 1 is nearing its end of life. 
In approximately 25 days from now, Mageia will stop maintaining and issuing 
updates for Mageia 1. At that time this bug will be closed as WONTFIX (EOL) if it 
remains open with a Mageia 'version' of '1'.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version prior to Mageia 1's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not 
be able to fix it before Mageia 1 is end of life.  If you would still like to see 
this bug fixed and are able to reproduce it against a later version of Mageia, 
you are encouraged to click on "Version" and change it against that version 
of Mageia.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

--
Mageia Bugsquad
Comment 20 AL13N 2012-11-05 20:08:35 CET
without any testing, i'm pretty sure that mga2 => mga3 upgrades will have the same issue.
Comment 21 Manuel Hiebel 2012-11-05 20:41:07 CET
yep

Version: 1 => Cauldron
Whiteboard: (none) => MGA2TOO MGA1too

Manuel Hiebel 2012-11-08 16:07:06 CET

Blocks: (none) => 8016

Marja Van Waes 2012-11-10 19:26:01 CET

Summary: mgaapplet-upgrade-helper removes nonfree and tainted repo (and so radeon-firmware) when upgrading to Mageia 2 => mgaapplet-upgrade-helper removes nonfree and tainted repo (and so radeon-firmware) when upgrading to next Mageia version

Comment 22 Derek Jennings 2012-11-12 00:48:10 CET
Created attachment 3075 [details]
Patch to re enable Tainted and Non Free repos on upgrade


If we do not fix this bug before mga3 comes out then we will have lots of users complaining they have no X server after the upgrade again.

I have taken a look at it and produced this patch.
It simply checks if Tainted or non free repos are already enabled, and re-enables them if they are.

I have tested it on an mga1 to mga2 upgrade.
Marja Van Waes 2012-11-22 19:06:11 CET

Keywords: (none) => PATCH

Comment 23 Anne Nicolas 2012-11-23 09:11:40 CET
Thierry can you check it please ?
claire robinson 2012-11-30 12:05:46 CET

Whiteboard: MGA2TOO MGA1too => MGA2TOO MGA1too 3alpha3

claire robinson 2012-11-30 12:06:11 CET

CC: (none) => eeeemail

Marja Van Waes 2012-12-10 16:57:25 CET

Whiteboard: MGA2TOO MGA1too 3alpha3 => 3alpha3 MGA2TOO MGA1too

Comment 24 claire robinson 2012-12-12 12:10:14 CET
See also bug 8368

Whiteboard: 3alpha3 MGA2TOO MGA1too => 3alpha3 3beta1 MGA2TOO MGA1too

Comment 25 claire robinson 2013-01-03 19:06:54 CET
Will a fix for this make it into 3beta2 do you think? 
We should begin testing with it, if possible.
claire robinson 2013-01-10 22:06:40 CET

Priority: Normal => release_blocker

Comment 26 Marcello Anni 2013-01-12 12:30:08 CET
thank you Derek! i have a mga2 and mga1 system ready to make the upgrade test, if you provide this patch with an update (both for mga1 and mga2) i can upgrade the systems and let you know the issues that still remain. please, let me know


cheers
Marcello
Anne Nicolas 2013-01-29 23:03:41 CET

Depends on: (none) => 8892

Comment 27 Marcello Anni 2013-02-07 15:30:59 CET
is there an easy way to have this patch working? i would like to switch to beta 3 (and cauldron) but without this patch it's quite sure i will have problems... if thierry hasn't enough time to test it, is there anyone who can suggest me how to apply it to my system? thanks
Comment 28 Derek Jennings 2013-02-07 18:10:10 CET
(In reply to comment #27)
> is there an easy way to have this patch working? i would like to switch to beta
> 3 (and cauldron) but without this patch it's quite sure i will have problems...
> if thierry hasn't enough time to test it, is there anyone who can suggest me
> how to apply it to my system? thanks

Applying the patch to Mageia 2 will not help you upgrade to Cauldron
mgaapplet-upgrade-helper is only activated when the mirrors contain a flag saying an upgrade is available.  That will only happen when Mageia 3 gets officially released. Until then the only way to test this patch is on an upgrade from mga1 to mga2.

If you want to migrate to Cauldron, then you should use the Mga2 Beta2 DVD and select 'Upgrade',
See https://wiki.mageia.org/en/Mageia_3_beta2#Upgrading_from_Mageia_2

Upgrading from the DVD will not use the 'tainted' repository, but should (I think) install packages from 'nonfree' (maybe).
Comment 29 Derek Jennings 2013-02-07 18:12:58 CET
sorry that should be "Mga3 Beta2 DVD"
Comment 30 claire robinson 2013-02-07 19:30:58 CET
does 'killall mgaapplet && mgaapplet --testing' allow you to test Derek or does it need a flag to be set on the api before that works?
Comment 31 Derek Jennings 2013-02-07 21:39:24 CET
(In reply to comment #30)
> does 'killall mgaapplet && mgaapplet --testing' allow you to test Derek or does
> it need a flag to be set on the api before that works?

The --testing switch causes mgaapplet to retrieve a different file from the mageia server.
It fetches https://releases.mageia.org/api/a/testing-x86_64?product=Default&version=2&mgaonline_version=2.77.33  while without the testing switch it fetches https://releases.mageia.org/api/a/x86_64?product=Default&version=2&mgaonline_version=2.77.33

So yes. The --testing switch can be used to test upgrades to Mageia 3, but the file on the server would have to be updated first. I suppose Anne would have to do that.
Comment 32 Manuel Hiebel 2013-02-07 22:27:36 CET
cf: http://svnweb.mageia.org/web?view=revision&revision=1027 too
Comment 33 Marcello Anni 2013-02-25 16:56:42 CET
so, in conclusion i should install mageia 3 beta2 and upgrade using this urpmi comand:

killall mgaapplet && mgaapplet --testing

right? is it more useful for you the testing in this development phase or later?
Comment 34 Manuel Hiebel 2013-03-12 18:19:46 CET
mgaapplet-upgrade-helper --testing was working and needed repo was here after patching /usr/sbin/mgaapplet-upgrade-helper

(additionally  I changed the api to an updated localed copy of https://releases.mageia.org/api/a/testing-x86_64 )

Blocks: 3342 => (none)
Whiteboard: 3alpha3 3beta1 MGA2TOO MGA1too => 3alpha3 3beta1 MGA2TOO

Manuel Hiebel 2013-03-13 21:47:57 CET

Blocks: (none) => 8157

Comment 35 Derek Jennings 2013-03-16 22:47:07 CET
Created attachment 3622 [details]
subroutine to enable media

Here is a revised proposed patch to enable Nonfree and Tainted media if they were previously already enabled. This file contains a subroutine any::urpmi_enable_media() which can be reused by other patches to fix all the other cases when Nonfree media needs to be enabled such as Bug 8368 and Bug 8379

Attachment 3075 is obsolete: 0 => 1

Comment 36 Derek Jennings 2013-03-16 22:49:45 CET
Created attachment 3623 [details]
patch to enable media if they were previously enabled

This patch calls the subroutine in attachment 3622 [details] to enable nonfree and tainted media if they were previously enabled before the upgrade.
Comment 37 Anne Nicolas 2013-03-21 09:04:01 CET
Thierry, can you have a look on that patch and integrate it for coming beta 4 ?
Comment 38 Marcello Anni 2013-04-13 20:27:44 CEST
any news about this bug? i would like to make the upgrade trying to use as few hacks as possibile, in order to find the issues that encounters a normal user.. thanks
Comment 39 Anne Nicolas 2013-04-14 15:19:00 CEST
Thierry can you have a look on it so that we can include it in RC ?
Comment 40 AL13N 2013-05-02 21:02:25 CEST
Created attachment 3876 [details]
enable nonfree/tainted during upgrade

improved & cleaner patch against trunk, needs to be backported and tested.

Attachment 3622 is obsolete: 0 => 1
Attachment 3623 is obsolete: 0 => 1

Comment 41 AL13N 2013-05-02 21:04:20 CEST
@Derek: please backport and test this new patch to see if it still works for you.
William Kenney 2013-05-02 21:29:52 CEST

CC: (none) => wilcal.int

Comment 42 Dave Hodgins 2013-05-03 01:09:34 CEST
Created attachment 3878 [details]
Patch from comment 40 modified to work with current testing version

I had to modify the patch, to get it to install the 2nd chunk.

I either did something wrong, or it isn't working.

The upgrade is still running, but the tainted and nonfree repos
were not enabled, though they were before starting the upgrade.

I also still had to manually install the upgrade package, and delete the
/var/lib/rpm/__ files after the first transaction.

CC: (none) => davidwhodgins

Comment 43 Dave Hodgins 2013-05-03 05:58:29 CEST
Would probably be a good idea to add the debug repos, if they were
previously enabled.  That would make getting good gdb traces when
testing the upgrade easier.
Comment 44 AL13N 2013-05-03 07:57:56 CEST
the backport looked ok; i don't know why it doesn't work...
Comment 45 AL13N 2013-05-08 22:53:02 CEST
oh gods, i seem to have typed Tainted instead of Updates at the last part /o\ (as pointed out to me by coling...

@Dave, can you possibly change Tainted to Updates and retry? (also in your backported patch)?
Comment 46 AL13N 2013-05-08 22:58:57 CEST
on second thought, talking with coling, it'll indeed be better for updates and testing and the like to work as well.

i'm gonna redo the patch to check exact names, so that ALL enabled before, will be enabled AFTER, no matter which are selected...
Comment 47 Colin Guthrie 2013-05-08 23:00:19 CEST
FWIW Dave, you *should* (in theory) be able to let mgapplet guide you through everything if you just enable the updates_testing repo and make sure you have the latest mgaapplet package (from that repo). You need to leave it enabled such that it will be able to install mageia-prepare-upgrade package for you. You also have to set the TEST_DISTRO_UPGRADE=YES flag in /etc/sysconfig/mgaapplet too tho'.
Comment 48 AL13N 2013-05-08 23:35:24 CEST
Created attachment 3904 [details]
enable nonfree/tainted during upgrade

haven't had time to test or even typo-check this yet, but this is what i had in mind...

Attachment 3876 is obsolete: 0 => 1

Comment 49 AL13N 2013-05-10 00:41:04 CEST
Created attachment 3914 [details]
mgaapplet enable nonfree tainted during upgrade

new patch

Attachment 3904 is obsolete: 0 => 1

Comment 50 AL13N 2013-05-10 00:41:49 CEST
Created attachment 3915 [details]
mgaapplet enable nonfree tainted during upgrade backported for mga2

Attachment 3878 is obsolete: 0 => 1

Comment 51 Dave Hodgins 2013-05-10 03:31:13 CEST
Created attachment 3916 [details]
Working patch

Figured out the problem with the prior patch. The code to
actually add the repos was inside of the if ($add_pwp_auth)
statement.

This patch is working.
Comment 52 AL13N 2013-05-11 00:38:20 CEST
Created attachment 3935 [details]
mgaapplet enable nonfree tainted during upgrade for mga2

new version of the patch which enables ALL repositories which were enabled before. This one checks on relative url path, so the name will not matter.

Testing shows that this works.

don't know which of the versions is the one we should take though... this needs to be discussed.

Attachment 3915 is obsolete: 0 => 1

AL13N 2013-05-11 00:39:49 CEST

Attachment 3914 is obsolete: 0 => 1

Comment 53 Dave Hodgins 2013-05-11 03:42:45 CEST
My test using attachment 3395 [details] is not working.  Only Core repos are
enabled, though Tainted and Nonfree were enabled prior to starting
the upgrade.
Comment 54 AL13N 2013-05-11 08:11:04 CEST
:-( ... let's just use the simple working version instead.

@Thierry: can you take a look at the working patch and improve/commit it?

CC: (none) => thierry.vignaud

Comment 55 Colin Guthrie 2013-05-13 15:24:30 CEST
OK, I've committed this patch now (slightly tweaked to only run update_media() if we've actually changed something).

I've submitted the updated version to updates_testing, no cauldron release yet.

CC: (none) => mageia

Comment 56 Anne Nicolas 2013-05-14 12:05:12 CEST
As for Colin, I've just run a full upgrade test:
Mageia 2 x86-64 full KDE environment using nonfree and tainted repositories

All went well with all needed active repositories.

Fixed for me
Comment 57 Colin Guthrie 2013-05-14 12:55:10 CEST
OK, so just for clarity, the fix is in mga2's updated mgaonline, but not yet in a released version of cauldron/mga3's mgaonline (it's in svn)
Comment 58 Manuel Hiebel 2013-05-15 00:17:26 CEST
I didn't look whas was pushed on mga2 but https://bugs.mageia.org/attachment.cgi?id=3935&action=diff#mgaapplet-upgrade-helper.orig_sec3 and --nocheck seems not to exit according to the help of urpmi.update

(in mgaapplet log: Unknown option: nocheck )
Comment 59 Colin Guthrie 2013-05-15 09:40:39 CEST
@Manuel

This is what when into svn:
http://svnweb.mageia.org/soft/mgaonline/trunk/mgaapplet-upgrade-helper?r1=8220&r2=8219&pathrev=8220

and what was ultimately pushed to mga2.

Is that OK for you?
Comment 60 Manuel Hiebel 2013-05-16 01:17:11 CEST
sorry it was s/exit/exist in my previous post

Well ok, as it seems to be only cosmetic, it's fine for me of course.
Comment 61 Colin Guthrie 2013-05-16 17:56:03 CEST
@Manuel ahh I see the bit you were referring to now. Note that the --nocheck argument there is in the patch context, i.e. it's not a change in this patch just the surrounding code.

You are correct tho', that --nocheck is unrecognised by urpmi.update and it should ultimately be removed from mgaonline code. Having checked locally it seems not to get in the way so we don't need to worry about it too much.

Anyway, as we've had a few tests now, I think we can close this bug as fixed (as per bug #8157 I've marked this bug as blocking bug #9744 which will be used as a tracker to actually push the update).

Status: ASSIGNED => RESOLVED
Depends on: (none) => 9744
Resolution: (none) => FIXED


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