-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The generate-reprepro-codename script is too restrictive #204
Comments
tl;dr: it's a tricky problem and I don't see an easy way how to solve this in a generic way within j-d-g right now I agree that this would be nice to have, though adjusting reprepro repositories isn't really straight forward and quite error-prone. :-/ For example it complains (IIRC) if there are architectures in reprepro's internal database which aren't listed in the From my PoV there are two approaches from here, until someone comes up with a bullet-proof way¹ how to handle this from within
¹ It could be enough to always just extend the Architectures list and never reduce it again. This might be fine enough as well for your use case, though has the risk of leaving outdated stuff for Architectures that are no longer built/supported, which is also a dangerous approach for CI/CD environments. ;( |
You're right of the fact that removing an architecture can be error prone, specially if we operate on a per build basis where a package for a given repository must be built only for a restricted set of architectures. So yes, my thinking was about extending the repository for new architectures only. For other parameters which could be updated through global environment variables such as ORIGIN, that's another story. But if you say that when changing such attributes, the whole repository database must be updated, that not a good idea. Right now, I set the ARCHITECTURES environment variable globaly in the sourced At least from my point of view, the new architectures should be added (and never removed) automatically. This would avoid build failure when a project matrix get updated with new architectures. |
Good morning,
Right now, when the
generate-reprepro-codename
get called by the underlyingbuild-and-provide-package
script, nothing happen if the configuration file for the given REPOSITORY/codename already exists. The script is just existing without further care... That is not really a good behavior in my eyes. Imagine the following scenario:We are setting a Jenkins job with matrix for specific architectures such as amd64 and i386. By default, no
ARCHITECTURES
environment variable is exported and so, thegenerate-reprepro-codename
script generate repository configuration file using hardcoded architectures: "amd64 i386 source". At this stage, that fine. Not exporting theARCHITECTURES
environment variable is OK as long as our matrix is targeting default architectures as hardcoded in thegenerate-reprepro-codename
script.However, problem arise later on when we want add further architectures to our matrix such as arm64. Currently when doing so, the script is existing without further care because the configuration file for the REPOSITORY/Codename already exists. Furthermore, exporting the
ARCHITECTURES
environment variable with value such as "amd64 i386 arm64 source" doesn't change anything. The build therefore result in a failure as the incoming fails to be processed due to unlisted architecture (here arm64).Expected because the arm64 architecture isn't listed in the repository configuration file:
Of course we can always edit the configuration file manually but...
My thinking is that the
generate-reprepro-codename
script should be able to update an already existing repository configuration file according the exported environment variables and also, according the current build parameters.Regarding the current build parameters
For any build, and if the repository configuration file already exists, the architecture for which the package is being build should be added into the repository configuration file if that isn't already the case. I don't see any other build parameter to handle in that context.
Regarding the environment variables
The script should check whether or not values of exported environment variables remain same and if that not the case, update the repository configuration file with new value.
Thank you.
The text was updated successfully, but these errors were encountered: