Conversation
If -backports=true is provided to any of the publish subcommands, the published repo will have the lines NotAutomatic: yes ButAutomaticUpgrades: yes in its Release file, which is necessary when creating or mirroring a backports repo -- the repo should be available, but apt should not choose packages in that repo by default. This flag can be later unset with -backports=false. This isn't a complete fix for aptly-dev#184 since we don't capture all the fields, but it solves the most common use case.
|
The test failures appear to be because squeeze and squeeze-lts don't exist any more as of a few days ago.... Also I guess I should add test coverage and documentation, but Go is new to me and I don't quite follow the test framework. |
|
Hey @smira, is this a reasonable approach to solving this? Would you like me to write docs and try to figure out how to write tests? |
|
@geofft docs is something which is missing. I should have fixed all the In short, you can launch whole test suite by running: This would do one-time pull for fixtures and start test suite. It might take a long time to run. So once you've pulled fixtures, you can re-build aptly with: And then you can do: To run all the publish-related tests. Also you can ask test runner to re-capture expected output on failures with: |
|
I can take a look at system tests this week, I'm still trying to keep up with my pending queue :( |
|
I think this is a suboptimal solution. What aptly should do is to stop stripping NotAutomatic/ButAutomaticUpgrades fields from the remote repo Release file, and thus preserve them throughout the mirror/snapshot/publish chain. with the approach proposed in this PR we need to somehow identify if we are dealing with a backport repo (grep the mirror url? code that in the mirror name? what about if a third-party repo is configured as a backport but doesnt explicitly call the repo '.backport.'?) and pass the backport=true option, which is difficult/cumbersome to script/automate and would result in manual intervention. the even better approach for aptly would be to preserve all the extra fields from the remote Release file, except those that needs to change of course (like date, hashes, etc) |
|
Yeah, that was the approach I initially wanted to do. The trouble is that a publish doesn't necessarily map to a single mirror. You can imagine doing something like which converts two upstream Release files (/debian/dists/jessie/Release and /debian/dists/jessie-backports/Release) into one aptly-generated Release file (/dists/jessie/Release). What should it do in that case? And this isn't actually that weird; if you create the bpo mirror with If there's a good way to handle this case, I'm happy to implement it. Maybe the best option is to give an error message if the Release files don't match in their extra configuration, and allow you to specify something on the command line (e.g. What other options are there in Release files besides |
|
On Tue, Apr 5, 2016 at 3:54 PM, Geoffrey Thomas notifications@github.com
also this is a rather corner case, and while we have at hand a real users
|
|
I agree that it's a corner case, but I need to implement something for this case. (And meanwhile my code works, and nobody else has proposed another PR for solving this.) I think either merging or taking the intersection are both wrong if done silently. What options are you interested in? My use case, and as far as I can tell, the use case of everyone else in #184, is just backports. From https://wiki.debian.org/RepositoryFormat , the other options include
so I think it actually does not make sense to copy unknown fields from the Release file, because all of them other than |
the only option we are really interested in is to preserve NotAutomatic / |
|
What we could do is:
Thoughts? |
|
On Thu, Apr 7, 2016 at 10:52 AM, Andrey Smirnov notifications@github.com
|
|
Hi everyone, |
|
Currently, I work around this by using the It is true that there needs to be a better way, overall, to have better control over any fields, however this is a pretty important case that I think deserves a flag. Better yet, make the new |
If -backports=true is provided to any of the publish subcommands, the
published repo will have the lines
NotAutomatic: yes
ButAutomaticUpgrades: yes
in its Release file, which is necessary when creating or mirroring a
backports repo -- the repo should be available, but apt should not
choose packages in that repo by default. This flag can be later unset
with -backports=false.
This isn't a complete fix for #184 since we don't capture all the
fields, but it solves the most common use case.