freight-team / freight

A modern take on the Debian archive.
Other
107 stars 37 forks source link

How to replace a cache package file with same name #53

Open narcisgarcia opened 7 years ago

narcisgarcia commented 7 years ago

I have pushed this package to a Debian archive: sltd_1.1.6_all.deb I've fixed some detail to package scripts (preinst, postinst,...) and packed again with dpkg-buildpackage, but freight-add and freight-cache commands don't update library/cache because they say that sltd_1.1.6_all.deb already exist.

How can I replace a .deb file that has same name?

roelvanmeer commented 7 years ago

There might be a better way, but this is the method I use:

Then add the package as you normally would.

mmoll commented 7 years ago

I'm also using the @roelvanmeer method and think it would the normal Debian way to increment the package version (and also start with -1, e.g. 1.1.6-1).

narcisgarcia commented 7 years ago

I'll try @roelvanmeer method. The needing begun when I was debugging preinst/postinst/prerm/postrm files and needed to re-package, publish and install more than 50 times.

What's the difference between removal of these two from the pool? debian/dists/jessie-20170404004935713703617/.refs/contrib/sltd_1.1.8_all.deb debian/pool/jessie/contrib/s/sltd/sltd_1.1.8_all.deb

Is it enough to do after lib dir removal, this? freight-clear-cache jessie/contrib freight-cache jessie/contrib

emillynge commented 7 years ago

I need the ability to replace a deb file with incremented version in control file, but with the same name. e.g. mypackage-1.0.deb with a control file where the actual version is 1.0-2.

How much work would be needed to implement a --force flag in the freight-add command? such that any package with the same file name gets purged such that the package can be added? I may be able to throw some time after the problem, if it wont take too much time and there is a possibility of getting a PR accepted.