[Rpm-maint] [rpm-software-management/rpm] Only destroy lua tables if there are no BASpecs left (#366)
Nikola Forró
notifications at github.com
Mon Feb 5 12:02:49 UTC 2018
> Does this fix a concrete bug you're encountering?
Yes. Imagine the following spec file called `reproducer.spec`:
```specfile
Name: reproducer
Version: 0.1
Release: 1%{?dist}
Summary: reproducer spec file
License: GPL
URL: file:///dev/null
Source0: file:///dev/null
BuildArch: noarch
%description
reproducer spec file
%prep
%build
%install
%files
%changelog
* Mon Feb 05 2018 Nikola Forró <nforro at redhat.com> - 0.1-1
- create reproducer spec file
```
And the following python snippet:
```python
import rpm
spec = rpm.spec('reproducer.spec')
print(rpm.expandMacro('%{lua: print(sources)}'))
```
The result is `nil` instead of a lua table. If you remove `BuildArch` from the spec file, it works as expected.
--
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/366#issuecomment-363065248
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180205/596b8b04/attachment.html>
More information about the Rpm-maint
mailing list