On Mon, Feb 02, 2009 at 07:04:04PM +0100, Marc Espie wrote: > > > > I'm pretty sure it's something like this. > > > > > > bingo. ftp.freenet.de precede filenames in NLIST output with ./ > Sigh... why can't they implement nlist correctly.
It's a german mirror driven by a german mass provider. What did you expect? > > The patch below seems to fix it, but it looks ugly, and my perl > > knowledge is really bad. [...] > This is slightly incorrect, it shouldn't even try to strip the > filename before looking for a nnn error code. I'm from germany. What did you expect? > Slightly more compact and better version below: Works for me[tm] Ciao, Kili > Index: PackageRepository.pm > =================================================================== > RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm,v > retrieving revision 1.61 > diff -u -p -r1.61 PackageRepository.pm > --- PackageRepository.pm 11 Dec 2008 15:43:19 -0000 1.61 > +++ PackageRepository.pm 2 Feb 2009 18:01:30 -0000 > @@ -757,7 +757,7 @@ sub _list > while(<$fh>) { > chomp; > next if m/^\d\d\d\s+\S/; > - next unless m/(\S+)\.tgz\s*$/; > + next unless m/^(?:\.\/)?(\S+)\.tgz\s*$/; > push(@$l, $1); > } > close($fh);