diff options
| -rw-r--r-- | guix/scripts/package.scm | 14 | ||||
| -rw-r--r-- | tests/guix-package.sh | 19 |
2 files changed, 28 insertions, 5 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 1f835ca5a52..400623d41b0 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm | |||
| @@ -294,7 +294,11 @@ of relevance scores." | |||
| 294 | (output (manifest-entry-output old))) | 294 | (output (manifest-entry-output old))) |
| 295 | transaction))) | 295 | transaction))) |
| 296 | 296 | ||
| 297 | (match entry | 297 | (match (if (manifest-transaction-removal-candidate? entry transaction) |
| 298 | 'dismiss | ||
| 299 | entry) | ||
| 300 | ('dismiss | ||
| 301 | transaction) | ||
| 298 | (($ <manifest-entry> name version output (? string? path)) | 302 | (($ <manifest-entry> name version output (? string? path)) |
| 299 | (match (vhash-assoc name (find-newest-available-packages)) | 303 | (match (vhash-assoc name (find-newest-available-packages)) |
| 300 | ((_ candidate-version pkg . rest) | 304 | ((_ candidate-version pkg . rest) |
| @@ -875,11 +879,11 @@ processed, #f otherwise." | |||
| 875 | #:dry-run? dry-run?))))) | 879 | #:dry-run? dry-run?))))) |
| 876 | opts) | 880 | opts) |
| 877 | 881 | ||
| 878 | ;; Then, process normal package installation/removal/upgrade. | 882 | ;; Then, process normal package removal/installation/upgrade. |
| 879 | (let* ((manifest (profile-manifest profile)) | 883 | (let* ((manifest (profile-manifest profile)) |
| 880 | (step1 (options->installable opts manifest | 884 | (step1 (options->removable opts manifest |
| 881 | (manifest-transaction))) | 885 | (manifest-transaction))) |
| 882 | (step2 (options->removable opts manifest step1)) | 886 | (step2 (options->installable opts manifest step1)) |
| 883 | (step3 (manifest-transaction | 887 | (step3 (manifest-transaction |
| 884 | (inherit step2) | 888 | (inherit step2) |
| 885 | (install (map transform-entry | 889 | (install (map transform-entry |
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 5ecb33193fe..99952f130cf 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh | |||
| @@ -279,8 +279,27 @@ guix package --bootstrap --install-from-file="$module_dir/package.scm" | |||
| 279 | test "`guix package -A super-non-portable-emacs`" = "" | 279 | test "`guix package -A super-non-portable-emacs`" = "" |
| 280 | test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: " | 280 | test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: " |
| 281 | 281 | ||
| 282 | # Don't upgrade packages marked for removal: <http://bugs.gnu.org/27262>. | ||
| 283 | guix package --bootstrap -p "$profile" -i guile-bootstrap | ||
| 284 | |||
| 285 | cat > "$module_dir/foo.scm"<<EOF | ||
| 286 | (define-module (foo) | ||
| 287 | #:use-module (guix) | ||
| 288 | #:use-module (gnu packages bootstrap)) | ||
| 289 | |||
| 290 | (define-public x | ||
| 291 | (package (inherit %bootstrap-guile) (version "42"))) | ||
| 292 | EOF | ||
| 293 | |||
| 294 | guix package --bootstrap -p "$profile" -r guile-bootstrap -u guile | ||
| 295 | test ! -f "$profile/bin/guile" | ||
| 296 | guix package --bootstrap -p "$profile" --roll-back | ||
| 297 | test -f "$profile/bin/guile" | ||
| 298 | rm "$profile-2-link" | ||
| 299 | |||
| 282 | unset GUIX_PACKAGE_PATH | 300 | unset GUIX_PACKAGE_PATH |
| 283 | 301 | ||
| 302 | |||
| 284 | # Using 'GUIX_BUILD_OPTIONS'. | 303 | # Using 'GUIX_BUILD_OPTIONS'. |
| 285 | available="`guix package -A | sort`" | 304 | available="`guix package -A | sort`" |
| 286 | GUIX_BUILD_OPTIONS="--dry-run --no-grafts" | 305 | GUIX_BUILD_OPTIONS="--dry-run --no-grafts" |
