cobbler/cobbler — pull request #385 by davidressman (2012-12-27 03:28:21+00:00)
Title: Change apt_sync mirror url parsing

There's a bug in the logic of apt_sync's mirror url parsing code that
only comes out in a very specific case.

When parsing a url like http://apt.puppetlabs.com/dists/oneiric/, where
there are no directories between the servername and the "/dists/"
directories, the code leaves the debmirror --root argument empty, which
causes an application error in debmirror.

This patch changes the code to include the leading slash in the
path name, which debmirror can handle in any case, so there's no benefit
to stripping it out anyway.

Sorry about the last one. At my office, they don't let us push code out, so we have to email it to our home accounts, patch it in, run pylint, and push. I figured not even I could screw up such a small patch, so I didn't run pylint. Serves me right.