Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320021 - app-editors/emacs-vcs-24.0.9999 upstream change breaks ebuild FULL_VERSION variable
Summary: app-editors/emacs-vcs-24.0.9999 upstream change breaks ebuild FULL_VERSION va...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-16 18:13 UTC by Jeff Kowalczyk
Modified: 2010-05-19 07:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emacs-vcs-24.0.9999.ebuild patch - change FULL_VERSION grep method (emacs_version.patch,537 bytes, patch)
2010-05-16 18:31 UTC, Jeff Kowalczyk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Kowalczyk 2010-05-16 18:13:36 UTC
emacs-vcs-24.0.999 (bzr trunk) broke on or about upstream r100306. The source emacs lisp the ebuild used to calculate is variable FULL_VERSION was changed:

grep "Cannot determine current Emacs version" /usr/portage/app-editors/emacs-vcs/emacs-vcs-24.0.9999.ebuild -B 4 -A 5
src_prepare() {
        if [ "${PV##*.}" = "9999" ]; then
                FULL_VERSION=$(grep 'defconst[   ]*emacs-version' lisp/version.el \
                        | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/')
(DIES HERE)     [ "${FULL_VERSION}" ] || die "Cannot determine current Emacs version"
                echo
                einfo "Emacs branch: ${EMACS_BRANCH}"
                einfo "Emacs version number: ${FULL_VERSION}"
                [ "${FULL_VERSION%.*}" = ${PV%.*} ] \
                        || die "Upstream version number changed to ${FULL_VERSION}"

--------

revno: 100306 [merge]
committer: Ken Raeburn <raeburn@raeburn.org>
branch nick: trunk
timestamp: Sat 2010-05-15 17:21:30 -0400
message:
  Fixes related to CANNOT_DUMP mode, and a floating-point bug fix.
  
  Handle --version reasonably in CANNOT_DUMP configuration.
  * src/emacs.c (emacs_version, emacs_copyright): New string
  variables.
  (Vemacs_version, Vemacs_copyright): New Lisp_Object variables.
  (syms_of_emacs): Defvar them, and initialize them from the C
  string variables.
  (main): If initialization hasn't been done, print initial version
  info from the C strings, instead of starting an interactive session.
  * lisp/version.el (emacs-copyright, emacs-version): Don't define
  here.
  * configure.in: Look for version string in its new place.
  
  * admin: Update scripts and text to refer to version number string in emacs.c
  instead of version.el.
  
  * src/emacs.c (main): Initialize initial-environment and process-environment
  before generating from env, not after.
  
  * src/lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue. (bug#5916)
  (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise.

---------

Although the mechanism may still be changing, the desired string can be found in a number of places currently:

# grep -R -e "24\.0\.5" *
configure:# Generated by GNU Autoconf 2.62 for emacs 24.0.50.
configure:PACKAGE_VERSION='24.0.50'
configure:PACKAGE_STRING='emacs 24.0.50'
configure:\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
configure:     short | recursive ) echo "Configuration of emacs 24.0.50:";;
configure:emacs configure 24.0.50
configure:It was created by emacs $as_me 24.0.50, which was
configure:This file was extended by emacs $as_me 24.0.50, which was
configure:emacs config.status 24.0.50
configure.in:AC_INIT(emacs, 24.0.50)
doc/misc/faq.texi:@set VER 24.0.50
doc/man/emacs.1:.TH EMACS 1 "2007 April 13" "GNU Emacs 24.0.50"
doc/emacs/emacs.texi:@set EMACSVER  24.0.50
doc/lispref/elisp.texi:@set EMACSVER 24.0.50
doc/lispref/vol2.texi:@set EMACSVER 24.0.50
doc/lispref/book-spine.texinfo:@center Emacs Version 24.0.50
doc/lispref/vol1.texi:@set EMACSVER 24.0.50
lib-src/makefile.w32-in:VERSION		= 24.0.50
nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:CFBundleShortVersionString = "Version 24.0.50";
nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:CFBundleGetInfoString = "Emacs version 24.0.50, NS Windowing";
nextstep/Cocoa/Emacs.base/Contents/Info.plist:	<string>Emacs 24.0.50 Copyright (C) 2010 Free Software Foundation, Inc.</string>
nextstep/Cocoa/Emacs.base/Contents/Info.plist:	<string>24.0.50</string>
nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:Version=24.0.50
nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:    ApplicationRelease = "24.0.50";
nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:    FullVersionID = "Emacs 24.0.50, NS Windowing";
README:This directory tree holds version 24.0.50 of GNU Emacs, the extensible,
src/emacs.c:const char emacs_version[] = "24.0.50";


Upstream would probably be best to designate the stable location for the version string.

Reproducible: Always
Comment 1 Jeff Kowalczyk 2010-05-16 18:31:48 UTC
Created attachment 231705 [details, diff]
emacs-vcs-24.0.9999.ebuild patch - change FULL_VERSION grep method

C code seems stable location for lookup, but might be good to check with upstream re: stable location for canonical version information. Many duplicate entries at present, some could change in the future. Copy Gentoo relied on was removed in trunk r100306.
Comment 2 Ulrich Müller gentoo-dev 2010-05-19 07:22:10 UTC
Thank you for reporting. This has already been fixed in a slightly different way.

(In reply to comment #1)
> C code seems stable location for lookup, but might be good to check with
> upstream re: stable location for canonical version information.

Could you do this please?

> Many duplicate entries at present, some could change in the future.

The most relevant locations are emacs.c and configure.in. (Obviously we won't take the version from some file in nextstep/ or from makefile.w32. ;-)