Skip to content

Fix parsing Release file with multiple spaces issue #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fangpenlin
Copy link

I noticed that our Release file is not quite right:

Codename: precise
Date: Thu, 13 Feb 2014 10:40:25 UTC
Architectures: amd64 i386
Components: main stable unstable
MD5Sum:
 c62e7e3300f72e80f0088d1315950b9d             1593 unstable/binary-amd64/Packages
 c1718b7d858b0a0e2530f33e4423f3f6              700 unstable/binary-amd64/Packages.gz
 205395c68e7a290a65246862cc4dc36e             1870 unstable/binary-amd64/Packages.bz2
 d41d8cd98f00b204e9800998ecf8427e                0 unstable/source/Sources
 9d49e4ef1ba094db290dcd90bd6c9b9b               27 unstable/source/Sources.gz
 4059d198768f9f8dc9372dc1c54bc3c3               14 unstable/source/Sources.bz2
 c62e7e3300f72e80f0088d1315950b9d             1593 main/binary-amd64/Packages
 27de0707e3daac1f58a2620f45a959ee              700 main/binary-amd64/Packages.gz
 f569733ee7fc66909a151a4e499047e4              432 main/binary-amd64/Packages.bz2
 d41d8cd98f00b204e9800998ecf8427e                0 main/source/Sources
 baa89eeb3ca89c17e343a232cb7e9686               27 main/source/Sources.gz
 4059d198768f9f8dc9372dc1c54bc3c3               14 main/source/Sources.bz2
 d41d8cd98f00b204e9800998ecf8427e                0 main/binary-i386/Packages
 e64128c49b0caa16eccfb06856d0bfe4               20 main/binary-i386/Packages.gz
 d41d8cd98f00b204e9800998ecf8427e                0 unstable/binary-i386/Packages
 e64128c49b0caa16eccfb06856d0bfe4               20 unstable/binary-i386/Packages.gz
 b94d28ab4c7b4225d576423ab89c33ca              541 stable/binary-amd64/Packages
 9afd2cb24f739da471c5ee1759217aef              396 stable/binary-amd64/Packages.gz
 d41d8cd98f00b204e9800998ecf8427e                0 stable/binary-i386/Packages
 e0ea47f7d9f93f557f676d6194dc73fa               20 stable/binary-i386/Packages.gz
 a7b1c2cd0691fa33a9143efadea09c1e 10635 unstable/binary-amd64/Packages
 fb70d14a96281dd1d218f5eaaa2c83f4 2631 unstable/binary-amd64/Packages.gz
 e79a2663e73e83502fb674f3a90261e0 2720 unstable/binary-amd64/Packages.bz2
 d41d8cd98f00b204e9800998ecf8427e 0 unstable/source/Sources
 a4ceda53499e3a8e67def5817599b4d3 27 unstable/source/Sources.gz
 4059d198768f9f8dc9372dc1c54bc3c3 14 unstable/source/Sources.bz2
 d41d8cd98f00b204e9800998ecf8427e 0 main/source/Sources
 714923f20b51ffab736bb34a7466ea67 27 main/source/Sources.gz
 4059d198768f9f8dc9372dc1c54bc3c3 14 main/source/Sources.bz2
 ce14474e6e4e3f2953cf314e222f7381 5345 main/binary-amd64/Packages
 a0925770a016350d6c32bfb3eccca66b 1547 main/binary-amd64/Packages.gz
 49137a16d0eee57a18fa663cb297fdc1 1673 main/binary-amd64/Packages.bz2

as you can see old those entries are left there at beginning of hash list. It was caused by parsing Release file improperly.

@@ -55,6 +58,11 @@ def pgdg(self, storage):
data = open(os.path.join(os.path.dirname(__file__), 'data', 'pgdg_Release'), 'rb').read()
return AptRelease(storage, 'precise-pgdg', data)

@pytest.fixture
def ubuntu(self, storage):
data = open(os.path.join(os.path.dirname(__file__), 'data', 'ubuntu_Release'), 'rb').read()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this file in the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants