diff options
author | 2012-12-15 21:30:03 +0000 | |
---|---|---|
committer | 2012-12-15 21:30:03 +0000 | |
commit | 211745c2ee19a3b796b440591b04c6a02addde2e (patch) | |
tree | 35f94f397fae732af6b29f3116cdfaf0b0ac62f7 /eclass | |
parent | Version bump (diff) | |
download | historical-211745c2ee19a3b796b440591b04c6a02addde2e.tar.gz historical-211745c2ee19a3b796b440591b04c6a02addde2e.tar.bz2 historical-211745c2ee19a3b796b440591b04c6a02addde2e.zip |
Fix the relative linking algo to handle /// in path.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 22 |
2 files changed, 16 insertions, 11 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index e651ecb852e6..f5d7d88f1553 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.560 2012/12/14 08:41:59 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.561 2012/12/15 21:30:03 mgorny Exp $ + + 15 Dec 2012; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass: + Fix the relative linking algo to handle /// in path. 14 Dec 2012; Michał Górny <mgorny@gentoo.org> python-r1.eclass: Prevent python-r1 packages from depending on python-single-r1 packages. diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 64848a7e5573..0f342b7ad2c2 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.6 2012/12/01 22:10:34 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.7 2012/12/15 21:30:03 mgorny Exp $ # @ECLASS: python-utils-r1 # @MAINTAINER: @@ -270,20 +270,22 @@ _python_ln_rel() { local topath=${to%/*}/ local rel_path= - # remove double slashes - frpath=${frpath/\/\///} - topath=${topath/\/\///} - while [[ ${topath} ]]; do - local frseg=${frpath%%/*} - local toseg=${topath%%/*} + local frseg= toseg= + + while [[ ! ${frseg} && ${frpath} ]]; do + frseg=${frpath%%/*} + frpath=${frpath#${frseg}/} + done + + while [[ ! ${toseg} && ${topath} ]]; do + toseg=${topath%%/*} + topath=${topath#${toseg}/} + done if [[ ${frseg} != ${toseg} ]]; then rel_path=../${rel_path}${frseg:+${frseg}/} fi - - frpath=${frpath#${frseg}/} - topath=${topath#${toseg}/} done rel_path+=${frpath}${1##*/} |