Bug 33742 - drakrpm-editmedia looks for a Mageia 10 mirror instead of for a Cauldron mirror, so cannot find one.
Summary: drakrpm-editmedia looks for a Mageia 10 mirror instead of for a Cauldron mirr...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-11 06:36 CET by Ben McMonagle
Modified: 2024-12-05 18:17 CET (History)
7 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
patch for cauldron mirrors. (824 bytes, patch)
2024-12-05 17:00 CET, Aurelian R
Details | Diff

Description Ben McMonagle 2024-11-11 06:36:24 CET
Description of problem:attempting to add a mirror via drak-editmedia results in a popup: 
I cant find a suitable mirror.
There can be several reasons for this problem.......

If I use urpmi.addmedia with a specific mirror, I can add the specific mirror. 


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


How reproducible: always


Steps to Reproduce:
1.attempt to add a mirror via drakrpm-editmedia
2.
3.
Comment 1 Ben McMonagle 2024-11-11 06:37:40 CET
that should have been:

gurpmi.addmedia
Comment 2 Marja Van Waes 2024-11-13 20:00:55 CET Comment hidden (obsolete)

Assignee: bugsquad => sysadmin-bugs
Component: RPM Packages => Other
CC: (none) => marja11
Version: Cauldron => trunk
Product: Mageia => Websites
Summary: drakrpm-editmedia complains that it cannot find any suitable mirror when trying to add a mirror. => The mirrorlist api uses wrong addresses (was: drakrpm-editmedia complains that it cannot find any suitable mirror when trying to add a mirror.)

Comment 3 Marja Van Waes 2024-11-13 20:35:58 CET Comment hidden (obsolete)

CC: (none) => mageiatools

Comment 4 Marja Van Waes 2024-11-14 13:28:07 CET Comment hidden (obsolete)

CC: (none) => manuel.mageia
Summary: The mirrorlist api uses wrong addresses (was: drakrpm-editmedia complains that it cannot find any suitable mirror when trying to add a mirror.) => drakrpm-editmedia and the mirrorlist api use different web addresses (with mageia.10 versus mageia10)

Comment 5 Dan Fandrich 2024-11-14 19:12:35 CET
Curiously, both https://mirrors.mageia.org/api/mageia.9.x86_64.list and https://mirrors.mageia.org/api/mageia9.x86_64.list provide a list of mirrors. The first one (with the dot) appears correct and provides a list of 142 mirrors of mga9 for x86_64. The second one (WITHOUT the dot) also provides a list of mirrors, but there are 1104 of them and a mixture of mga9 and cauldron and for all four architectures.

IMHO the output without the dot is just plain wrong and the API should be returning 404 in that case. Consumers of the API SHOULD BE using the version WITH the dot. Looking at my old urpmi.cfg files since mga6 show them all using URLs with the dot.

The issue in comment #2 is that mga10 hasn't been released yet so there are no mirrors for it.

But, I think this dot/non-dot question is a red herring. I still don't see any indication that's the issue at hand in the original report.

Summary: drakrpm-editmedia and the mirrorlist api use different web addresses (with mageia.10 versus mageia10) => drakrpm-editmedia complains that it cannot find any suitable mirror when trying to add a mirror.
Assignee: sysadmin-bugs => bugsquad
CC: (none) => dan
Version: trunk => 9
Component: Other => RPM Packages
Product: Websites => Mageia
Target Milestone: --- => Mageia 9

Comment 6 Marja Van Waes 2024-11-14 21:07:09 CET
(In reply to Dan Fandrich from comment #5)

> 
> The issue in comment #2 is that mga10 hasn't been released yet so there are
> no mirrors for it.
> 


Thanks, Dan.

I had assumed that Ben had hit this issue in Mageia 9, because he is a QA tester, but looking at the first bugs mail for this report, he had filed it against Cauldron.

So the problem is, that rpmdrake looks for Mageia 10 mirrors instead of for  Cauldron mirrors.

I have no idea since when this issue occurs, though, I always use my own mirror for my cauldrons.

Assigning to the Mageia Tools maintainers.

Assignee: bugsquad => mageiatools
Summary: drakrpm-editmedia complains that it cannot find any suitable mirror when trying to add a mirror. => drakrpm-editmedia looks for a Mageia 10 mirror instead of for a Cauldron mirror, so cannot find one.
Version: 9 => Cauldron
Target Milestone: Mageia 9 => ---

Comment 7 Marja Van Waes 2024-11-14 21:14:17 CET
And here the error again, because I just obsoleted my comments that weren't helpful:


URPMI_ADDMEDIA_REASON reason=update
getting mirror list from https://mirrors.mageia.org/api/mageia.10.x86_64.list?reason=update
retrieved   mageia.10.x86_64.list?reason=update
found geolocalisation BE 50.83 4.33 from timezone Europe/Amsterdam
Fatal: Could not find a mirror from mirrorlist $MIRRORLIST
Comment 8 Dan Fandrich 2024-11-14 22:31:52 CET
For the record, https://mirrors.mageia.org/api/mageia.cauldron.x86_64.list does seem to produce a valid list.
Comment 9 Martin Whitaker 2024-11-15 01:15:11 CET
See also the thread starting with https://ml.mageia.org/l/arc/qa-discuss/2024-08/msg00008.html.

IIRC, the API usually gets updated to add the new release number when we get to the beta release stage (to allow QA to start testing upgrades). Before that, if you want to use cauldron, you need to ask for cauldron. And I suspect rpmdrake was never really designed to work for cauldron.

CC: (none) => mageia

Comment 10 Clovis Magnusson 2024-12-05 03:41:21 CET Comment hidden (spam)

CC: (none) => alondramcleondrian

Comment 11 Aurelian R 2024-12-05 17:00:27 CET
Created attachment 14799 [details]
patch for cauldron mirrors.

The simplest workaround is to force using "cauldron" as the product version:
URPMI_ADDMEDIA_PRODUCT_VERSION=cauldron drakrpm-editmedia;

The second workaround is to modify the Perl file /usr/share/perl5/vendor_perl/urpm/mirrors.pm with:

sed "/\$product_version =/{s|^|#|;p;s|#||;s|\$product_id->{version};|((\$product_id->{branch} =~ \/devel\/i) ? 'cauldron' : \$product_id->{version});|}" -i /usr/share/perl5/vendor_perl/urpm/mirrors.pm

Attached is a patch for the urpmi source file that is slightly different than the above "sed" command, as I'm not sure if an exact match or a more generic match should be used in this case.

CC: (none) => arusanu

Dave Hodgins 2024-12-05 18:17:43 CET

CC: alondramcleondrian => davidwhodgins


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