diff options
author | Dan Armak <danarmak@gentoo.org> | 2002-08-03 15:31:09 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2002-08-03 15:31:09 +0000 |
commit | 95d5be85591badea83d246f455930ea2f394ff71 (patch) | |
tree | de7467a976beeae05f91a633cb1dfb738ab7cc4e /eclass/cvs.eclass | |
parent | Revision bump to hsflinmodem package (diff) | |
download | gentoo-2-95d5be85591badea83d246f455930ea2f394ff71.tar.gz gentoo-2-95d5be85591badea83d246f455930ea2f394ff71.tar.bz2 gentoo-2-95d5be85591badea83d246f455930ea2f394ff71.zip |
fix bug with multiple-level subdirs being fecthed; remove empty dirs where fecthing failed
Diffstat (limited to 'eclass/cvs.eclass')
-rw-r--r-- | eclass/cvs.eclass | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass index 82783bf76790..e83cf7eeeec3 100644 --- a/eclass/cvs.eclass +++ b/eclass/cvs.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.9 2002/08/03 10:46:01 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.10 2002/08/03 15:31:09 danarmak Exp $ # This eclass provides the generic cvs fetching functions. ECLASS=cvs @@ -191,8 +191,8 @@ cvs_src_unpack() { debug-print "Copying module $ECVS_MODULE from $ECVS_TOP_DIR..." if [ -n "$ECVS_SUBDIR" ]; then - mkdir $WORKDIR/$ECVS_MODULE - cp -Rf $ECVS_TOP_DIR/$ECVS_MODULE/$ECVS_SUBDIR $WORKDIR/$ECVS_MODULE + mkdir -p $WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR + cp -Rf $ECVS_TOP_DIR/$ECVS_MODULE/$ECVS_SUBDIR/* $WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR/ else if [ -n "$ECVS_LOCAL" ]; then cp -f $ECVS_TOP_DIR/$ECVS_MODULE/* $WORKDIR/$ECVS_MODULE @@ -200,7 +200,15 @@ cvs_src_unpack() { cp -Rf $ECVS_TOP_DIR/$ECVS_MODULE $WORKDIR fi fi - + + # if the directory is empty, remove it; empty directories cannot exist in cvs. + # this happens when fex. kde-source requests module/doc/subdir which doesn't exist. + # still create the empty directory in workdir though. + if [ "`ls -A $DIR`" == "CVS" ]; then + debug-print "$FUNCNAME: removing cvs-empty directory $ECVS_MODULE/$ECVS_SUBDIR" + rm -rf $DIR + fi + # implement some of base_src_unpack's functionality; # note however that base.eclass may not have been inherited! if [ -n "$PATCHES" ]; then |