Bug 19591

Summary: urpmq: When querying multiple repos, output information sequentially instead of waiting for all repos to be synced
Product: Mageia Reporter: Rémi Verschelde <rverschelde>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Low CC: thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: urpmi-8.104-1.mga6 CVE:
Status comment:

Description Rémi Verschelde 2016-10-15 17:10:14 CEST
## My setup

Cauldron with two sets of official repos
- One from a fast German mirror that tends to be a few hours being tier1 mirrors
- One from distrib-coffee, slow but up to date

This way I can download most packages fast (as the first mirror takes precedence), but I also have access to the latest cauldron builds as soon as they reach d-c.


## The problem

When using `urpmq -i $pkgname` to query the info for a given package, it will download the compressed media info from both mirrors before output the information twice, as in:

------------

$ urpmq -i fs-uae
    http://ftp.uni-erlangen.de/mirrors/Mageia/distrib/cauldron/x86_64/media/core/release/media_info/20161015-075113-info.xml.lzma
    http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/media_info/20161015-143328-info.xml.lzma                                              
Name        : fs-uae
Version     : 2.6.2
Release     : 2.mga6
Group       : Emulators
Size        : 13986737                     Architecture: x86_64
Source RPM  : fs-uae-2.6.2-2.mga6.src.rpm
URL         : http://fs-uae.net
Summary     : Amiga emulator with on-screen GUI and online play support
Description :
FS-UAE is an Amiga emulator for Windows, Linux and Mac OS X
based on UAE/WinUAE, with a focus on emulating games.
[...]

Name        : fs-uae
Version     : 2.6.2
Release     : 2.mga6
Group       : Emulators
Size        : 13986737                     Architecture: x86_64
Source RPM  : fs-uae-2.6.2-2.mga6.src.rpm
URL         : http://fs-uae.net
Summary     : Amiga emulator with on-screen GUI and online play support
Description :
FS-UAE is an Amiga emulator for Windows, Linux and Mac OS X
based on UAE/WinUAE, with a focus on emulating games.
[...]

------------

As d-c is slow, it takes a while before I get the information I wanted. Also, it doesn't appear clearly which output comes from which mirror, so in cases where the output differs, it can be confusing.


## A possible solution

Make urpmq output results sequentially, so that you can see the results of the first mirror as soon as the file is downloaded, and it would then go on to the second mirror (and in a use case such as mine, I could just Ctrl-C it if I don't care about the d-c result).

urpmf already seems to work this way:

-----------
$ urpmf --license fs-uae
fs-uae-launcher:GPLv2+
fs-uae-arcade:GPLv2+
fs-uae:GPLv2+
    http://ftp.uni-erlangen.de/mirrors/Mageia/distrib/cauldron/x86_64/media/debug/core/release/media_info/20161015-074904-info.xml.lzma
fs-uae-debuginfo:GPLv2+
    http://ftp.uni-erlangen.de/mirrors/Mageia/distrib/cauldron/x86_64/media/core/updates/media_info/20150703-235257-info.xml.lzma
[...]
    http://ftp.uni-erlangen.de/mirrors/Mageia/distrib/cauldron/x86_64/media/debug/tainted/backports/media_info/20150605-201926-info.xml.lzma
    http://ftp.uni-erlangen.de/mirrors/Mageia/distrib/cauldron/i586/media/core/release/media_info/20161015-075346-info.xml.lzma
fs-uae-arcade:GPLv2+
fs-uae-launcher:GPLv2+
fs-uae:GPLv2+
    http://ftp.uni-erlangen.de/mirrors/Mageia/distrib/cauldron/i586/media/core/updates/media_info/20150703-235256-info.xml.lzma
[...]
    http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/i586/media/core/release/media_info/20161015-142659-info.xml.lzma
fs-uae-arcade:GPLv2+
fs-uae-launcher:GPLv2+
fs-uae:GPLv2+
-----------
Rémi Verschelde 2016-10-15 17:17:45 CEST

Priority: Normal => Low

Comment 1 Thierry Vignaud 2020-03-02 16:06:10 CET
In such case, just define your own query wrapper like I do:

$ cat ~/bin/urpmf-fast 
#!/bin/sh
exec urpmf --media Core\ Release $@

Just name the medium or media you're interested in.
Here Core\ Release is my local mirror

Resolution: (none) => WONTFIX
Status: NEW => RESOLVED
CC: (none) => thierry.vignaud