Fix filename matching in elisp-site-file-install. It should use shortest match, not...
authorUlrich Müller <ulm@gentoo.org>
Fri, 24 Apr 2015 22:42:01 +0000 (22:42 +0000)
committerUlrich Müller <ulm@gentoo.org>
Fri, 24 Apr 2015 22:42:01 +0000 (22:42 +0000)
eclass/ChangeLog
eclass/elisp-common.eclass

index 61f0a14f79204b561f74133afb8537352b25e814..30a6e782d9e88d10f16622ce5abe3e79f654d220 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1592 2015/04/22 20:23:47 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1593 2015/04/24 22:42:01 ulm Exp $
+
+  24 Apr 2015; Ulrich Müller <ulm@gentoo.org> elisp-common.eclass:
+  Fix filename matching in elisp-site-file-install. It should use shortest
+  match, not longest.
 
   22 Apr 2015; Davide Pesavento <pesa@gentoo.org> qt4-build-multilib.eclass:
   Sync with qt overlay: cleanup prefix-related patching and fix bug #542780.
index 74c30549daf7b5b448709d09abb77109ce0e7346..41a0edef05bb5a488f1f46874ef549b68d9a496d 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.90 2014/06/11 09:13:36 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.91 2015/04/24 22:42:01 ulm Exp $
 #
 # @ECLASS: elisp-common.eclass
 # @MAINTAINER:
@@ -322,7 +322,8 @@ elisp-site-file-install() {
 
        [[ ${sf} == [0-9][0-9]*-gentoo*.el ]] \
                || ewarn "elisp-site-file-install: bad name of site-init file"
-       sf="${T}/${sf/%-gentoo*.el/-gentoo.el}"
+       [[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el"
+       sf="${T}/${sf}"
        ebegin "Installing site initialisation file for GNU Emacs"
        [[ $1 = "${sf}" ]] || cp "$1" "${sf}"
        sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \