(update-html-index plugins scmdocdir))))
(define (updated-plugin-list operation plugin scmlibdir)
- (let ((filename (string scmlibdir"plugins.scm")))
- (if (file-exists? filename) ;i.e. NOT in dpkg-buildpackage chroot
- (rewrite-file
- filename
- (lambda (in out)
- (cond ((eq? operation 'add)
- (let ((new (cons plugin (delete! plugin (read in)))))
- (write new out)
- new))
- ((eq? operation 'remove)
- (let ((new (delete! plugin (read in))))
- (write new out)
- new))
- (else
- (error "Unexpected plugin-list operation:" operation)))))
- (cond ((eq? operation 'add)
- (let ((new (list plugin)))
- (call-with-exclusive-output-file
- filename
- (lambda (out) (write new out)))
- new))
- ((eq? operation 'remove)
- (warn "plugin list not found:" filename)
- '())
- (else
- (error "Unexpected plugin-list operation:" operation))))))
+ (if (let ((filename (string scmlibdir"optiondb.scm")))
+ (file-exists? filename)) ;i.e. NOT in dpkg-buildpackage chroot
+ (let ((filename (string scmlibdir"plugins.scm")))
+ (if (file-exists? filename)
+ (rewrite-file
+ filename
+ (lambda (in out)
+ (cond ((eq? operation 'add)
+ (let ((new (cons plugin (delete! plugin (read in)))))
+ (write new out)
+ new))
+ ((eq? operation 'remove)
+ (let ((new (delete! plugin (read in))))
+ (write new out)
+ new))
+ (else
+ (error "Unexpected plugin-list operation:" operation)))))
+ (cond ((eq? operation 'add)
+ (let ((new (list plugin)))
+ (call-with-exclusive-output-file
+ filename
+ (lambda (out) (write new out)))
+ new))
+ ((eq? operation 'remove)
+ (warn "plugin list not found:" filename)
+ '())
+ (else
+ (error "Unexpected plugin-list operation:" operation)))))))
(define (delete-plugin-list)
(let ((path (merge-pathnames "plugins.scm"