[Git][reproducible-builds/diffoscope][master] Query the container for the full path of the parallel R .rdx file to the .rdb...
Chris Lamb
gitlab at salsa.debian.org
Fri Oct 25 08:15:01 UTC 2019
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
322a5683 by Chris Lamb at 2019-10-25T08:13:53Z
Query the container for the full path of the parallel R .rdx file to the .rdb file as well as looking in the same directory. This ensures that comparing two .deb/.changes shows a varying path mostly introduced in f1e80ca23.
- - - - -
1 changed file:
- diffoscope/comparators/rdata.py
Changes:
=====================================
diffoscope/comparators/rdata.py
=====================================
@@ -79,13 +79,19 @@ def get_module_path_for_rdb(rdb):
return
# Calculate location of parallel .rdx file
- rdx_name = "{}.rdx".format(os.path.basename(os.path.splitext(rdb.name)[0]))
+ rdx_name = "{}.rdx".format(os.path.splitext(rdb.name)[0])
try:
+ # Query the container for the full path (eg. `./path/to/foo.rdx`)...
rdx = rdb.container.get_member(rdx_name)
except KeyError:
- # Corresponding .rdx does not exist
- return
+ try:
+ # ... falling back to looking in the same directory for when
+ # comparing two .rdb files directly
+ rdx = rdb.container.get_member(os.path.basename(rdx_name))
+ except KeyError:
+ # Corresponding .rdx does not exist
+ return
temp_dir = get_temporary_directory().name
prefix = os.path.join(temp_dir, "temp")
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/322a568339aa4186751bbd79e20b02c119a713ef
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/322a568339aa4186751bbd79e20b02c119a713ef
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/20191025/3406dbba/attachment.htm>
More information about the rb-commits
mailing list