[Git][reproducible-builds/diffoscope][master] 2 commits: Drop printing out dpkg-query output when running tests; it is rather noisy and...
Chris Lamb
gitlab at salsa.debian.org
Mon Jan 21 00:35:29 CET 2019
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
d98c4b05 by Chris Lamb at 2019-01-20T23:26:20Z
Drop printing out dpkg-query output when running tests; it is rather noisy and has not helped (yet) in reproducing an error.
- - - - -
dda77130 by Chris Lamb at 2019-01-20T23:34:20Z
Don't crash with if we were unable to successfully extract a "guestfs"-based file. (Closes: #901982)
- - - - -
2 changed files:
- diffoscope/comparators/fsimage.py
- tests/conftest.py
Changes:
=====================================
diffoscope/comparators/fsimage.py
=====================================
@@ -22,6 +22,7 @@ import logging
import os.path
from diffoscope.difference import Difference
+from diffoscope.exc import ContainerExtractionError
from .utils.file import File
from .utils.archive import Archive
@@ -71,8 +72,10 @@ class FsImageContainer(Archive):
def extract(self, member_name, dest_dir):
dest_path = os.path.join(dest_dir, member_name)
logger.debug('filesystem image extracting to %s', dest_path)
- self.g.tar_out('/', dest_path)
-
+ try:
+ self.g.tar_out('/', dest_path)
+ except AttributeError as exc:
+ raise ContainerExtractionError(member_name, exc)
return dest_path
=====================================
tests/conftest.py
=====================================
@@ -19,7 +19,6 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import pytest
-import subprocess
from diffoscope.path import set_path
from diffoscope.locale import set_locale
@@ -48,17 +47,3 @@ def reload_comparators():
@pytest.fixture(autouse=True)
def reset_progress():
ProgressManager().reset()
-
-
-def pytest_report_header(config):
- if config.option.verbose == 0:
- return
-
- try:
- return ["", "Installed Debian packages:", "", subprocess.check_output((
- 'dpkg-query',
- '-W',
- '-f', '${db:Status-Abbrev}\t${binary:Package} (${Version})\n'
- )).decode('utf-8')]
- except:
- pass
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/compare/7bf992bfe74fffaf5d97071c77fb4698b2899421...dda771308ce89d926ab4c7caf2c4ba3e9e13a4ed
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/compare/7bf992bfe74fffaf5d97071c77fb4698b2899421...dda771308ce89d926ab4c7caf2c4ba3e9e13a4ed
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190120/b53f9e36/attachment.html>
More information about the rb-commits
mailing list