-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add --spec and --srpm no-op arguments to the builddep plugin #810
base: main
Are you sure you want to change the base?
Conversation
Under dnf4 the builddep command accepted the --spec or --srpm argument (mutually exclusive) to tell dnf what the input to the command was. With dnf5 the command is more intelligent and the arguments are not required. However, if you are bringing a script over from an existing system and you have --spec or --srpm for the builddep dnf command, you will get this error: Unknown argument "--spec" for command "builddep". Add "--help" for more information about the arguments. This patch addes the --spec and --srpm arguments to the builddep command, but they are ignored. They exist for backwards compatibility. Fixes: rpm-software-management#799 Signed-off-by: David Cantrell <[email protected]>
Be honest I am not sure whether dummy options are the right solution. First of all we usually adds such options to aliases configuration file. There is another problem - those option are ignored therefore script will not fail but does not provide required functionality. If I am not mistaken it is valid for --srpm option. |
Hmm, what do you mean by that? I only took a cursory glance at the code + quick test but it looks to me like both specs and src.rpms are processed as expected in dnf5 version, without the need for an explicit --spec or --srpm. |
I would prefer to have fully functional options instead of the dummy ones. Thinking about unknown options - wouldn't be better solution to just ignore them all (with some warning to the user)? The only trouble might be with options with values set without |
Oh, I had missed that. In that case I agree, dummy options that don't do what the original did are problematic. If explicit format is required, maybe it'd make more sense to have them take an argument instead, ie '--srpm fubar.r.p.m --spec myspec.txt'. But then I don't really understand the need for such functionality, if you name your spec something else than .spec you're just shooting your own foot... |
OK, so my understanding now is that we should have the same functionality as dnf4 had. I would vote for implementing the options in the same way as they already exist, even if that is not really ideal. We could add additional option handling that is "cleaner" but I think we should support the existing options as they work. I will redo the PR. |
There's no processing done on this spec file nor is it hooked to the buildsystem. Drop the `.in` extension. Motivated by the fact that `dnf builddep rpm-ostree.spec.in` in dnf5 gets confused by the non `.spec` extension. And it doesn't have a `--spec` switch yet to disambiguate. Related: rpm-software-management/dnf5#810
There's no processing done on this spec file nor is it hooked to the buildsystem. Drop the `.in` extension. Motivated by the fact that `dnf builddep rpm-ostree.spec.in` in dnf5 gets confused by the non `.spec` extension. And it doesn't have a `--spec` switch yet to disambiguate. Related: rpm-software-management/dnf5#810
Under dnf4 the builddep command accepted the --spec or --srpm argument (mutually exclusive) to tell dnf what the input to the command was. With dnf5 the command is more intelligent and the arguments are not required. However, if you are bringing a script over from an existing system and you have --spec or --srpm for the builddep dnf command, you will get this error:
This patch addes the --spec and --srpm arguments to the builddep command, but they are ignored. They exist for backwards compatibility.
Fixes: #799