Creating an empty package should be possible. For example, one could wish to create a package consisting entirely of metadata that requires other packages. There are two ways users could hit this issue:
Users could (inadvertently) create a pkg_files with an empty input and pass it to pkg_rpm. The error presented to the user is related to pkg_rpm internals and is not useful to end-users.
Users could deliberately pass in an empty srcs value to pkg_rpm. In this case, we get a failure in the pkg_rpm wrapper macro due to relaxed boolean checks on incoming values (empty lists are "falsey"). Checking specifically for None should be enough. When tested locally, this ends up producing the same error as above.
IMO, making srcs non-mandatory is not a good idea, as requiring its presence (even if it is an empty value) makes the intent clearer.
Other packages (debian packages?) may also have this need as well.
209 may help to simplify the fix here, but it is not necessary to address this problem.
Given the following:
empty_rpm
will eventually fail to build with:Creating an empty package should be possible. For example, one could wish to create a package consisting entirely of metadata that requires other packages. There are two ways users could hit this issue:
pkg_files
with an empty input and pass it topkg_rpm
. The error presented to the user is related topkg_rpm
internals and is not useful to end-users.srcs
value topkg_rpm
. In this case, we get a failure in thepkg_rpm
wrapper macro due to relaxed boolean checks on incoming values (empty lists are "falsey"). Checking specifically forNone
should be enough. When tested locally, this ends up producing the same error as above.IMO, making
srcs
non-mandatory
is not a good idea, as requiring its presence (even if it is an empty value) makes the intent clearer.Other packages (debian packages?) may also have this need as well.
209 may help to simplify the fix here, but it is not necessary to address this problem.