Comment 5 for bug 1702059

Revision history for this message
Benjamin (popibrossard) wrote :

Hello,

Personally, I modified the /usr/bin/debmirror script:

sed -i 's#$remoteroot/#$remoteroot#g' /usr/bin/debmirror
sed -i 's#${remoteroot}/#${remoteroot}#g' /usr/bin/debmirror
sed -i '/^$remoteroot =~.*/i $remoteroot =~ s|/?$|/| ;' /usr/bin/debmirror

For some explanation, if you want to understand, I'm just including the final '/' inside the $remoteroot variable, and adding it automatically if it wasn't at the end of the string ( "ubuntu" became "ubuntu/"). If the variable is empty, the line 793 "$remoteroot =~ s%^[:/]%% unless downloads_via_file();" will remove my extra "/" ("" => "/" => "").
I don't know if it's the best way to do this in perl, but it does the work. In case it can help / save time to somebody.
I'm not proposing a pull request because I don't know how package management works and don't want to do something wrong.