From 81f5f95e1d7324742fa8a55719dc048a27e2e70d Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 23 Nov 2013 23:06:52 +0100 Subject: [PATCH] Get rid of the local Postmodern patch, use a bare local git clone. Issue https://github.com/marijnh/Postmodern/issues/39 is now fixed! After next Quicklisp release, we should be able to remove the whole special treatment of Postmodern in pgloader. --- Makefile | 11 ++-------- README.md | 6 +---- patches/postmodern-send-copy-done.patch | 29 ------------------------- 3 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 patches/postmodern-send-copy-done.patch diff --git a/Makefile b/Makefile index 925fe2f..64ddd1b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -# pgloader build tools - -POMO_PATCH = $(realpath patches/postmodern-send-copy-done.patch) +# pgloader build tool ASDF_CONFD = ~/.config/common-lisp/source-registry.conf.d ASDF_CONF = $(ASDF_CONFD)/projects.conf @@ -19,18 +17,13 @@ docs: ~/quicklisp/local-projects/cl-abnf: git clone https://github.com/dimitri/cl-abnf.git $@ -~/quicklisp/local-projects/cl-db3: - git clone https://github.com/dimitri/cl-db3.git $@ - ~/quicklisp/local-projects/Postmodern: git clone https://github.com/marijnh/Postmodern.git $@ - cd ~/quicklisp/local-projects/Postmodern/ && patch -p1 < $(POMO_PATCH) ~/quicklisp/local-projects/cl-csv: git clone -b empty-strings-and-nil https://github.com/dimitri/cl-csv.git $@ cl-abnf: ~/quicklisp/local-projects/cl-abnf ; -cl-db3: ~/quicklisp/local-projects/cl-db3 ; cl-csv: ~/quicklisp/local-projects/cl-csv ; postmodern: ~/quicklisp/local-projects/Postmodern ; @@ -48,7 +41,7 @@ $(ASDF_CONF): asdf-config: $(ASDF_CONF) ; -$(LIBS): quicklisp $(ASDF_CONF) cl-abnf cl-db3 postmodern cl-csv +$(LIBS): quicklisp $(ASDF_CONF) cl-abnf postmodern cl-csv sbcl --load ~/quicklisp/setup.lisp \ --eval '(ql:quickload "pgloader")' \ --eval '(quit)' diff --git a/README.md b/README.md index ff6650f..e2be50c 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,7 @@ irrelevant. The current version of the code depends on a recent version of [Postmodern](http://marijnhaverbeke.nl/postmodern/postmodern.html) not found -in Quicklisp yet at the time of this writing. Currently the pgloader source -tree contains a patch to apply against postmodern sources, and the -`Makefile` will do the following for you: - -Read https://github.com/marijnh/Postmodern/issues/39 for details. +in Quicklisp yet at the time of this writing. #### cl-csv diff --git a/patches/postmodern-send-copy-done.patch b/patches/postmodern-send-copy-done.patch deleted file mode 100644 index 221489d..0000000 --- a/patches/postmodern-send-copy-done.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/cl-postgres/bulk-copy.lisp b/cl-postgres/bulk-copy.lisp -index f8efdb3..0f020d6 100644 ---- a/cl-postgres/bulk-copy.lisp -+++ b/cl-postgres/bulk-copy.lisp -@@ -120,13 +120,18 @@ - (with-syncing - (copy-done-message socket) - (force-output socket) -- (message-case socket -- (#\C (let* ((command-tag (read-str socket)) -- (space (position #\Space command-tag :from-end t))) -- (when space -- (parse-integer command-tag :junk-allowed t :start (1+ space)))))) -+ (handler-case -+ (message-case socket -+ (#\C (let* ((command-tag (read-str socket)) -+ (space (position #\Space command-tag :from-end t))) -+ (when space -+ (parse-integer command-tag :junk-allowed t :start (1+ space)))))) -+ (condition (e) -+ ;; In case of error in the COPY stream we need to wait for an -+ ;; explicit ReadyForQuery message. Then we re-signal the error. -+ (message-case socket (#\Z (read-uint1 socket))) -+ (error e))) - (loop (message-case socket - (#\Z (read-uint1 socket) - (return-from send-copy-done)) - (t :skip))))) --