I just encountered the same problem here. In my setup, apt-file is
configured for using "curl".

Fetching the contents file is done in two steps. Before it downloads the
complete file, it tries to retrieve the HTTP-header only. How this is
done is defined through the apt-file configuration file located at
"/etc/apt/apt-file.conf". On my setup the command worked out to be:

  curl -L -I "http://archive.ubuntu.com/ubuntu/dists/gutsy-
proposed/Contents-i386.gz"

This fails as my computer is located behind a proxy and I did not
configure a proxy in ~/.curlrc.

The problem is, it fails *silently* even with verbose on!

Why is this?  First because the above command returns "curl: (7)
couldn't connect to host" on Standard Error. But Standard Error is
discarded by redirection to /dev/null. Instead Standard Out is checked
using "grep" for something like "404". But Standard Out is empty. So the
error remains undetected.

A solution would be to check for "curl"s return code first, then parsing
Standard Out.

-- 
tries to fetch URLs which yield 404 Not Found
https://bugs.launchpad.net/bugs/179420
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to