Browse Source

dpkg: Print the archive filename when it cannot be accessed

Guillem Jover 10 years ago
parent
commit
250d932511
2 changed files with 3 additions and 1 deletions
  1. 1 0
      debian/changelog
  2. 2 1
      src/unpack.c

+ 1 - 0
debian/changelog

@@ -7,6 +7,7 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
   * Implement delete operator with size argument in dselect, required by the
     C++14 spec when the size-less delete operator is defined.
   * Use EACCES instead of EWOULDBLOCK for fcntl(2) F_SETLK in dselect.
+  * Print the archive filename when dpkg cannot access it.
   * Perl modules:
     - Add new CTRL_REPO_RELEASE control block type to Dpkg::Control.
     - Add new CTRL_COPYRIGHT_HEADER, CTRL_COPYRIGHT_FILES and

+ 2 - 1
src/unpack.c

@@ -541,7 +541,8 @@ void process_archive(const char *filename) {
 
   pfilename = summarize_filename(filename);
 
-  if (stat(filename,&stab)) ohshite(_("cannot access archive"));
+  if (stat(filename, &stab))
+    ohshite(_("cannot access archive '%s'"), filename);
 
   /* We can't ‘tentatively-reassemble’ packages. */
   if (!f_noact) {