RexOps / repositorio

Tool to administrate linux repositories
http://www.repositor.io/
55 stars 18 forks source link

Error when parsing debian package file, and the last Deb package is not mirrored #42

Closed JoelSaunier closed 8 years ago

JoelSaunier commented 8 years ago

There is a little bug in Rex/Repositorio/Repository/Apt.pm, in sub _parse_debian_package_file.

The content of the file is split by using the \n char as sep, and the last line of a Debian Packages file is an empty line. So far so good. But the parser try to find an empty line as a separator between packages details to push content back to caller. The last line should be detected, but the split function ignore the last line (this is normal: see man perlfunc, for split and specially the LIMIT parameter of split). Thus the last package detail is not push back to the caller, and this package is not downloaded.

By using the attached patch, the last detail is push back if found, and all is ok. apt-mirror-patch.txt

krimdomu commented 8 years ago

Hi @JoelSaunier thanks for the issue, this should be already fixed with this commit: https://github.com/RexOps/repositorio/commit/b3ea13f44af1aa2e85ab05fee9ec144b641df098

This will be available with the next bugfix release.