Issue #36 resolved

package link in the index file is not correct

johnwang507 avatarjohnwang507 created an issue

For example, the links to the tarballs of Flask in the /<root>/simple/Flask/index.html are:

...
<a href="../../packages/source/F/Flask/Flask-0.8.tar.gz#md5=..."
...

while they are actually located in ../../packages/source/f/Flask/Flask-0.8.tar.gz . Please be noted the case difference: It's a lowcased f, not F in the real path.

This problem result in installing failure: a 404 error

Comments (6)

  1. johnwang507

    I have completely synced the official pypi repo (51G total). I found the subdirectories in ../../packages/source are created as a single alphabet character. Some of them are in lowcase while others are in uppercase. However packages are not distinguished by case, e.g. package Flask and flam are both stored in the f directory. This make me can successfully install flam but not Flask due to the above mentioned problem.

    I'm thinking if I should write a script to batch update all the links in the repo to solve the problem.

  2. johnwang507

    I run the mirror process on a OSX (latest version) and move the whole mirror to a Linux(Debian7) server after completing the mirroring. I move the whole repo by creating a tarball using tar cjf xxxx and use this tarball to transfer.

    Currently I simply create the symbol-link in flip case character for every directories, which allow me work around the problem. I serve the repo to pip/easy_install via an Nginx webserver.

  3. johnwang507

    Oh, before I forget, I do encounter warnings when I untar my tarball on the Linux server. But it decompressed successfully after all. The warning is a compatitbilty issue between OSX tar and GNU tar. May this be the reason ?

  4. Christian Theune

    OS X does not maintain Upper/Lower-Case of paths by default and actually tends to break if you turn it on for your system partition. However, it may remain consistent while on OS X as it will also rewrite any read-access to those files.

    Once you packed it up it's likely that those got mangled badly.

    bandersnatch can help you clean this up removing the status files (not the data) and running bandersnatch again. It will then do a cleanup and put the missing files in place. You will have superfluous files on the disk, though. But that doesn't hurt except eating up space.

    I'll make a note in the README that this has been an issue.

  5. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.