Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Oct 4 '09 at 4:09

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 6 down vote accepted

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

share|improve this answer
1  
FYI: apt in Lenny (5.0) is 0.7.20. Which means that this is not supported under the stable Debian. –  Zoredache Oct 4 '09 at 10:49
add comment

Well apt-get it more of a package handler than URL handler. The repo URLs are passed to apt-get through the distro (software sources in Ubuntu.) And since the URLs only represent directories in the end...i don't see why 302 redirects wouldn't work in apt-get.

Are you creating or modifying your own repo?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.