Bug 1024 - media.cfg is bogus regarding update media (thus exposing *urpmi --auto-s --update defaulting to all media when there're no update media, including cdrom in chroot)
Summary: media.cfg is bogus regarding update media (thus exposing *urpmi --auto-s --up...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Release (media or process) (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: release_blocker critical
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks: 56 2317
  Show dependency treegraph
 
Reported: 2011-04-28 11:59 CEST by AL13N
Modified: 2014-05-08 18:04 CEST (History)
6 users (show)

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


Attachments
hal error update (46.33 KB, image/png)
2011-04-28 12:00 CEST, AL13N
Details
report.bug.gz (152.70 KB, application/octet-stream)
2011-04-28 14:58 CEST, AL13N
Details
complete /root/drakx dir (413.03 KB, application/octet-stream)
2011-04-28 15:40 CEST, AL13N
Details
urpmi.cfg (4.93 KB, text/plain)
2011-04-28 20:12 CEST, AL13N
Details
urpmi.txt (from --auto-update) (642 bytes, text/plain)
2011-04-28 20:22 CEST, AL13N
Details
fix defaulting to select all media when using --update and there's no update media (1.43 KB, patch)
2011-05-04 18:02 CEST, Thierry Vignaud
Details | Diff

Description AL13N 2011-04-28 11:59:50 CEST
Description of problem:

upgrading from mdv 2010.1 PWP to mageia 1 beta 2 (see screenshot)
Comment 1 AL13N 2011-04-28 12:00:53 CEST
Created attachment 310 [details]
hal error update
AL13N 2011-04-28 12:01:12 CEST

Blocks: (none) => 56

Comment 2 AL13N 2011-04-28 12:16:16 CEST
it says "hal-thingie (hald) is not active or unready" or similar
Comment 3 Thierry Vignaud 2011-04-28 14:28:13 CEST
Can you attach the report*gz from your /root/drakx/?

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 4 AL13N 2011-04-28 14:58:49 CEST
Created attachment 313 [details]
report.bug.gz
Comment 5 Thierry Vignaud 2011-04-28 15:36:59 CEST
Can you attach a tarball of the other files in /root/drakx too?
Comment 6 AL13N 2011-04-28 15:40:43 CEST
Created attachment 315 [details]
complete /root/drakx dir
Comment 7 Thierry Vignaud 2011-04-28 15:54:07 CEST
OK, what happens is that, in upgrade step, gurpmi is run in the chrooted installed environment.
("gurpmi2 --auto-select --update" with root = /mnt)

gurpm computes the updates to install, then aborts before the first transaction  due to HAL not running the chroot with the following message:
"HAL daemon (hald) is not running or not ready"
(from _try_mounting_cdrom_using_hal() from /usr/lib/perl5/vendor_perl/5.12.3/urpm/cdrom.pm)

Can you attach your /etc/urpmi/urpmi.cfg?

Summary: in upgrade step, HAL errors out => gurpmi aborts in upgrade step due to HAL not running the chroot
Source RPM: (none) => urpmi

Comment 8 Thierry Vignaud 2011-04-28 15:56:59 CEST
Also could you attach the output file "urpmi.txt" resulting from the following command: "urpmi --auto-select --update 2>&1|tee urpmi.txt".
Just say no when asking confirmation for installing.
Comment 9 AL13N 2011-04-28 20:12:01 CEST
Created attachment 316 [details]
urpmi.cfg
Comment 10 AL13N 2011-04-28 20:12:55 CEST
the urpmi.txt file is completely empty
Comment 11 AL13N 2011-04-28 20:13:20 CEST
perhaps i need to do --auto-update instead?
Comment 12 AL13N 2011-04-28 20:22:09 CEST
Created attachment 317 [details]
urpmi.txt (from --auto-update)
Comment 13 Anne Nicolas 2011-05-04 16:53:22 CEST
ping ? any update on that bug ?

CC: (none) => ennael1

Comment 14 Thierry Vignaud 2011-05-04 17:34:47 CEST
The only thing I see is that gurpmi is asked to look only at urpmi update media but there're none in this urpmi.cfg which would hint all update media have been manually untagged
Comment 15 Thierry Vignaud 2011-05-04 17:53:52 CEST
Actually it looks like we've a regression or a very old bug (I'ven't tested on a stable mdv) (but I think it's the later):
urpmi --auto-select --update will default to all media when there're no media tagged as update.

So there're two bugs here:
- update media being not tagged as such
- urpmi falling back to all media if there's no update media at all
Comment 16 Thierry Vignaud 2011-05-04 18:02:46 CEST
Created attachment 349 [details]
fix defaulting to select all media when using --update and there's no update media

I've only tested with urpmi.
Now urpmi doesn't default anymore to all media when there're no update media when using --update.
Comment 17 Thierry Vignaud 2011-05-04 18:09:27 CEST
I can reproduce the "urpmi.addmedia --distrib <URL>" not tagging update media as update in an old mga chroot
$distribconf->getvalue($media, 'updates_for') consistently not returns the right value
Thierry Vignaud 2011-05-04 18:10:29 CEST

CC: (none) => dmorganec

Thierry Vignaud 2011-05-04 18:14:52 CEST

CC: (none) => misc
Component: Installation => Release (media, process)

Thierry Vignaud 2011-05-04 18:15:21 CEST

CC: (none) => mageia

Thierry Vignaud 2011-05-04 18:15:46 CEST

CC: (none) => boklm

Comment 18 Thierry Vignaud 2011-05-04 18:16:04 CEST
And the winner is the One who mixed "updates_for" with "update_for" in media.cfg.
Note the missing "S".
media.cfg is just bogus on our mirrors...

CC: (none) => pterjan

Thierry Vignaud 2011-05-04 18:27:42 CEST

Priority: Normal => release_blocker
Summary: gurpmi aborts in upgrade step due to HAL not running the chroot => media.cfg is bogus regarding update media (thus exposing *urpmi --auto-s --update defaulting to all media when there're no update media, including cdrom in chroot)
Severity: normal => critical

Comment 19 Michael Scherer 2011-05-04 19:05:53 CEST
Fixed in rev 1575 by boklm, is it ok ?
Comment 20 Nicolas Vigier 2011-05-04 19:09:44 CEST
Not yet but soon. I'm updating puppet config to copy the files on mirror.
Comment 21 AL13N 2011-05-04 21:07:05 CEST
awesome
Comment 22 Anne Nicolas 2011-05-05 15:48:38 CEST
http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/i586/media/media_info/media.cfg

as an example. Closing then

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

Thierry Vignaud 2013-03-16 06:06:38 CET

Blocks: (none) => 2317

Nicolas Vigier 2014-05-08 18:04:43 CEST

CC: boklm => (none)


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