(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
;; 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
(string-null? dirname)))
(->namestring (pathname-as-directory dirname))))
\f
-(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)