Ignore spectool warnings

Without this change, the spectool output can look like this

    [root@e15222e75294 pkg1]# spectool -S titotestpkg.spec | awk '{print $2}'
    warning: Macro expanded in comment on line 37: %{python3_sitelib}/%{name}

    titotestpkg-0.0.1.tar.gz

and then each of the lines is considered to be a SourceX file. We
should really ignore the warnings.
This commit is contained in:
Jakub Kadlcik 2020-10-06 16:43:46 +02:00 committed by Jakub Kadlčík
parent 00ee487ed2
commit 861d15518e

View file

@ -499,7 +499,7 @@ class Builder(ConfigObject, BuilderBase):
"""
Copy extra %{SOURCEX} files to the SOURCE folder.
"""
cmd = "spectool -S '%s' --define '_sourcedir %s' | awk '{print $2}'"\
cmd = "spectool -S '%s' --define '_sourcedir %s' 2> /dev/null | awk '{print $2}'"\
% (self.spec_file, self.start_dir)
sources = getoutput(cmd).split("\n")