Mageia Bugzilla – Attachment 3935 Details for
Bug 6061
mgaapplet-upgrade-helper removes nonfree and tainted repo (and so radeon-firmware) when upgrading to next Mageia version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
mgaapplet enable nonfree tainted during upgrade for mga2
mgaaplet-upgrade2.patch (text/plain), 1.27 KB, created by
AL13N
on 2013-05-11 00:38:20 CEST
(
hide
)
Description:
mgaapplet enable nonfree tainted during upgrade for mga2
Filename:
MIME Type:
Creator:
AL13N
Created:
2013-05-11 00:38:20 CEST
Size:
1.27 KB
patch
obsolete
>--- mgaapplet-upgrade-helper.orig 2012-04-22 01:55:46.000000000 +0200 >+++ mgaapplet-upgrade-helper 2013-05-10 04:44:42.072000615 +0200 >@@ -269,6 +269,12 @@ > ); > exit(1); > } >+ >+ my @repos = (); >+ for my $media (@{$urpm->{media}}) { >+ push @repos, $media->{mediacfg}->[1] if (!defined($media->{ignore})); >+ } >+ > undef $urpmi_lock; > > touch(get_stale_upgrade_filename()); >@@ -313,6 +319,21 @@ > exit(2); > }; > >+ my $urpm = Rpmdrake::open_db::fast_open_urpmi_db(); >+ my @r = (); >+ for my $repos (@repos) { >+ for my $m (@{$urpm->{media}}) { >+ if ($m->{mediacfg}->[1] eq $repos && defined $m->{ignore}) { >+ push @r, "$m->{name}"; >+ log::explanations("enabling '". $m->{name} ."', as it was there before upgrade"); >+ } >+ } >+ } >+ if (scalar(@r) > 0) { >+ enable_media(@r); >+ update_media(); >+ } >+ > if ($add_pwp_auth) { > log::explanations("adding restricted (powerpack) media"); > >@@ -367,3 +388,7 @@ > sub update_media() { > run_program::run('urpmi.update', if_($root, '--urpmi-root', $root), '-a', '--nocheck'); > } >+ >+sub enable_media { >+ run_program::run('urpmi.update', if_($root, '--urpmi-root', $root), '--no-ignore', @_); >+}
--- mgaapplet-upgrade-helper.orig 2012-04-22 01:55:46.000000000 +0200 +++ mgaapplet-upgrade-helper 2013-05-10 04:44:42.072000615 +0200 @@ -269,6 +269,12 @@ ); exit(1); } + + my @repos = (); + for my $media (@{$urpm->{media}}) { + push @repos, $media->{mediacfg}->[1] if (!defined($media->{ignore})); + } + undef $urpmi_lock; touch(get_stale_upgrade_filename()); @@ -313,6 +319,21 @@ exit(2); }; + my $urpm = Rpmdrake::open_db::fast_open_urpmi_db(); + my @r = (); + for my $repos (@repos) { + for my $m (@{$urpm->{media}}) { + if ($m->{mediacfg}->[1] eq $repos && defined $m->{ignore}) { + push @r, "$m->{name}"; + log::explanations("enabling '". $m->{name} ."', as it was there before upgrade"); + } + } + } + if (scalar(@r) > 0) { + enable_media(@r); + update_media(); + } + if ($add_pwp_auth) { log::explanations("adding restricted (powerpack) media"); @@ -367,3 +388,7 @@ sub update_media() { run_program::run('urpmi.update', if_($root, '--urpmi-root', $root), '-a', '--nocheck'); } + +sub enable_media { + run_program::run('urpmi.update', if_($root, '--urpmi-root', $root), '--no-ignore', @_); +}
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 6061
:
3075
|
3622
|
3623
|
3876
|
3878
|
3904
|
3914
|
3915
|
3916
| 3935