[issue248] smart doesn't recognize reconfig.urpmi files

Michael Scherer at Labix Tracker tracker at labix.org
Tue Nov 14 09:44:42 PST 2006


Michael Scherer <misc at mandriva.org> added the comment:

Afaik, I just added the code to parse synthesis hdlist, and the rest of the 
code was already here. I have also added some patch, but nothing big.

A urpmi.reconfig file is a way to reconfigure urpmi url, when someone decide 
to change the mirror structure, for whatever reason ( it happened for plf and 
mandriva, for more logical support of arch, etc ).
Here is a sample file, found on 
ftp://ftp.free.fr/mirrors/plf.zarb.org/mandriva/free/2006.0/reconfig.urpmi  :

# this is an urpmi reconfiguration file
/2006.0 /2006.0/$ARCH

The first line is a "marker", to recognize the file type. It has to be here to 
be a valid file. 

The second line ( and the other, if any ) is just used for regexp based 
replacement :
search /2006.0,
replace by /2006.0/$ARCH

It is a perl based regexp :
if ($medium->{$k} =~ s/$r->[0]/$r->[1]/) {

Basically, it split the line, using space, and take the first word for search, 
the secund for replace.

You can add two flags L and N as a third word, but they were not used for the 
moment. Comment in the source code speak of mod_rewrite, so I guess L stand 
for Last, but I do not understand what N does. 

The $ARCH part is escaped and not important for this bug report, but you can 
see this mail for explanation ( 
http://archives.mandrivalinux.com/cooker/2005-02/msg02853.php ), as it will 
also cause problem in case of automated rewrite ( and is likely to require 
more work to have a complete support )

The code for this can be found in urpm.pm, function reconfig_urpmi. The mail 
announcing the change for plf can be found on 
https://www.zarb.org/pipermail/plf-discuss/2006-April/003911.html, you can see 
a test run and the effect on url.

I fear I cannot devote much time on this issue for the moment, even if the 
feature is not complex to add by itself. 

Real problems would come from keyword expansion, and how to use this as a 
general method for every source. 

Given the fact that we used this feature in the past one or two times, it 
would surely benefit to every type of repository to be able to do the same

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue248>
_______________________________________



More information about the Smart mailing list