Re: [Rpm-maint] [rpm-software-management/rpm] Remove %ifarch-%endif from %debug_package macro (#635)
That's one helluva convoluted reproducer, hard to see the point in there. Shortened it a bit, execute rpmbuild -bp to see : ``` %prep %mymacro0 %mymacro1 echo "%bbb0 --- %bbb1" ``` But true, those %globals are "executed", and come to think of what happens during the macro expansion, of course they are. Yet the %ifnarch -test in %debug_package *does* work as intended, so there's some non-obvious interaction there. Still, that macro does not need any fixing because it does what's is supposed to. -- 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/issues/635#issuecomment-468302385___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Remove %ifarch-%endif from %debug_package macro (#635)
Closed #635. -- 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/issues/635#event-2171293792___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Remove %ifarch-%endif from %debug_package macro (#635)
> Err, what? You trimmed out the relevant part of that quote: >>You can of course define a macro that contains and %if-%else-%endif but >> that will only work as expected when expanded in a spec. The problem is more complicated. Macro written in a macro file that contains %if-%else-%endif + %global inside will not work correctly even if it is expanded in spec file. For example use rpm sources and add into macro.in file : ``` %mymacro0 \ %if 0 \ %global bbb0 ccc0 \ %endif \ %{nil} %mymacro1 \ %if 1 \ %global bbb1 ccc1 \ %endif \ %{nil} ``` then add into "tests/data/SPECS/replacetest.spec" after the "%install" line two echos: ``` echo %mymacro0 echo %mymacro1 ``` and change the line: ``` echo "%{filedata}" > $RPM_BUILD_ROOT/opt/foo ``` to the line: ``` echo "%bbb0 --- %bbb1 --- %name --- %ohouhiuiu" > $RPM_BUILD_ROOT/opt/foo ``` run "make check". Then you can see that ``` %bbb0 --- %bbb1 --- %name --- %ohouhiuiu ``` was expanded into ``` ccc0 --- ccc1 --- replacetest --- %ohouhiuiu ``` you can check it in tests/rpmtests.dir/232/rpmtests.log. -- 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/issues/635#issuecomment-468262215___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Remove %ifarch-%endif from %debug_package macro (#635)
Reopened #635. -- 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/issues/635#event-2170961834___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Remove %ifarch-%endif from %debug_package macro (#635)
Closed #635. -- 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/issues/635#event-2151126871___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Remove %ifarch-%endif from %debug_package macro (#635)
Err, what? You trimmed out the relevant part of that quote: > You can of course define a macro that contains and %if-%else-%endif but that > will only work as expected when expanded in a spec. That macro is part of automated debuginfo generation and is only ever invoked in spec context, where %if is perfectly fine. That macro snippet is there to avoid debuginfo generation on noarch packages. -- 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/issues/635#issuecomment-465466392___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint