(find (lambda (line) (string=? "DISTRIB_ID=Ubuntu" line))
(file-lines "/etc/lsb-release"))))
-(define (debian-architecture)
+(define (read-debian-architecture)
(car (shell-lines "dpkg-architecture -qDEB_TARGET_ARCH")))
(load-option 'regular-expression)
(close-output-port i/o))
(define (verify-host-debian-architecture host i/o)
- (let ((darch (read-reply '(debian-architecture) i/o)))
+ (let ((darch (read-reply '(read-debian-architecture) i/o)))
(if (not (string? darch))
(error "no Debian architecture"))
(if (not (string=? darch (host-debian-architecture host)))
(name plugin-name)
(directory plugin-directory))
-(define (host name user directory sarch darch os)
+(define (host name user directory arch os)
(let ((duplicate (find (lambda (h) (string=? name (host-name h)))
host-list)))
(if duplicate
(error (string "Host "name" already defined."))))
(set! host-list
(append! host-list
- (list (make-host name user directory sarch darch os))))
+ (list (make-host name user directory arch os))))
unspecific)
(define (hosts) (list-copy host-list))
n)))
(define-record-type <host>
- (make-host name user directory sarch darch os)
+ (make-host name user directory darch os)
host?
(name host-name)
(user host-user)
(directory host-directory)
- (sarch host-scheme-architecture)
(darch host-debian-architecture)
(os host-os))
(define (host-ubuntu? host)
(os-ubuntu? (host-os host)))
+(define (host-scheme-architecture darch)
+ (cond ((string=? "amd64" darch) "x86-64")
+ ((string=? "i386" darch) "i386")
+ (else (error "unknown Debian architecture:" darch))))
+
(define (host-ubuntu-codename host)
(ubuntu-os-codename (host-os host)))