From c361ab50d96b729838dac867aee2c6021c3e8b4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich=20M=C3=BCller?= Date: Fri, 24 Apr 2015 22:42:01 +0000 Subject: [PATCH] Fix filename matching in elisp-site-file-install. It should use shortest match, not longest. --- eclass/ChangeLog | 6 +++++- eclass/elisp-common.eclass | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 61f0a14f7920..30a6e782d9e8 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -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 elisp-common.eclass: + Fix filename matching in elisp-site-file-install. It should use shortest + match, not longest. 22 Apr 2015; Davide Pesavento qt4-build-multilib.eclass: Sync with qt overlay: cleanup prefix-related patching and fix bug #542780. diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 74c30549daf7..41a0edef05bb 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -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:;}" \ -- 2.26.2