aptly-dev / aptly

aptly - Debian repository management tool
https://www.aptly.info/
MIT License
2.56k stars 374 forks source link

Clean up metadata files on publish #1257

Open andrewshadura opened 6 months ago

andrewshadura commented 6 months ago

When aptly publish is used e.g. with -skip-contents or -skip-bz2, it probably should make sure these files are actually removed if present on the disk.

When this is important: For example, I needed to change the PGP signing key, and I regenerated the published repository by hand. Unfortunately, I forgot to pass the same options as usual, and created these extra files, which won’t be updated by our package building machinery later and will become stale. When apt uses these repositories, it may get confused or outright refuse to use them, especially if the PGP key changed after the files were mistakenly created. Of course, this is also the case when skip-contents is enabled after the repository is published for the first time.

neolynx commented 5 months ago

That would help with the consistency, indeed. Do you think an implementation which removes i.e. *.bz2 if -skip-bz2 is provided would be enough ?