[Rpm-maint] [rpm-software-management/rpm] RFE: %_files_listed_twice_terminate_build (#1158)

Miro Hrončok notifications at github.com
Wed Apr 1 16:04:44 UTC 2020


Would it be possible to have an option to make files listed twice a hard error?

Similarly how `%_unpackaged_files_terminate_build` works, I imagine `%_files_listed_twice_terminate_build`.

Example:

```
%files
/a
/a

...

warning: File listed twice: /a
```


```
%global _files_listed_twice_terminate_build 1

%files
/a
/a

...

error: File listed twice: /a
build failed
```

This would come handy when testing some code that generates filelists:


```
%global _files_listed_twice_terminate_build 1

%files -l %{myfiles}
# explicitly listed bindir/foo, making sure it is not in myfiles
%{_bindir}/foo
```

Because currently I can only do it this way:

```
%check
# remove bindir/foo, will fail the build if it was listed in myfiles
rm %{buildroot}%{_bindir}/foo

%files -l %{myfiles}
```
And that is rather ugly.

Thanks.

-- 
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/1158
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200401/3d1c5c50/attachment.html>


More information about the Rpm-maint mailing list