some patches for yast2 channels
Christoph Thiel
cthiel at suse.de
Sun Oct 8 14:34:08 PDT 2006
On Sun, 8 Oct 2006, Pascal Bleser wrote:
> >> Problem is: it modifies download URLs like e.g.
> >> http://packman.inode.at/suse/10.0 into
> >> http://packman.inode.at/suse/10.1
> >
> > No, it doesn't -- you haven't used the latests patch. That one will
> > just do something, if the latests digit is 1 and replace it with the
> > media no that the package is on (due to package metadata). So it won't
> > even break http://packman.inode.at/suse/10.1!
>
> Right, the previous patch did the following:
> if u[len(u)-1:].isdigit():
> and now it does
> if u[len(u)-1:] == '1':
>
> Wouldn't it be better to only do that funky stuff when the channel is
> marked as removable ?
>
> u = self._loader._baseurl.rstrip("/");
> if u[len(u)-1:] == '1':
> u = u.rstrip("1234567890")
> u += self._info.get("media")
>
> Why not
> u = u.rstrip("1")
> ?
Yeah, right ;) Let's change that.
> Hm, well.. still... so basically, it works when it's /10.1 at the end
> because media is always set to "1" on internet repositories so you're
> just r-stripping "1" and then appending "1" ?
Exactly -- but it will also work for installation sources that consist of
loopback-mounted CDs pointing to someurl/CD1 someurl/CD2 etc.
Regards,
Christoph
More information about the Smart
mailing list