diff --git a/docs/man1/bmaptool.1 b/docs/man1/bmaptool.1 index 6f1dd3a..5093b48 100644 --- a/docs/man1/bmaptool.1 +++ b/docs/man1/bmaptool.1 @@ -77,8 +77,12 @@ be a regular file or a block device (only local). .PP Unless the bmap file is explicitly specified with the "--bmap" option, \fIbmaptool\fR -automatically discovers it by looking for a file with the same basename as IMAGE -but with the ".bmap" extension. The bmap file is only looked for in +automatically discovers it by looking for a file with the same name as IMAGE +but with the ".bmap" extension. If it was unable to find it that way, it will +try filenames with each extension of IMAGE removed and ".bmap" added to it. So +if your IMAGE is named \fIdisk.img.gz\fR, it will first try +\fIdisk.img.gz.bmap\fR, then \fIdisk.img.bmap\fR and finally \fIdisk.bmap\fR. +The bmap file is only looked for in IMAGE's directory (or base URL, in case IMAGE was specified as an URL). If the bmap file is not found, \fIbmaptool\fR fails. To copy without bmap, use the "--nobmap" option. @@ -149,7 +153,9 @@ signature). .PP The detached signature can be specified with the "--bmap-sig" option, otherwise \fIbmaptool\fR tries to automatically discover it by looking for a file with -the same basename as the bmap file but with the ".asc" or ".sig" extension. +the same name as the bmap file but with the ".asc" or ".sig" extension. +If it was unable to find it that way, it will try filenames with each extension +of IMAGE removed and ".asc" or ".sig" added to it. This is very similar to the bmap file auto-discovery. So if a ".asc" or ".sig" file exists, \fIbmaptool\fR will verify the signature. diff --git a/src/bmaptool/BmapCopy.py b/src/bmaptool/BmapCopy.py index a28c3d9..f8f0a2f 100644 --- a/src/bmaptool/BmapCopy.py +++ b/src/bmaptool/BmapCopy.py @@ -246,7 +246,7 @@ def __init__(self, image, dest, bmap=None, image_size=None): self.mapped_percent = None self._f_bmap = None - self._f_bmap_path = None + self._bmap_path = None self._progress_started = None self._progress_index = None diff --git a/src/bmaptool/TransRead.py b/src/bmaptool/TransRead.py index f139f93..a9f95f6 100644 --- a/src/bmaptool/TransRead.py +++ b/src/bmaptool/TransRead.py @@ -600,7 +600,7 @@ def _print_warning(timeout): password = auth[2] except FileNotFoundError: pass - except netc.NetrcParseError as e: + except netrc.NetrcParseError as e: _log.error(f"Error parsing line {e.lineno} of {e.filename}: {e.msg}") if username and password: