Bug 201 - show error on invalid media.cfg
Summary: show error on invalid media.cfg
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Low enhancement
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-26 18:22 CET by AL13N
Modified: 2017-12-02 13:11 CET (History)
8 users (show)

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


Attachments
the exact perl error (131 bytes, text/plain)
2011-02-27 21:55 CET, AL13N
Details
urpmi --debug ssh 2> urpmi_output.log (6.39 KB, text/plain)
2011-02-27 21:57 CET, AL13N
Details
duplicated media.cfg (15.76 KB, text/plain)
2011-03-06 11:47 CET, AL13N
Details
patch for MDV::Distribconf (667 bytes, patch)
2011-03-06 11:48 CET, AL13N
Details | Diff
new patch for MDV::Distribconf (733 bytes, patch)
2011-03-31 21:34 CEST, AL13N
Details | Diff
/etc/urpmi/mediacfg.d/Official-1-x86_64/media.cfg (18.84 KB, text/plain)
2012-01-28 00:21 CET, Morgan Leijström
Details

Description AL13N 2011-02-26 18:22:31 CET
Description of problem:

immediately after install of alpha iso, no updates yet. i use urpmi.addmedia in console, and there were alot of errors.

after updating, i used XFdrake to save for nvidia driver, and the save step has alot of perl errors too.

(argument "2-n2" is not numeric) and that sort of warnings

Reproducible: 

Steps to Reproduce:
Comment 1 AL13N 2011-02-26 18:42:32 CET
it was "2\n2"
Comment 2 Rémy CLOUARD (shikamaru) 2011-02-27 10:33:04 CET
could you paste the complete error message please ?

also, running urpmi with the --debug switch would probably help urpmi maintainers to understand whatâs going on

Keywords: (none) => NEEDINFO
CC: (none) => shikamaru

Comment 3 AL13N 2011-02-27 21:55:13 CET
Created attachment 62 [details]
the exact perl error
Comment 4 AL13N 2011-02-27 21:57:37 CET
Created attachment 63 [details]
urpmi --debug ssh 2> urpmi_output.log
Thierry Vignaud 2011-03-03 16:44:35 CET

CC: (none) => thierry.vignaud
Component: Installation => RPM Packages
Source RPM: (none) => urpmi

Comment 5 Ahmad Samir 2011-03-04 21:23:33 CET
The log in comment#4 says:
Argument "2\n2" isn't numeric in numeric ge (>=) at /usr/lib/perl5/vendor_perl/5.12.2/MDV/Distribconf.pm line 532, <$URLS> line 1.

Cauldron is on perl-5.12.3 now; does this issue still happen with latest cauldron?

Component: RPM Packages => Installation

Comment 6 Thierry Vignaud 2011-03-04 22:13:26 CET
perl version is irrelevant:
$ rpm -qpl /mageia/media/core/release/perl-MDV-Distribconf-4.02-5.mga1.noarch.rpm | head -2
/usr/lib/perl5/vendor_perl/5.12.2/MDV/Distribconf
/usr/lib/perl5/vendor_perl/5.12.2/MDV/Distribconf.pm
Comment 7 Ahmad Samir 2011-03-05 00:32:55 CET
Right. However -6.mga1 is available in the repos since today.
Comment 8 AL13N 2011-03-05 02:51:37 CET
which doesn't solve the problem
Comment 9 AL13N 2011-03-06 11:46:38 CET
i traced the problem to 2 things:

1. the media.cfg file i have seems to be doubled for some reason? how did this happen?
2. the default mediacfg version should be '4.02', but somehow media.cfg files are shipped with version 2 ? is that correct?

possibly 3 fixes:
 - find out why media.cfg is doubled and fix
 - check if version=2 is correct? shouldn't it be 4?
 - if it _IS_ duplicated, get only the first or last one.

attached duplicated media.cfg and patch for fix 3
Comment 10 AL13N 2011-03-06 11:47:35 CET
Created attachment 92 [details]
duplicated media.cfg
Comment 11 AL13N 2011-03-06 11:48:42 CET
Created attachment 93 [details]
patch for MDV::Distribconf

i took the first value, but maybe it should be the last, i don't know.
Thierry Vignaud 2011-03-09 09:07:36 CET

Component: Installation => RPM Packages

Comment 12 AL13N 2011-03-18 00:34:18 CET
still present on mageia 1 alpha 2 during upgrade, so i'm blocking the upgrade tracker

Blocks: (none) => 56

Thierry Vignaud 2011-03-18 01:18:51 CET

Assignee: bugsquad => dmorganec
Source RPM: urpmi => perl-MDV-Distribconf

Comment 13 AL13N 2011-03-29 22:57:48 CEST
can someone apply patch on /soft ?
Ahmad Samir 2011-03-29 23:47:44 CEST

CC: (none) => mageia

Comment 14 D Morgan 2011-03-30 00:31:23 CEST
we need to import MDV-DistribConf in soft before :).
Comment 15 AL13N 2011-03-30 20:08:52 CEST
well, then i'll just patch it in the package
Comment 16 D Morgan 2011-03-30 20:20:26 CEST
is it a blocker bug ? does it break  features ?
Comment 17 D Morgan 2011-03-30 20:20:34 CEST
is it a blocker bug ? does it break  features ?
Comment 18 AL13N 2011-03-30 20:33:17 CEST
it gives ugly messages with urpmi (but you don't have to ask twice :-) )

why do you ask?

it's a small patch that doens't do anything major at all.
Comment 19 Anssi Hannula 2011-03-31 19:31:18 CEST
I guess it is better to give errors, since duplicated media.cfg is certainly not valid ?

CC: (none) => anssi.hannula

Comment 20 AL13N 2011-03-31 21:34:06 CEST
Created attachment 177 [details]
new patch for MDV::Distribconf

Ok, after some more investigations it looks like /etc/urpmi/mediacfg.d/Cauldron-1-x86_64/media.cfg (for a reason which is likely my own fault) has duplicated content, or in particular dual [media_info] sections with each a mediacfg_version=2 section.

This new patch disables the perl warnings in such a case and displays a warning message instead, but only 1 time, so at least urpmq is functional.
Michael Scherer 2011-04-28 11:12:07 CEST

Priority: Normal => Low
CC: (none) => misc
Blocks: 56 => (none)
Summary: urpmi perl warnings => show error on invalid media.cfg
Severity: minor => enhancement

Comment 21 Marja Van Waes 2011-09-25 20:15:47 CEST
@ AL13N

Is this solved in current cauldron?

CC: (none) => m.van.waes

Comment 22 AL13N 2011-09-26 08:43:01 CEST
afaik, it isn't. no response from maintainers about this patch, if it's wanted or not.
Thierry Vignaud 2011-09-26 09:49:07 CEST

Keywords: (none) => PATCH

Comment 23 Manuel Hiebel 2011-10-25 12:02:30 CEST
Jérôme, something for you ?

CC: (none) => jquelin

Comment 24 Jerome Quelin 2011-10-25 12:58:04 CEST
no, this is about urpmi internals - so it's more for thierry. that would be me if there was a packaging problem.
Comment 25 Manuel Hiebel 2011-10-25 13:10:06 CEST
Ah ok sorry.

Keywords: NEEDINFO => (none)
CC: jquelin => (none)

Comment 26 Morgan Leijström 2012-01-28 00:21:26 CET
Created attachment 1446 [details]
/etc/urpmi/mediacfg.d/Official-1-x86_64/media.cfg
Comment 27 Morgan Leijström 2012-01-28 00:22:10 CET
I have the same problem, i.e:

# urpmi --auto-update
Argument "2\n2" isn't numeric in numeric lt (<) at /usr/lib/perl5/vendor_perl/5.12.3/MDV/Distribconf.pm line 265.
Argument "2\n2" isn't numeric in numeric ge (>=) at /usr/lib/perl5/vendor_perl/5.12.3/MDV/Distribconf.pm line 532, <$URLS> line 1.
Argument "2\n2" isn't numeric in numeric ge (>=) at /usr/lib/perl5/vendor_perl/5.12.3/MDV/Distribconf.pm line 532, <$URLS> line 1.
Argument "2\n2" isn't numeric in numeric ge (>=) at /usr/lib/perl5/vendor_perl/5.12.3/MDV/Distribconf.pm line 532, <$URLS> line 1.
etc, etc

same if i call drakrpm

The only unusual thing i remember i have done is i once remove all media and then added them again (this time pointing to my urpmi-proxy machine)

This is on mga1, so it is probably on both mga1 and cauldron according to above, but i refrain from adding a separate bug for now.

I attached my /etc/urpmi/mediacfg.d/Official-1-x86_64/media.cfg

CC: (none) => fri

Comment 28 AL13N 2012-01-28 08:19:51 CET
As you can see in the attachment. there are 2 [media_info] sections.

This is due to having 2 sources listed in urpmi-proxy. atm this is still unsupported. The fallback mechanism isn't good yet.

So people using urpmi-proxy, please read https://wiki.mageia.org/en/Urpmi-proxy and not configure 2 sources atm.

The patch I made in comment 20 would show a better warning, but it's still not applied...

So Morgan, for now you'll have to just use only 1 source, until i find some time to implement dual source fallback.

in the mean time, i'd like it if this patch would be applied...
Comment 29 Morgan Leijström 2012-01-29 10:02:37 CET
Thanks AL13N
I apparently forgot to change sources on this client while i removed them from urpmi-proxy config.  Removed all, added all i wanted made it OK :)

Yes better warning will be nice.
Comment 30 Morgan Leijström 2012-03-06 11:51:28 CET
Bump.
Would be nice to get the existing patch in before next beta.
Comment 31 Marja Van Waes 2012-05-26 13:05:33 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Manuel Hiebel 2012-06-12 21:44:38 CEST

Keywords: NEEDINFO => (none)

Comment 32 AL13N 2012-10-01 23:06:22 CEST
@thierry
@dmorgan

can this patch be applied?
D Morgan 2013-09-17 23:56:04 CEST

Assignee: dmorganec => thierry.vignaud

Comment 33 Thierry Vignaud 2014-11-23 20:49:00 CET
No.
urpmi-proxy should be fixed instead.

CC: (none) => alien
Source RPM: perl-MDV-Distribconf => perl-MDV-Distribconf, urpmi-proxy

Thierry Vignaud 2015-02-11 09:04:13 CET

Attachment 93 is obsolete: 0 => 1

Comment 34 Thierry Vignaud 2015-02-11 09:06:53 CET
This is not a perl-MDV-Distribconf issue

Source RPM: perl-MDV-Distribconf, urpmi-proxy => urpmi-proxy

Thierry Vignaud 2015-02-11 09:07:01 CET

Attachment 177 is obsolete: 0 => 1

Thierry Vignaud 2015-02-11 09:07:11 CET

Keywords: PATCH => (none)

Comment 35 Marja Van Waes 2017-12-02 13:11:11 CET
(In reply to Thierry Vignaud from comment #34)
> This is not a perl-MDV-Distribconf issue

And you're not the urpmi-proxy maintainer, so reassigning ;-)

Assignee: thierry.vignaud => mageiatools


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