GNU bug report logs -
#14118
[PATCH] Add pinning support for packages
Previous Next
Reported by: Yann Hodique <yann.hodique <at> gmail.com>
Date: Mon, 1 Apr 2013 18:43:02 UTC
Severity: wishlist
Tags: patch
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#14118: [PATCH] Add pinning support for packages
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 14118 <at> debbugs.gnu.org.
--
14118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14118
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> Add pinning support for packages
Installed (with tiny comment style fix), thank you.
You might like to sign a copyright assignment for Emacs if you intend to
contribute further patches,
Stefan
[Message part 3 (message/rfc822, inline)]
Add pinning support for packages
With the current code, the greatest available version of a package wins,
even across repositories.
This can be a problem with repositories such as melpa
(http://melpa.milkbox.net/) that generate packages directly from source
control, thus taking always precedence over released version
of packages. It would be nice to give users the ability to live on the
bleeding edge only for some packages, and stick to more controlled
versions for others. This change provides a way to do that, by allowing
"pinning" a package to a given repository. In particular, this allows
users to store well-known versions of packages in a private repository,
while relying on public ones to provide others.
2013-04-01 Yann Hodique <yann.hodique <at> gmail.com>
Add pinning feature to package.el
* lisp/emacs-lisp/package.el: bump version to 1.0.1
(package-pinned-packages): new custom variable to hold pinning data
(package--add-to-archive-contents): don't add the package if it doesn't
fit the pinning requirements
*** /var/folders/5v/p46z8rl56452tz_1c_fm_zmr0000gn/T//ECKODq_package.el 2013-04-01 19:35:32.000000000 +0100
--- lisp/emacs-lisp/package.el 2013-04-01 19:20:21.000000000 +0100
***************
*** 4,10 ****
;; Author: Tom Tromey <tromey <at> redhat.com>
;; Created: 10 Mar 2007
! ;; Version: 1.0
;; Keywords: tools
;; This file is part of GNU Emacs.
--- 4,10 ----
;; Author: Tom Tromey <tromey <at> redhat.com>
;; Created: 10 Mar 2007
! ;; Version: 1.0.1
;; Keywords: tools
;; This file is part of GNU Emacs.
*************** a package can run arbitrary code."
*** 234,244 ****
:group 'package
:version "24.1")
(defconst package-archive-version 1
"Version number of the package archive understood by this file.
Lower version numbers than this will probably be understood as well.")
! (defconst package-el-version "1.0"
"Version of package.el.")
;; We don't prime the cache since it tends to get out of date.
--- 234,261 ----
:group 'package
:version "24.1")
+ (defcustom package-pinned-packages nil
+ "An alist of packages that are pinned to a specific archive
+
+ Each element has the form (SYM . ID).
+ SYM is a package, as a symbol.
+ ID is an archive name, as a string. This should correspond to an
+ entry in `package-archives'.
+
+ If the archive of name ID does not contain the package SYM, no
+ other location will be considered, which will make the
+ package unavailable."
+ :type '(alist :key-type (symbol :tag "Package")
+ :value-type (string :tag "Archive name"))
+ :risky t
+ :group 'package
+ :version "24.4")
+
(defconst package-archive-version 1
"Version number of the package archive understood by this file.
Lower version numbers than this will probably be understood as well.")
! (defconst package-el-version "1.0.1"
"Version of package.el.")
;; We don't prime the cache since it tends to get out of date.
*************** Also, add the originating archive to the
*** 857,864 ****
(version (package-desc-vers (cdr package)))
(entry (cons name
(vconcat (cdr package) (vector archive))))
! (existing-package (assq name package-archive-contents)))
! (cond ((not existing-package)
(add-to-list 'package-archive-contents entry))
((version-list-< (package-desc-vers (cdr existing-package))
version)
--- 874,886 ----
(version (package-desc-vers (cdr package)))
(entry (cons name
(vconcat (cdr package) (vector archive))))
! (existing-package (assq name package-archive-contents))
! (pinned-to-archive (assoc name package-pinned-packages)))
! (cond ((and pinned-to-archive
! ;; if pinned to another archive, skip entirely
! (not (equal (cdr pinned-to-archive) archive)))
! nil)
! ((not existing-package)
(add-to-list 'package-archive-contents entry))
((version-list-< (package-desc-vers (cdr existing-package))
version)
--
One uses power by grasping it lightly. To grasp with too much force is to be
taken over by power, thus becoming its victim.
-- Bene Gesserit Axiom
This bug report was last modified 12 years and 55 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.