[Rpm-maint] [rpm-software-management/rpm] Parametric generators: Was "warning: Macro %1 defined but not used within scope" removed in RPM 4.17+? (Discussion #2501)
Miro Hrončok
notifications at github.com
Wed May 3 17:06:56 UTC 2023
Hello.
We have a workaround in our Fedora package: https://src.fedoraproject.org/rpms/python-rpm-generators/blob/b1fa63bf02b03b2120d32eb91ca2911d4ec77beb/f/pythonname.attr#_6
While debugging a related issue on CentOS Stream 9, I figured out that the warning is no longer present since Fedora 35.
### reproducer.spec
```
Name: reproducer
Version: 0
Release: 0
Summary: ...
License: MIT
BuildArch: noarch
%description
...
%prep
%build
%install
mkdir -p %{buildroot}
touch %{buildroot}/xxx
%files
/xxx
```
### /usr/lib/rpm/fileattrs/xxx.attr
```
%__xxx_provides() xxx
%__xxx_path ^/
```
### rpm-4.16.1.3-1.fc34
```
$ rpmbuild -ba reproducer.spec
...
Processing files: reproducer-0-0.noarch
warning: Macro %1 defined but not used within scope
Provides: reproducer = 0-0 xxx
...
```
### rpm-4.17.1-3.fc35
```
$ rpmbuild -ba reproducer.spec
...
Processing files: reproducer-0-0.noarch
Provides: reproducer = 0-0 xxx
...
```
Was this warning removed on purpose and can we safely remove the ugly workaround? Or is this a regression?
Looking through the relevant code's history near https://github.com/rpm-software-management/rpm/blob/a97c376f379ee48c3b0e92e9c79f64c9fd954b64/rpmio/macro.c#L946 does not reveal any obvious intended change.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2501
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/repo-discussions/2501 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230503/1e250f20/attachment.html>
More information about the Rpm-maint
mailing list