emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#14941: closed (24.3.50; package.el should lighten


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14941: closed (24.3.50; package.el should lighten up wrt version specification)
Date: Thu, 13 Mar 2014 13:36:03 +0000

Your message dated Thu, 13 Mar 2014 09:35:48 -0400
with message-id <address@hidden>
and subject line Re: bug#14941: [Patch] Lighten up wrt version specification
has caused the debbugs.gnu.org bug report #14941,
regarding 24.3.50; package.el should lighten up wrt version specification
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14941: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14941
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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.
       (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 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'
 LDFLAGS='-Lc:/Devel/emacs/lib''



--- End Message ---
--- Begin Message --- Subject: Re: bug#14941: [Patch] Lighten up wrt version specification Date: Thu, 13 Mar 2014 09:35:48 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
> @@ -1128,6 +1128,8 @@
>                   ((symbolp dep) `(,dep "0"))
>                   ((stringp dep)
>                    (error "Invalid requirement specifier: %S" dep))
> +                 ((and (listp dep) (null (cdr dep)))
> +                  (list (car dep) "0"))
>                   (t dep)))
>                deps))))

I installed this hunk, but not the other.  If a "Version:" header is
missing, it should stay as an error, because package.el relies heavily
on version numbers.  And if the user can write "Version:" she can just
as easily write "Version:0".


        Stefan


--- End Message ---

reply via email to

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