dnbert / prm

PRM Allows you to quickly build package repositories, inspired by Jordan Sissels' FPM
MIT License
250 stars 33 forks source link

Package: header #6

Closed joshskinner-wf closed 11 years ago

joshskinner-wf commented 11 years ago

After initializing a directory as my apt repo with:

: prm --type deb --path . --component alpha,released,dev,staging --release precise --arch amd64,i386 --gpg --generate

and then adding this repo to my apt sources with: deb ssh://ubuntu@192.168.100.254/srv/prm/ precise released

i get the following error when i do an apt-get update: W: Failed to fetch gzip:/var/lib/apt/lists/partial/ubuntu%40192.168.100.254_srv_prm_dists_precise_released_binary-amd64_Packages Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/ubuntu%40192.168.100.254_srv_prm_dists_precise_released_binary-i386_Packages Encountered a section with no Package: header

E: Some index files failed to download. They have been ignored, or old ones used instead.

if i add debs to the dists/precise/released/binary-amd64 and binary-i386 dirs and rerun the prm command i get the following at the end of apt-get update:

Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/ubuntu%40192.168.100.254_srv_prm_dists_precise_released_binary-amd64_Packages E: The package lists or status file could not be parsed or opened.

joshskinner-wf commented 11 years ago

Could it have anything to do with the fact that the dists/precise/released/binary-amd64/Packages file contains different characters than normal.
[" normal Packages file "]

dnbert commented 11 years ago

Hi Josh,

Would you be able to paste your Packages/Release files somewhere where I could see them?

andytinycat commented 11 years ago

It seems to be that whatever's doing the printing of the Packages file is printing it as a Ruby array, complete with brackets and quotes. Here's an example:

["Package: vendor-ruby\nVersion: 2.0.0.0+vendor0\nLicense: The Ruby License\nVendor: vendor\nArchitecture: amd64\nMaintainer: vendor@something\nInstalled-Size: 95133\nDepends: libffi6, libncurses5, libreadline6, libssl1.0.0, libtinfo5, libyaml-0-2, zlib1g, libgdbm3\nSection: interpreters\nPriority: \nHomepage: http://www.ruby-lang.org/\nDescription: The Ruby virtual machine\nFilename: dists/precise/main/binary-amd64/f3d-ruby_2.0.0.0+vendor0_amd64.deb\nMD5sum: ec90cf5174f67d8b184a0fc8cb5ec431\nSize: 27193434\n\n"]

Weirdly I have another machine which has the same version of the gem and the same version of Ruby, and this isn't happening...

andytinycat commented 11 years ago

I've just created a pull request which should fix it.

dnbert commented 11 years ago

Hi Andy and Josh,

I've released version 0.11 with some refactored content for how the Packages file gets populated. I've tested it against:

ruby-1.8.7-p371 ruby-1.9.3-p392 ruby-2.0.0-p0

Can you verify that this issue is resolved on your end? There is a new gem on rubygems (version 0.0.11)

andytinycat commented 11 years ago

That works for me - I've rebuilt my repo with the latest gem and everything's fine. Thanks again.