cargomedia / debian-packages

Custom debian packages
8 stars 5 forks source link

Keep last three DEBs #104

Closed njam closed 8 years ago

njam commented 8 years ago

What needs to be changed?

cc @kris-lab

ppp0 commented 8 years ago
njam commented 8 years ago

As discussed: let's keep the 3 last version in "pkg/", then it should be automatically synced to S3.

ppp0 commented 8 years ago

@njam please review

njam commented 8 years ago

Can we do this without another temp directory? Some ideas here: http://superuser.com/questions/268344/how-do-i-delete-all-but-10-newest-files-in-linux

ppp0 commented 8 years ago

Agree it looks much better now! @njam please review

njam commented 8 years ago

I found it a bit more readable if we stay in the package directory, and don't "cd" into pkg/, but your call.

njam commented 8 years ago

btw, did you test that creating the repo works correctly with multiple versions of the same package?

ppp0 commented 8 years ago

This is a good point! It doesn't work!

It's on a wishlist (with patches!) for reprepro

What do do? Build our own reprepro ? Would be nice to have that functionality. Otherwise we'd need to manually install the *.deb with dpkg -i instead of downgrading with apt-get install package=version

njam commented 8 years ago

ouch :/

I would go with manual dpkg -i for now then. wdyt?

ppp0 commented 8 years ago

hmm, we can live with manual downgrade (It hopefully won't happen too often).

Alternatives to reprepro according to this askubuntu question:

njam commented 8 years ago

Let's move it to the backlog

ppp0 commented 8 years ago

we'd still need to merge this one in order to keep the three newest debs. They still would be synced to S3 but not be accounted for in the packages database

njam commented 8 years ago

so it doesn't cause problems when creating the repo?

If so "lgtm". Please also port to "debian-packages-private"

ppp0 commented 8 years ago

reprepro ignores the older (or equal) entries

Adding janus to repo...
/vagrant/packages/jessie/janus/pkg/janus_0.0.10.git1.088882-jessie1_amd64.deb: component guessed as 'main'
Skipping inclusion of 'janus' '0.0.10.git1.088882-jessie1' in 'jessie|main|amd64', as it has already '0.0.11.git1.088882-jessie1'.
/vagrant/packages/jessie/janus/pkg/janus_0.0.11.git1.088882-jessie1_amd64.deb: component guessed as 'main'
Skipping inclusion of 'janus' '0.0.11.git1.088882-jessie1' in 'jessie|main|amd64', as it has already '0.0.11.git1.088882-jessie1'.

but it does complain (fail) if it detects a version it knows (from its history?) that has a different checksum

Already existing files can only be included again, if they are the same, but:
md5 expected: 4eefb68190e617f208d85143508d6d3b, got: 0dde5aefc9ec812d7b0ebbac0ea00292
sha1 expected: 2dbec012a5074b8b2899995ef3fb0563d2a77baf, got: 62125a06b2d74cec3da731fc1c30554bd9d17a42
sha256 expected: 8885a001a65f08ff1112e630473fe95f67b906bbe9bc70387063826f4b3d70d5, got: fdf1cf899b351d2e34a3d58ccda97c78d64abaa2ca0d01035f258128e3deb905
size expected: 4424854, got: 4425614

Still, it does not support multiple live versions..