unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14941: 24.3.50; package.el should lighten up wrt version specification
@ 2013-07-23 17:32 Drew Adams
  2014-02-20 23:19 ` bug#14941: [Patch] Lighten " Tom Willemse
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2013-07-23 17:32 UTC (permalink / raw)
  To: 14941

File headers are for human readers too, not just for tools.

1. `package-buffer-info' should treat "Version: " as "Version: 0"

`package-buffer-info' has this code, which is the wrong thing to do:

(let* ((requires-str (lm-header "package-requires"))
        ;; Prefer Package-Version; if defined, the package author
        ;; probably wants us to use it.  Otherwise try Version.
       (pkg-version
         (or (package-strip-rcs-id (lm-header "package-version"))
             (package-strip-rcs-id (lm-header "version")))))
  (unless pkg-version
    (error "Package lacks a \"Version\" or \"Package-Version\" header"))

A user should be able to use "Version: ", i.e., specify explicitly that
there is no version, and have that be treated the same as "Version: 0".
Version is not just for package.el.  It is a field that conveys
versioning info to human readers.  An empty Version field can be used to
indicate explicitly that the file is not versioned.

2. More generally, package.el should treat the lack of a version spec
the same way it currently treats version 0.  If Package-Requires
specifies "0" for some file, it means that ANY version of that file is
OK, and that should apply also to a lack of a version spec for that
file.

Package-Requires should be able to specify that there is a dependency on
a particular file, by name, but any copy of that file will do - any
version or any copy that has no version specified.  It is important to
be able to express this kind of dependency - any foo.el and not any
specific version of foo.el - and it in no way limits package.el to allow
this.

3. In keeping with #2, package.el should allow Package-Requires, like
Version, to lack a version number for a given file, and have that be
interpreted as version "0" for that file, meaning that any version of
the file will do.  IOW, allow this:

;; Package-Requires ((foo.el))

to mean the same as this:

;; Package-Requires ((foo.el "0"))


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-07-14 on ODIEONE
Bzr revision: 113423 lekktu@gmail.com-20130715004922-i67tg2ois14h3fpm
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 CFLAGS='-O0 -g3' CPPFLAGS='-Ic:/Devel/emacs/include'
 LDFLAGS='-Lc:/Devel/emacs/lib''





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

end of thread, other threads:[~2014-03-16 22:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23 17:32 bug#14941: 24.3.50; package.el should lighten up wrt version specification Drew Adams
2014-02-20 23:19 ` bug#14941: [Patch] Lighten " Tom Willemse
2014-03-13 13:35   ` Stefan Monnier
2014-03-13 15:42     ` Drew Adams
2014-03-13 22:12       ` Stefan Monnier
2014-03-13 23:57         ` Drew Adams
2014-03-14 13:18           ` Stefan Monnier
2014-03-16 22:15             ` Drew Adams

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).