unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46841: [PATCH] Make package downloading in inversion.el obsolete
@ 2021-03-01  4:30 Stefan Kangas
  2021-03-01 13:00 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2021-03-01  4:30 UTC (permalink / raw)
  To: 46841

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

Severity: wishlist

There is some code to download packages in cedet/inversion.el which
seems completely redundant now that we have package.el.  I suggest
marking that part as obsolete, see the attached patch.

To be honest, I don't exactly see that there is any need for
inversion.el since the problem it tries to solve is already solved by
package.el.  Perhaps we should just move the entire library to
obsolete/.

[-- Attachment #2: 0001-Make-package-downloading-in-inversion.el-obsolete.patch --]
[-- Type: text/x-diff, Size: 5333 bytes --]

From 66fec856d110c61964f1ab4729d58317f29abcb2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Mon, 1 Mar 2021 05:10:21 +0100
Subject: [PATCH] Make package downloading in inversion.el obsolete

* lisp/cedet/inversion.el (inversion-incompatible-version)
(inversion-locate-package-files, inversion-package-common-tails)
(inversion-locate-package-files-and-split)
(inversion-download-package-ask): Make obsolete.  Fix callers.
(inversion-require): Update advertised calling convention to no
longer support downloading packages.  Doc fix.
---
 lisp/cedet/inversion.el | 45 +++++++++--------------------------------
 1 file changed, 10 insertions(+), 35 deletions(-)

diff --git a/lisp/cedet/inversion.el b/lisp/cedet/inversion.el
index 2ef7e0df96..1e1bda4503 100644
--- a/lisp/cedet/inversion.el
+++ b/lisp/cedet/inversion.el
@@ -22,7 +22,7 @@
 ;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;;
+
 ;; Keeping track of rapidly developing software is a tough thing to
 ;; do, especially if you want to have co-dependent packages which all
 ;; move at different rates.
@@ -61,9 +61,6 @@
 ;; 		  (intern-soft (concat (symbol-string p) "-version"))))))
 ;;
 ;; Or modify to specify `inversion-require' instead.
-;;
-;; TODO:
-;;  Offer to download newer versions of a package.
 
 ;;; History:
 ;;
@@ -76,6 +73,7 @@ inversion-version
 
 (defvar inversion-incompatible-version "0.1alpha1"
   "An earlier release which is incompatible with this release.")
+(make-obsolete-variable 'inversion-incompatible-version nil "28.1")
 
 (defconst inversion-decoders
   '(
@@ -332,11 +330,9 @@ inversion-require
 				  &rest reserved)
   "Declare that you need PACKAGE with at least VERSION.
 PACKAGE might be found in FILE.  (See `require'.)
-Throws an error if VERSION is incompatible with what is installed.
-Optional argument DIRECTORY is a location where new versions of
-this tool can be located.  If there is a versioning problem and
-DIRECTORY is provided, inversion will offer to download the file.
-Optional argument RESERVED is saved for later use."
+Throws an error if VERSION is incompatible with what is installed."
+  (declare (advertised-calling-convention
+            (package version &optional file) "28.1"))
   (require package file)
   (let ((err (inversion-test package version)))
     (when err
@@ -443,7 +439,7 @@ inversion-add-to-load-path
 	      (error "Outdated %s %s just installed" package (car newver)))
 	  )))))
 
-;;; URL and downloading code
+;;; Obsolete URL and downloading code
 ;;
 (defun inversion-locate-package-files (package directory &optional version)
   "Get a list of distributions of PACKAGE from DIRECTORY.
@@ -455,6 +451,7 @@ inversion-locate-package-files
 ;;DIRECTORY should also allow a URL:
 ;; \"http://ftp1.sourceforge.net/PACKAGE\"
 ;; but then I can get file listings easily.
+  (declare (obsolete nil "28.1"))
   (if (symbolp package) (setq package (symbol-name package)))
   (directory-files directory t
 		   (if version
@@ -467,6 +464,7 @@ inversion-package-common-tails
 					 ".gz"
 					 )
   "Common distribution mechanisms for Emacs Lisp packages.")
+(make-obsolete-variable 'inversion-package-common-tails nil "28.1")
 
 (defun inversion-locate-package-files-and-split (package directory &optional version)
   "Use `inversion-locate-package-files' to get a list of PACKAGE files.
@@ -474,6 +472,7 @@ inversion-locate-package-files-and-split
 VERSION is an optional argument specifying a version to restrict to.
 The return list is an alist with the version string in the CAR,
 and the full path name in the CDR."
+  (declare (obsolete nil "28.1"))
   (if (symbolp package) (setq package (symbol-name package)))
   (let ((f (inversion-locate-package-files package directory version))
 	(out nil))
@@ -499,6 +498,7 @@ inversion-locate-package-files-and-split
 (defun inversion-download-package-ask (err package directory version)
   "Due to ERR, offer to download PACKAGE from DIRECTORY.
 The package should have VERSION available for download."
+  (declare (obsolete package-install "28.1"))
   (if (symbolp package) (setq package (symbol-name package)))
   (let ((files (inversion-locate-package-files-and-split
 		package directory version)))
@@ -524,31 +524,6 @@ inversion-download-package-ask
 
 	  (copy-file (cdr (car files)) dest))))))
 
-;;; How we upgrade packages in Emacs has yet to be ironed out.
-
-;; (defun inversion-upgrade-package (package &optional directory)
-;;   "Try to upgrade PACKAGE in DIRECTORY is available."
-;;   (interactive "sPackage to upgrade: ")
-;;   (if (stringp package) (setq package (intern package)))
-;;   (if (not directory)
-;;       ;; Hope that the package maintainer specified.
-;;       (setq directory (symbol-value (or (intern-soft
-;; 					 (concat (symbol-name package)
-;; 						 "-url"))
-;; 					(intern-soft
-;; 					 (concat (symbol-name package)
-;; 						 "-directory"))))))
-;;   (let ((files (inversion-locate-package-files-and-split
-;; 		package directory))
-;; 	(cver (inversion-package-version package))
-;; 	(newer nil))
-;;     (mapc (lambda (f)
-;; 	    (if (inversion-< cver (inversion-decode-version (car f)))
-;; 		(setq newer (cons f newer))))
-;; 	    files)
-;;     newer
-;;     ))
-
 (provide 'inversion)
 
 ;;; inversion.el ends here
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-03 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01  4:30 bug#46841: [PATCH] Make package downloading in inversion.el obsolete Stefan Kangas
2021-03-01 13:00 ` Lars Ingebrigtsen
2021-03-01 16:08   ` Stefan Kangas
2021-03-02 22:13     ` Eric Ludlam
2021-03-03 19:02       ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).