Op 18-jan-2007, om 9:02 heeft Marc Haber het volgende geschreven:
I have rewritten the apt rule as a script and implemented a small
/etc/apt/sources.list parser.

Nice work!

If you want to, give it a try.

Your (bash|sed)-fu is greater than mine. Did found a small thing, though. My /var/lib/apt/lists files are (only listing relevant parts for the error I found):

ftp.unnet.nl_debian_dists_etch_main_binary-amd64_Packages
ftp.unnet.nl_debian_dists_etch_main_binary-amd64_Packages.IndexDiff
ftp.unnet.nl_debian_dists_etch_Release
ftp.unnet.nl_debian_dists_etch_Release.gpg


And the generated lines are:


/var/lib/apt/lists/ftp.unnet.nl_debian__dists_etch_main_binary- amd64_Packages(\.IndexDiff)?$ VarFile /var/lib/apt/lists/ftp.unnet.nl_debian__dists_etch_Release(\.gpg)?$ VarFile


Note in particular the double underscore in front of "dists".

My sources.list:


deb http://ftp.unnet.nl/debian/ etch main


When enabling DEBUG, I found the problem:

HOSTPATH _debian_

So I changed line 11 of your script to:

HOSTPATH="$(echo $uri | sed 's|.*//[^/[:space:]]\+/\?||;s|/|_|g;s|^\(. \+\)$|_\1|' | sed 's|_$||')"

Which fixes the problem.

Hope this helps.

--
Met vriendelijke groet,
Tim Stoop
Cidev v.o.f.
http://www.cidev.nl
KvK nummer: 14072991




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to