diff --git a/autospec/tarball.py b/autospec/tarball.py index 65d8d78..38092a2 100644 --- a/autospec/tarball.py +++ b/autospec/tarball.py @@ -446,5 +446,8 @@ class Content(): autogenerated_src.extract(os.path.join(self.base_path, 'autogenerated-tmp')) # Move the autogenerated source to a non-version-named directory for consistent diffs call(f"mv autogenerated-tmp/{autogenerated_src.prefix} autogenerated", check=True, cwd=self.base_path) - call("diff -u -r ../autogenerated ./", - logfile="archive.diff", check=False, cwd=os.path.join(self.base_path, main_src.prefix)) + call("diff -u -r --unidirectional-new-file ../autogenerated ./", + logfile="archive.diff.in", check=False, cwd=os.path.join(self.base_path, main_src.prefix)) + call("grep -A14 -E '^(diff|Only in)' archive.diff.in", + logfile="archive.diff", check=False, cwd=os.getcwd()) + call("rm archive.diff.in", check=False, cwd=os.getcwd())