This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=49c8d396ff36fd0c21f2a7a082ebf1d9b609e22b

commit 49c8d396ff36fd0c21f2a7a082ebf1d9b609e22b
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Mar 20 05:21:11 2019 +0100

    dpkg-split: Cope with a missing parts/ database directory
    
    When trying to scan the parts/ directory, we should gracefully cope with
    it being missing, which can be the case when bootstrapping this package
    on a new system. Or when using an different administrative directory.
---
 debian/changelog   | 1 +
 dpkg-split/queue.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 644593e5e..3651ef6a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
   * dpkg-buildpackage: Add option to sanitize environment. Closes: #843776
   * update-alternatives: Cope with a missing administrative directory.
   * update-alternatives: Create the administrative directory on demand.
+  * dpkg-split: Cope with a missing parts/ database directory.
   * Perl modules:
     - Dpkg::Source::Package: Verify original tarball signatures at build time.
     - Dpkg::BuildFlags: Add new unset() method.
diff --git a/dpkg-split/queue.c b/dpkg-split/queue.c
index 145c9f503..fbd743caf 100644
--- a/dpkg-split/queue.c
+++ b/dpkg-split/queue.c
@@ -92,8 +92,12 @@ scandepot(void)
   struct partqueue *queue = NULL;
 
   depot = opendir(opt_depotdir);
-  if (!depot)
+  if (!depot) {
+    if (errno == ENOENT)
+      return NULL;
+
     ohshite(_("unable to read depot directory '%.250s'"), opt_depotdir);
+  }
   while ((de= readdir(depot))) {
     struct partqueue *pq;
     char *p;

-- 
Dpkg.Org's dpkg

Reply via email to