Re: [Rpm-maint] [rpm-software-management/rpm] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Michael Schroeder
Your "test-define" example is also not working like you expect. If you add
```
%define test 2
```
at the top of the specfile and add "%test" to your echo statement, you'll see 
that it echos "2" even if you call rpmbuild with `--define "test 1"`.

Basically --define and --undefine work similar to adding define/undefine to the 
top of the spec file. So it is not possible to change a %define that comes 
later on. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939#discussioncomment-8619441
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] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Tomasz Kłoczko
> No, it doesn't.

Can you show your executios of commands executions which I've provided?
Did you try to reproduce what I've done? 樂 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939#discussioncomment-8618693
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] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Panu Matilainen
Closed #2939 as resolved.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939
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] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Panu Matilainen
No, it doesn't.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939#discussioncomment-8618040
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] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Tomasz Kłoczko
> No, read what I wrote more carefully. Neither --define or --undefine can 
> affect a macro _defined inside a spec_.
> Both can affect the parse, and cause things to be defined or undefined, but 
> only wrt macros that are defined before the macro is parsed.

Please have look ONE MORE time on specs example which disproves what you just 
wrote.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939#discussioncomment-8617999
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] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Panu Matilainen
No, read what I wrote more carefully. Neither --define or --undefine can affect 
a macro *defined inside a spec*.
Both can affect the parse, and cause things to be defined or undefined, but 
only wrt macros that are defined before the macro is parsed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939#discussioncomment-8617830
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] 4.19.1.1: `rpmbuild --undefine foo` is not working (Discussion #2939)

2024-02-28 Thread Tomasz Kłoczko
> --define and --undefine execute long before the spec is parsed, so while they 
> can affect the way a spec is parsed, neither can affect a macro defined 
> inside a spec.

Please have look one more time on my examples.
`--define` IS working and at the same time `--undefine` IS NOT working so it 
cannot be matter of when something is parsed.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2939#discussioncomment-8617632
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