Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 12322 Details for
Bug 20715
CVS eclass enhancement to allow renaming of fetched modules
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Diff with default set to ECVS_MODULE
cvs.eclass.diff (text/plain), 3.52 KB, created by
Jon Kolb
on 2003-05-22 21:22:28 UTC
(
hide
)
Description:
Diff with default set to ECVS_MODULE
Filename:
MIME Type:
Creator:
Jon Kolb
Created:
2003-05-22 21:22:28 UTC
Size:
3.52 KB
patch
obsolete
>--- /usr/portage/eclass/cvs.eclass 2003-04-27 15:51:10.000000000 -0400 >+++ cvs.eclass 2003-05-09 12:45:49.000000000 -0400 >@@ -30,6 +30,11 @@ > > # set this to some value for the module/subdir to be fetched non-recursively: ECVS_LOCAL > >+# local name of module. useful if the module on the server is called >+# something common like 'driver' or is nested deep in a tree, and you don't >+# like useless empty directories. >+[ -z "$ECVS_LOCALNAME" ] && ECVS_LOCALNAME="$ECVS_MODULE" >+ > # Where the cvs modules are stored/accessed > [ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${DISTDIR}/cvs-src" > >@@ -95,6 +100,10 @@ > ECVS_CO_OPTS="$ECVS_CO_OPTS -r$ECVS_BRANCH" > fi > >+ if [ ! "$ECVS_LOCALNAME" = "$ECVS_MODULE" ]; then >+ ECVS_CO_OPTS="$ECVS_CO_OPTS -d $ECVS_LOCALNAME" >+ fi >+ > # it's easiest to always be in "run-as mode", logic-wise > # or would be if sudo didn't ask for a password even when sudo'ing to `whoami` > if [ -z "$ECVS_RUNAS" ]; then >@@ -123,7 +132,7 @@ > ECVS_TOP_DIR="`/bin/pwd`" > > # determine checkout or update mode >- if [ ! -d "$ECVS_TOP_DIR/$ECVS_MODULE/CVS" ]; then >+ if [ ! -d "$ECVS_TOP_DIR/$ECVS_LOCALNAME/CVS" ]; then > mode=checkout > else > mode=update >@@ -142,7 +151,7 @@ > > # switch servers automagically if needed > if [ "$mode" == "update" ]; then >- cd /$ECVS_TOP_DIR/$ECVS_MODULE >+ cd /$ECVS_TOP_DIR/$ECVS_LOCALNAME > oldserver="`$run cat CVS/Root`" > if [ "$server" != "$oldserver" ]; then > >@@ -231,11 +240,11 @@ > > if [ "$ECVS_SERVER" == "offline" ]; then > # we're not required to fetch anything, the module already exists and shouldn't be updated >- if [ -d "${ECVS_TOP_DIR}/${ECVS_MODULE}" ]; then >+ if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then > debug-print "$FUNCNAME: offline mode" > else >- debug-print "$FUNCNAME: offline mode specified but directory ${ECVS_TOP_DIR}/${ECVS_MODULE} not found, exiting with error" >- die "ERROR: Offline mode specified, but dir ${ECVS_TOP_DIR}/${ECVS_MODULE} not found. Aborting." >+ debug-print "$FUNCNAME: offline mode specified but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found, exiting with error" >+ die "ERROR: Offline mode specified, but dir ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found. Aborting." > fi > elif [ -n "$ECVS_SERVER" ]; then # ECVS_SERVER!=offline --> real fetching mode > einfo "Fetching cvs module $ECVS_MODULE into $ECVS_TOP_DIR..." >@@ -248,21 +257,20 @@ > debug-print "Copying module $ECVS_MODULElocal_mode=$ECVS_LOCAL from $ECVS_TOP_DIR..." > > # probably redundant, but best to make sure >- mkdir -p "$WORKDIR/$ECVS_MODULE" >+ mkdir -p "$WORKDIR/$ECVS_LOCALNAME" > > if [ -n "$ECVS_LOCAL" ]; then >- mkdir -p "$WORKDIR/$ECVS_MODULE" >- cp -f "$ECVS_TOP_DIR/$ECVS_MODULE"/* "$WORKDIR/$ECVS_MODULE" >+ cp -f "$ECVS_TOP_DIR/$ECVS_LOCALNAME"/* "$WORKDIR/$ECVS_LOCALNAME" > else >- cp -Rf "$ECVS_TOP_DIR/$ECVS_MODULE" "$WORKDIR/$ECVS_MODULE/.." >+ cp -Rf "$ECVS_TOP_DIR/$ECVS_LOCALNAME" "$WORKDIR/$ECVS_LOCALNAME/.." > 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 \"${ECVS_TOP_DIR}/${ECVS_MODULE}\"`" == "CVS" ]; then >- debug-print "$FUNCNAME: removing cvs-empty directory $ECVS_MODULE" >- rm -rf "${ECVS_TOP_DIR}/${ECVS_MODULE}" >+ if [ "`ls -A \"${ECVS_TOP_DIR}/${ECVS_LOCALNAME}\"`" == "CVS" ]; then >+ debug-print "$FUNCNAME: removing cvs-empty directory $ECVS_LOCALNAME" >+ rm -rf "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" > fi > > # implement some of base_src_unpack's functionality;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20715
: 12322 |
12333