[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14941: 24.3.50; package.el should lighten up wrt version specificati

From: Drew Adams
Subject: bug#14941: 24.3.50; package.el should lighten up wrt version specification
Date: Tue, 23 Jul 2013 10:32:33 -0700 (PDT)

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

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

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 (i686-pc-mingw32)
 of 2013-07-14 on ODIEONE
Bzr revision: 113423 address@hidden
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'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]