On Wednesday 30 May 2007, Tom "spot" Callaway wrote: > On Wed, 2007-05-30 at 00:26 +0100, Jonathan Underwood wrote: > > On 27/05/07, Ville Skyttä <ville.skytta@xxxxxx> wrote: > > > Regarding the current Emacsen add-on draft, > > > > > > * Added some more info about requiring a version of (X)Emacs newer than > > > or equal to the one used to compile the *.elcs, and how to find that > > > version out dynamically during package build. > > > > Actually, I was just testing this, and it doesn't work. > > > > You added these macros: > > %define emacsversion v=$(rpm -q --qf=%%{VERSION} emacs) ; case $v in > > 2*) echo $v ;; *) echo 0 ;; esac > > > > %define xemacsversion v=$(rpm -q --qf=%%{VERSION} xemacs) ; case $v in > > 2*) echo $v ;; *) echo 0 ;; esac > > Good lord. No. Thou shalt not query rpm inside rpm. Disagreed, when done carefully. > Ask emacs/xemacs what version it is. $ emacs --version GNU Emacs 22.0.95.1 Copyright (C) 2007 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. $ xemacs --version XEmacs 21.5 (beta28) "fuki" [Lucid] (x86_64-redhat-linux, Mule) of Sat May 26 2007 on viper.bobcat.mine.nu Very much fun parsing those and creating a string that matches what the corresponding emacs/xemacs package's version is, when we can just simply ask rpm. -- Fedora-packaging mailing list Fedora-packaging@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-packaging