Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
> One way to fix this could be extending bcond_with and bcond_without to > %undefine the with_ macro in the else case. That way the defaults could be > overwritten by later lines. This sounds a bit like a bad feature to advertise > to packagers but may be ok for this. yeah that is other problem , ``` %bcond_with static %bcond_without static %if %{with static} echo "static is enabled on 1 " %endif %undefine with_static %if %{with static} echo "static is enabled on 2 " %endif ``` rpmspec --parse above first "with static" will be true but the second "with static" will not , the second is the correct so %bcond_without , as @ffesti also concluded should be %undefine the `with_` macro -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-1340927837 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
@ffesti Any update here? I think this can be beneficial e.g. during the Mass Rebuilds. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-778909133___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
@pmatilai requested changes on this pull request. See above. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#pullrequestreview-470197533___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
Yeah this needs to interact with both _with_check and _without_check, and not add semantics to %_without_check value. And for that, it'd seem that we need to parse the spec before fiddling with these values as otherwise we can't know about bcond's set in the spec. It also needs a better commit summary regardless of implementation, this is not about some macro being added but integration between --with/without check idiom and --nocheck. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-641884348___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
> I think this should set _with_check unless _without_check is defined already. > Basically to have `%bcond_without check` by default without having to put it > in all spec files. But still need to make sure that somebody defines > `%bcond_without check`, this code won't override it. That would be absolutely perfect, if there's a way to do it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-640515842___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
I would like to avoid `nocheck`, because the common way to conditinalize would be `%if %{without nocheck}` and that's just confusing to read. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-640514577___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
May be the macro should be renamed to not collide with the with/without mechanism. The bcond mechnism assumes that the actual value is not set as a macro but only on the command line and is basically read only within the spec. If you set the macro itself having two of them can lead to the awkward situation where but are set to one or both are set to zero. So I would prefere to only have one macro. May be _nocheck is a better name and closer resembling the cli param. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-640421215___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add _without_check macro (#1256)
I think this should set _with_check unless _without_check is defined already. Basically to have `%bcond_without check` by default without having to put it in all spec files. But still need to make sure that somebody defines `%bcond_without check`, this code won't override it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1256#issuecomment-640229941___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint