aptly icon indicating copy to clipboard operation
aptly copied to clipboard

Reuse all field from a mirror Release file in the generated release

Open slaws opened this issue 11 years ago • 7 comments

Hello,

When trying to mirror debian backport repository, the Release file generated by aptly is not the same as the one on the debian repository.

Here is the missing part :

NotAutomatic: yes
ButAutomaticUpgrades: yes

These fields are documented here : https://wiki.debian.org/RepositoryFormat

The problem is when you switch from debian repository to the mirror created by aptly. All hosts will try to install backport package as upgrades.

Would it be possible to reuse all field in the "original" Release file to avoid such problem ?

Regards,

slaws avatar Jan 29 '15 11:01 slaws

We mostly rely on Suite field for existing apt pinning configs.

It would be good to see this field taken from the "original" mirror. Also the ability to override it/them on publish snapshot would be ideal.

Version is missing too.

kumy avatar Feb 09 '15 21:02 kumy

yes absolutely this is a major issue (so I gently disagree with the enh tag, this is bug): that means all packages in the backports repo will be automatically uprgaded, which is not what you want from backports.

Additionally, you can add a way to specify this extra fields from the cli or a switch to add/not add them

sandrotosi avatar Jun 24 '15 18:06 sandrotosi

As we also just ran into this issue I would appreciate an option to set this via with a cli flag. Something like -backports would be a good fit and a simple solution.

tongpu avatar Jul 24 '15 14:07 tongpu

has there been any update on this issue? every time we update the backports mirror we risk to "forget" to add the extra manual step to add

NotAutomatic: yes ButAutomaticUpgrades: yes

this could result in a gigantic disaster - could we have an ETA for this bug to be fixed?

sandrotosi avatar Nov 18 '15 09:11 sandrotosi

This basically forces me to use apt-mirror on backports repos. It's a pretty big bug. So I agree - not an "enhancement". I find the code pretty hard to follow although it looks like one could add command line overrides to publish_snapshot.go?

tpdownes avatar Jan 06 '16 05:01 tpdownes

In #363 I've added support for marking a published repo/snapshot as a backports repo by running aptly publish snapshot -backports=true or aptly publish repo -backports=true when initially publishing it. This flag stays around, but can be changed later by passing backports=true or -backports=false.

This isn't quite the change requested in this commit, since it doesn't preserve arbitrary lines from the Release file, but it satisfies the use case that everyone (including me) has. I suspect the original change isn't possible because different components in a mirror might be from different apt repositories, with different top-level Release files, but maybe I'm misunderstanding something.

geofft avatar Mar 11 '16 12:03 geofft

Reopening that to allow also more generic way to add options to Release file for 1.2.0

smira avatar Jul 06 '17 20:07 smira