From 03b2291332feeeab2b0380067163c0834f92190c Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 28 Oct 2014 10:51:36 +0100 Subject: [PATCH 1/2] Rebuild with the new (fixed) dependencies. --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d471ab4..70d30db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pgloader (3.1.0+dfsg-3) unstable; urgency=medium + + * Fix build dependencies problems, see Bug#765162 + + -- Dimitri Fontaine Tue, 28 Oct 2014 12:41:23 +0300 + pgloader (3.1.0+dfsg-2) unstable; urgency=medium * Fix building on i386 machines, using 1GB of dynamic space there. From 4916e67a9e982236844c24c0e86284227152ae33 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Mon, 3 Nov 2014 14:08:51 +0100 Subject: [PATCH 2/2] Fix --root-dir debian reported bug #767288 --- debian/changelog | 6 ++++++ src/main.lisp | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 70d30db..45373f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pgloader (3.1.1+dfsg-1) unstable; urgency=medium + + * Fix --root-dir option when target directory doesn't exists (Closes:#767288) + + -- Dimitri Fontaine Mon, 03 Nov 2014 16:08:19 +0300 + pgloader (3.1.0+dfsg-3) unstable; urgency=medium * Fix build dependencies problems, see Bug#765162 diff --git a/src/main.lisp b/src/main.lisp index 94a06ba..ca8b71f 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -56,7 +56,10 @@ "Create a directory at given PATH and exit with an error message when that's not possible." (handler-case - (ensure-directories-exist path) + (let ((dir (uiop:ensure-directory-pathname path))) + (when debug + (format stream "mkdir -p ~s~%" dir)) + (uiop:parse-unix-namestring (ensure-directories-exist dir))) (condition (e) ;; any error here is a panic (if debug @@ -171,10 +174,9 @@ ;; First care about the root directory where pgloader is supposed to ;; output its data logs and reject files - (let ((root-dir-truename (probe-file root-dir))) - (if root-dir-truename - (setf *root-dir* (fad:pathname-as-directory root-dir-truename)) - (mkdir-or-die *root-dir* debug))) + (let ((root-dir-truename (or (probe-file root-dir) + (mkdir-or-die root-dir debug)))) + (setf *root-dir* (uiop:ensure-directory-pathname root-dir-truename))) ;; Set parameters that come from the environement (init-params-from-environment)