Please add a way to mark a %files list as listing files to be ignored, aka not 
complained about not belonging to any package.
This should be a convenient way to exclude sub-packages from packaging without 
the need to explicitly rm the not packaged
files.  Example

%if ...
%define without_foo -i
%endif

%package foo
...

%files foo %{?without_foo}
%dir /baz
/baz/bar

Implementation-wise the easiest thing is to treat -i as overriding the 
sub-package name the %files list belongs to,
assigning a special (empty?) name and later make sure to not emit the "empty" 
package.  Otherwise full processing
of the files should happen, so they are all expected to exist.

The actual use case is packaging of the GNU GCC compiler in openSUSE where 
shared library sub-packages are
provided from the newest compiler version but multiple actual compilers are 
co-installable.  For technical reasons
having multiple source packages building same named sub-packages such as 
libstdc++6 isn't possible.  The current
workaround suffixes those so we have libstdc++6-gccN in addition to the main 
libstdc++6 package, but those suffixed
packages have to be manually "removed" (or hidden) through special casing.

Explicitely rm-ing the files in those packages and not packaging the 
sub-packages would be an option but would
also make the spec file even more difficult to follow, so a less intrusive way 
to make rpmbuild not build a sub-package
is required.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2555
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to