From 5c32748ead944a3db2ee6d2acd057151414c76f3 Mon Sep 17 00:00:00 2001 From: Jen-Chieh Shen Date: Thu, 26 Jan 2023 11:59:22 +0800 Subject: [PATCH] fix: Package `x` is unavailable issue from snapshot (#111) --- lisp/core/install.el | 4 +++- lisp/core/reinstall.el | 6 ++++-- lisp/core/uninstall.el | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/core/install.el b/lisp/core/install.el index 1cab927d..a31ac0c5 100644 --- a/lisp/core/install.el +++ b/lisp/core/install.el @@ -36,7 +36,9 @@ installed s skipped))) (eask-start - (eask-defvc< 27 (eask-pkg-init)) ; XXX: remove this after we drop 26.x + ;; XXX: You must refresh content before you install the package, + ;; see https://github.com/ericdallo/jet.el/issues/1 + (eask-pkg-init) (if-let ((names (eask-args))) ;; If package [name..] are specified, we try to install it (eask--install-packages names) diff --git a/lisp/core/reinstall.el b/lisp/core/reinstall.el index a380bcd9..ad83b3ae 100644 --- a/lisp/core/reinstall.el +++ b/lisp/core/reinstall.el @@ -40,9 +40,11 @@ (if-let* ((name (intern (eask-guess-package-name))) ((package-installed-p name))) (progn - (eask-package-reinstall name) + (eask-call "core/uninstall") (eask-msg "") - (eask-info "(Reinstalled %s)" name)) + (eask-call "core/install") + (eask-msg "") + (eask-info "(Package `%s' reinstalled.)" name)) (eask-msg "") (eask-info "✗ (No packages have been reintalled)") (eask-help "core/reinstall")))) diff --git a/lisp/core/uninstall.el b/lisp/core/uninstall.el index e337ddaa..d2efe61a 100644 --- a/lisp/core/uninstall.el +++ b/lisp/core/uninstall.el @@ -41,7 +41,7 @@ (progn (eask-package-delete name) (eask-msg "") - (eask-info "(Deleted %s)" name)) + (eask-info "(Package `%s' deleted.)" name)) (eask-info "✗ (No packages have been unintalled)") (eask-help "core/uninstall"))))