From 9999d72645e9a70a1ad59602e43c7f5bcc8d081c Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Wed, 28 Nov 2018 18:25:21 -0700 Subject: [PATCH] Fix merge: Do not install scmdocdir/plugins.scm in Debian package. Punted update-plugin-lib/doc and avoided the need for a redundant scmdocdir/plugins.scm. --- src/ffi/build.scm | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/src/ffi/build.scm b/src/ffi/build.scm index 40d71368b..e1c3bb450 100644 --- a/src/ffi/build.scm +++ b/src/ffi/build.scm @@ -36,13 +36,15 @@ USA. (update-plugin 'remove name project infodir scmlibdir scmdocdir)) (define (update-plugin operation name project infodir scmlibdir scmdocdir) - (let ((infodir (normal-dirname infodir)) - (scmlibdir (normal-dirname scmlibdir)) + (let ((scmlibdir (->namestring (pathname-as-directory scmlibdir))) + (infodir (normal-dirname infodir)) (scmdocdir (normal-dirname scmdocdir))) - (if scmlibdir - (update-plugin-lib operation name project scmlibdir)) - (if scmdocdir - (update-plugin-doc operation name project infodir scmdocdir)))) + (if (file-exists? (string scmlibdir"optiondb.scm")) + ;; NOT in dpkg-buildpackage's chroot + (let ((plugins (update-plugins-file operation name scmlibdir))) + (update-optiondb plugins scmlibdir) + (update-info-index project plugins infodir scmdocdir) + (update-html-index project plugins scmdocdir))))) (define (delete-plugin-list) ;; For the prerm script: delete the database of plugins (plugins.scm @@ -56,16 +58,13 @@ USA. ;; For the postinst script: re-initialize the optiondb, Info and ;; HTML indices using the list of currently installed plugins. (The ;; indices are presumed clobbered by the core upgrade.) - (let ((infodir (normal-dirname infodir)) - (scmlibdir (normal-dirname scmlibdir)) + (let ((scmlibdir (->namestring (pathname-as-directory scmlibdir))) + (infodir (normal-dirname infodir)) (scmdocdir (normal-dirname scmdocdir))) - (if scmlibdir - (update-optiondb (read-plugins-file scmlibdir) - scmlibdir)) - (if scmdocdir - (let ((plugins (read-plugins-file scmdocdir))) - (update-info-index project plugins infodir scmdocdir) - (update-html-index project plugins scmdocdir))))) + (let ((plugins (read-plugins-file scmlibdir))) + (update-optiondb plugins scmlibdir) + (update-info-index project plugins infodir scmdocdir) + (update-html-index project plugins scmdocdir)))) (define (normal-dirname dirname) (and dirname @@ -73,18 +72,6 @@ USA. (string-null? dirname))) (->namestring (pathname-as-directory dirname)))) -(define (update-plugin-lib operation name project scmlibdir) - (declare (ignore project)) - (if (file-exists? (string scmlibdir"optiondb.scm")) - ;; NOT in dpkg-buildpackage's chroot - (update-optiondb (update-plugins-file operation name scmlibdir) - scmlibdir))) - -(define (update-plugin-doc operation name project infodir scmdocdir) - (let ((plugins (update-plugins-file operation name scmdocdir))) - (update-info-index project plugins infodir scmdocdir) - (update-html-index project plugins scmdocdir))) - (define (read-plugins-file dir) (let ((filename (string dir"plugins.scm"))) (if (file-exists? filename) -- 2.25.1