Merge debian bugfix.

This commit is contained in:
Dimitri Fontaine 2014-11-03 14:15:11 +01:00
commit da70aaf481
2 changed files with 16 additions and 5 deletions

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
<<<<<<< HEAD
=======
pgloader (3.1.1+dfsg-1) unstable; urgency=medium
* Fix --root-dir option when target directory doesn't exists (Closes:#767288)
-- Dimitri Fontaine <dim@tapoueh.org> Mon, 03 Nov 2014 16:08:19 +0300
>>>>>>> rel_3_1_stable
pgloader (3.1.0+dfsg-3) unstable; urgency=medium pgloader (3.1.0+dfsg-3) unstable; urgency=medium
* Fix build dependencies problems, see Bug#765162 * Fix build dependencies problems, see Bug#765162

View File

@ -56,7 +56,10 @@
"Create a directory at given PATH and exit with an error message when "Create a directory at given PATH and exit with an error message when
that's not possible." that's not possible."
(handler-case (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) (condition (e)
;; any error here is a panic ;; any error here is a panic
(if debug (if debug
@ -171,10 +174,9 @@
;; First care about the root directory where pgloader is supposed to ;; First care about the root directory where pgloader is supposed to
;; output its data logs and reject files ;; output its data logs and reject files
(let ((root-dir-truename (probe-file root-dir))) (let ((root-dir-truename (or (probe-file root-dir)
(if root-dir-truename (mkdir-or-die root-dir debug))))
(setf *root-dir* (fad:pathname-as-directory root-dir-truename)) (setf *root-dir* (uiop:ensure-directory-pathname root-dir-truename)))
(mkdir-or-die *root-dir* debug)))
;; Set parameters that come from the environement ;; Set parameters that come from the environement
(init-params-from-environment) (init-params-from-environment)