Print the problematic binary files

The output will look like this:

    Binary files /dev/null and b/createrepo_mod/tests/packages/foo-3.0.10-3.fc33.noarch.rpm differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-other.xml.gz differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-filelists.sqlite.bz2 differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-other.sqlite.bz2 differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-primary.sqlite.bz2 differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-primary.xml.gz differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-filelists.xml.gz differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-modules.yaml.gz differ
    ERROR: You are doomed. Diff contains binary files. You can not use this builder
This commit is contained in:
Jakub Kadlcik 2021-08-29 19:23:21 +02:00
parent 3a3039beb1
commit 0df894d613
2 changed files with 2 additions and 0 deletions

View file

@ -892,6 +892,7 @@ class UpstreamBuilder(NoTgzBuilder):
(status, output) = getstatusoutput(
"grep 'Binary files .* differ' %s " % patch_file)
if status == 0 and output != "":
print(output)
error_out("You are doomed. Diff contains binary files. You can not use this builder")
# Creating two copies of the patch here in the temp build directories

View file

@ -35,6 +35,7 @@ class DistributionBuilder(UpstreamBuilder):
(status, output) = getstatusoutput(
"grep 'Binary files .* differ' %s/%s " % (self.rpmbuild_gitcopy, p_file))
if status == 0 and output != "":
print(output)
error_out("You are doomed. Diff contains binary files. You can not use this builder")
run_command("cp %s/%s %s" % (self.rpmbuild_gitcopy, p_file, self.rpmbuild_sourcedir))