diff options
author | Leo Famulari <leo@famulari.name> | 2017-06-29 18:02:17 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-06-29 18:02:17 -0400 |
commit | 1024c8119c71ba3ec0122238e8d8254b08d29187 (patch) | |
tree | ad12a1aac7f828791154a1786d4f245db71b46e9 /guix | |
parent | 92cb946bd9d78cb8f6aa8418d505f52da6894ab4 (diff) | |
parent | 95bbaa02aa63bc5eae36f686f1ed9915663aa4cf (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/cran.scm | 2 | ||||
-rw-r--r-- | guix/profiles.scm | 7 | ||||
-rw-r--r-- | guix/scripts/package.scm | 16 |
3 files changed, 18 insertions, 7 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 8d963a7475..056a7dcc7c 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -69,7 +69,7 @@ ("BSD_2_clause + file LICENSE" 'bsd-2) ("BSD_3_clause" 'bsd-3) ("BSD_3_clause + file LICENSE" 'bsd-3) - ("GPL" (list 'gpl2+ 'gpl3+)) + ("GPL" '(list gpl2+ gpl3+)) ("GPL (>= 2)" 'gpl2+) ("GPL (>= 3)" 'gpl3+) ("GPL-2" 'gpl2) diff --git a/guix/profiles.scm b/guix/profiles.scm index dcb5186c7a..056406e303 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -96,6 +96,7 @@ manifest-transaction-install-entry manifest-transaction-remove-pattern manifest-transaction-null? + manifest-transaction-removal-candidate? manifest-perform-transaction manifest-transaction-effects @@ -564,6 +565,12 @@ remove software." (($ <manifest-transaction> () ()) #t) (($ <manifest-transaction> _ _) #f))) +(define (manifest-transaction-removal-candidate? entry transaction) + "Return true if ENTRY is a candidate for removal in TRANSACTION." + (any (lambda (pattern) + ((entry-predicate pattern) entry)) + (manifest-transaction-remove transaction))) + (define (manifest-transaction-effects manifest transaction) "Compute the effect of applying TRANSACTION to MANIFEST. Return 4 values: the list of packages that would be removed, installed, upgraded, or downgraded diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 1f835ca5a5..58da3113a0 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -294,7 +294,11 @@ of relevance scores." (output (manifest-entry-output old))) transaction))) - (match entry + (match (if (manifest-transaction-removal-candidate? entry transaction) + 'dismiss + entry) + ('dismiss + transaction) (($ <manifest-entry> name version output (? string? path)) (match (vhash-assoc name (find-newest-available-packages)) ((_ candidate-version pkg . rest) @@ -492,7 +496,7 @@ Install, remove, or upgrade packages in a single transaction.\n")) (alist-cons 'do-not-upgrade arg result) result) arg-handler)))) - (option '("roll-back") #f #f + (option '("roll-back" "rollback") #f #f (lambda (opt name arg result arg-handler) (values (alist-cons 'roll-back? #t result) #f))) @@ -875,11 +879,11 @@ processed, #f otherwise." #:dry-run? dry-run?))))) opts) - ;; Then, process normal package installation/removal/upgrade. + ;; Then, process normal package removal/installation/upgrade. (let* ((manifest (profile-manifest profile)) - (step1 (options->installable opts manifest - (manifest-transaction))) - (step2 (options->removable opts manifest step1)) + (step1 (options->removable opts manifest + (manifest-transaction))) + (step2 (options->installable opts manifest step1)) (step3 (manifest-transaction (inherit step2) (install (map transform-entry |