Linux – debian: does apt-get support 302 redirects

aptdebianlinux

Will apt-get follow 302 redirects if instructed?

Clarifications

I have my own DEBIAN repositories and I am in the process of evaluating if I can "virtually consolidate" all of them to one. For this, I need to understand if client side apt-get can follow 302 redirects since the "virtual repo" would use this "trick" to have apt-get fetch .deb package from different places.

Best Answer

Since apt 0.7.21 (14th April 2009) it does, prior to that it didn't.

(The reason was that some mirrors of Debian ran apache with the mod_spelling module, which would redirect non-existent urls to similarly spelled ones -- so asking for dpkg_1.0-2_i386.deb on an out of date mirror might get you a redirect to dpkg_1.0-1_i386.deb)

See Debian bug #79002 for more details if you're interested.

Added: oh, Ubuntu got it earlier: 0.7.20.2ubuntu1 (9th Feb 2009). See Ubuntu bug#18645