diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-11-14 21:20:46 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-11-14 21:20:46 +0100 |
commit | 79ee97a144aaaa890be0724aaf796e2a771179d7 (patch) | |
tree | fddd2f20003d60e42eed7a614acea91a13d854d7 /guix/scripts | |
parent | 7d9d521fbcf1423f66d6f33208c03d5dacb7ba50 (diff) | |
parent | e921993c25626541385f191f0463cad8e5e5c5c7 (diff) | |
download | guix-patches-79ee97a144aaaa890be0724aaf796e2a771179d7.tar guix-patches-79ee97a144aaaa890be0724aaf796e2a771179d7.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/package.scm | 10 | ||||
-rw-r--r-- | guix/scripts/system.scm | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 500fc9ac90..5743816324 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -771,9 +771,13 @@ processed, #f otherwise." (('show requested-name) (let-values (((name version) (package-name->name+version requested-name))) - (leave-on-EPIPE - (for-each (cute package->recutils <> (current-output-port)) - (find-packages-by-name name version))) + (match (find-packages-by-name name version) + (() + (leave (G_ "~a~@[@~a~]: package not found~%") name version)) + (packages + (leave-on-EPIPE + (for-each (cute package->recutils <> (current-output-port)) + packages)))) #t)) (('search-paths kind) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index d2be0cf8fb..9ba9428a08 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -235,6 +235,13 @@ When INSTALL-BOOTLOADER? is true, install bootloader using BOOTCFG." the ownership of '~a' may be incorrect!~%") target)) + ;; If a previous installation was attempted, make sure we start anew; in + ;; particular, we don't want to keep a store database that might not + ;; correspond to what we're actually putting in the store. + (let ((state (string-append target "/var/guix"))) + (when (file-exists? state) + (delete-file-recursively state))) + (chmod target #o755) (let ((os-dir (derivation->output-path os-drv)) (format (lift format %store-monad)) |