Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 10872 | Differences between
and this patch

Collapse All | Expand All

(-)/var/tmp/portage/portage-2.0.44/work/portage-2.0.44/bin/ebuild.sh (-18 / +18 lines)
Lines 198-209 Link Here
198
198
199
einstall() {
199
einstall() {
200
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
200
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
201
		make prefix=${D}/usr \
201
		make prefix="${D}"/usr \
202
		    mandir=${D}/usr/share/man \
202
		    mandir="${D}"/usr/share/man \
203
		    infodir=${D}/usr/share/info \
203
		    infodir="${D}"/usr/share/info \
204
		    datadir=${D}/usr/share \
204
		    datadir="${D}"/usr/share \
205
		    sysconfdir=${D}/etc \
205
		    sysconfdir="${D}"/etc \
206
		    localstatedir=${D}/var/lib \
206
		    localstatedir="${D}"/var/lib \
207
		    "$@" install || die "einstall failed" 
207
		    "$@" install || die "einstall failed" 
208
	else
208
	else
209
		die "no Makefile found"
209
		die "no Makefile found"
Lines 329-337 Link Here
329
		export DESTTREE=""
329
		export DESTTREE=""
330
	else
330
	else
331
		export DESTTREE=$1
331
		export DESTTREE=$1
332
		if [ ! -d ${D}${DESTTREE} ]
332
		if [ ! -d "${D}${DESTTREE}" ]
333
		then
333
		then
334
			install -d ${D}${DESTTREE}
334
			install -d "${D}${DESTTREE}"
335
		fi
335
		fi
336
	fi
336
	fi
337
}
337
}
Lines 342-350 Link Here
342
		export INSDESTTREE=""
342
		export INSDESTTREE=""
343
	else
343
	else
344
		export INSDESTTREE=$1
344
		export INSDESTTREE=$1
345
		if [ ! -d ${D}${INSDESTTREE} ]
345
		if [ ! -d "${D}${INSDESTTREE}" ]
346
		then
346
		then
347
			install -d ${D}${INSDESTTREE}
347
			install -d "${D}${INSDESTTREE}"
348
		fi
348
		fi
349
	fi
349
	fi
350
}
350
}
Lines 447-453 Link Here
447
447
448
abort_compile() {
448
abort_compile() {
449
	abort_handler "src_compile" $1
449
	abort_handler "src_compile" $1
450
	rm -f ${BUILDDIR}/compiled
450
	rm -f "${BUILDDIR}/compiled"
451
	exit 1
451
	exit 1
452
}
452
}
453
453
Lines 474-489 Link Here
474
dyn_compile() {
474
dyn_compile() {
475
	trap "abort_compile" SIGINT SIGQUIT
475
	trap "abort_compile" SIGINT SIGQUIT
476
	export CFLAGS CXXFLAGS LIBCFLAGS LIBCXXFLAGS
476
	export CFLAGS CXXFLAGS LIBCFLAGS LIBCXXFLAGS
477
	if [ ${BUILDDIR}/.compiled -nt ${WORKDIR} ]
477
	if [ "${BUILDDIR}/.compiled" -nt "${WORKDIR}" ]
478
	then
478
	then
479
		echo ">>> It appears that ${PN} is already compiled; skipping."
479
		echo ">>> It appears that ${PN} is already compiled; skipping."
480
		echo ">>> (clean to force compilation)"
480
		echo ">>> (clean to force compilation)"
481
		trap SIGINT SIGQUIT
481
		trap SIGINT SIGQUIT
482
		return
482
		return
483
	fi
483
	fi
484
	if [ -d ${S} ]
484
	if [ -d "${S}" ]
485
		then
485
		then
486
		cd ${S}
486
		cd "${S}"
487
	fi
487
	fi
488
	#our custom version of libtool uses $S and $D to fix
488
	#our custom version of libtool uses $S and $D to fix
489
	#invalid paths in .la files
489
	#invalid paths in .la files
Lines 547-557 Link Here
547
dyn_install() {
547
dyn_install() {
548
	local ROOT
548
	local ROOT
549
	trap "abort_install" SIGINT SIGQUIT
549
	trap "abort_install" SIGINT SIGQUIT
550
	rm -rf ${BUILDDIR}/image
550
	rm -rf "${BUILDDIR}/image"
551
	mkdir ${BUILDDIR}/image
551
	mkdir "${BUILDDIR}/image"
552
	if [ -d ${S} ]
552
	if [ -d "${S}" ]
553
	then
553
	then
554
		cd ${S}
554
		cd "${S}"
555
	fi
555
	fi
556
	echo
556
	echo
557
	echo ">>> Install ${PF} into ${D} category ${CATEGORY}"
557
	echo ">>> Install ${PF} into ${D} category ${CATEGORY}"
(-)/var/portage/eclass/cvs.eclass (-26 / +26 lines)
Lines 111-123 Link Here
111
		#export SANDBOX_WRITE="$SANDBOX_WRITE:/foobar:/"
111
		#export SANDBOX_WRITE="$SANDBOX_WRITE:/foobar:/"
112
		addwrite /foobar
112
		addwrite /foobar
113
		addwrite /
113
		addwrite /
114
		mkdir -p /$DIR
114
		mkdir -p "/$DIR"
115
		export SANDBOX_WRITE=${SANDBOX_WRITE//:\/foobar:\/}
115
		export SANDBOX_WRITE=${SANDBOX_WRITE//:\/foobar:\/}
116
	fi
116
	fi
117
117
118
	# in case ECVS_TOP_DIR is a symlink to a dir, get the real dir's path,
118
	# in case ECVS_TOP_DIR is a symlink to a dir, get the real dir's path,
119
	# otherwise addwrite() doesn't work.
119
	# otherwise addwrite() doesn't work.
120
	cd -P $ECVS_TOP_DIR > /dev/null
120
	cd -P "$ECVS_TOP_DIR" > /dev/null
121
	ECVS_TOP_DIR="`/bin/pwd`"
121
	ECVS_TOP_DIR="`/bin/pwd`"
122
	DIR="${ECVS_TOP_DIR}/${ECVS_MODULE}/${ECVS_SUBDIR}"
122
	DIR="${ECVS_TOP_DIR}/${ECVS_MODULE}/${ECVS_SUBDIR}"
123
	cd $OLDPWD
123
	cd $OLDPWD
Lines 126-141 Link Here
126
	
126
	
127
	# disable the sandbox for this dir
127
	# disable the sandbox for this dir
128
	# not just $DIR because we want to create moduletopdir/CVS too
128
	# not just $DIR because we want to create moduletopdir/CVS too
129
	addwrite $ECVS_TOP_DIR/$ECVS_MODULE
129
	addwrite "$ECVS_TOP_DIR/$ECVS_MODULE"
130
130
131
	# add option for local (non-recursive) fetching
131
	# add option for local (non-recursive) fetching
132
	[ -n "$ECVS_LOCAL" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -l"
132
	[ -n "$ECVS_LOCAL" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -l"
133
	
133
	
134
	# prepare a cvspass file just for this session so that cvs thinks we're logged
134
	# prepare a cvspass file just for this session so that cvs thinks we're logged
135
	# in at the cvs server. we don't want to mess with ~/.cvspass.
135
	# in at the cvs server. we don't want to mess with ~/.cvspass.
136
	echo ":pserver:${ECVS_SERVER} A" > ${T}/cvspass
136
	echo ":pserver:${ECVS_SERVER} A" > "${T}/cvspass"
137
	export CVS_PASSFILE="${T}/cvspass"
137
	export CVS_PASSFILE="${T}/cvspass"
138
	chown $ECVS_RUNAS "${T}/cvspass"
138
	chown "$ECVS_RUNAS" "${T}/cvspass"
139
	#export CVSROOT=:pserver:${ECVS_USER}@${ECVS_SERVER}
139
	#export CVSROOT=:pserver:${ECVS_USER}@${ECVS_SERVER}
140
	
140
	
141
	# Note: cvs update and checkout commands are unified.
141
	# Note: cvs update and checkout commands are unified.
Lines 156-170 Link Here
156
	
156
	
157
	debug-print "$FUNCNAME: Root<-$newserver, Repository<-$repository"
157
	debug-print "$FUNCNAME: Root<-$newserver, Repository<-$repository"
158
	debug-print "$FUNCNAME: entering directory $DIR"
158
	debug-print "$FUNCNAME: entering directory $DIR"
159
	cd /$DIR
159
	cd "/$DIR"
160
	
160
	
161
	if [ ! -d "CVS" ]; then
161
	if [ ! -d "CVS" ]; then
162
		# create a new CVS/ directory (checkout)
162
		# create a new CVS/ directory (checkout)
163
		debug-print "$FUNCNAME: creating new cvs directory"
163
		debug-print "$FUNCNAME: creating new cvs directory"
164
		
164
		
165
		mkdir CVS
165
		mkdir CVS
166
		echo $newserver > CVS/Root
166
		echo "$newserver" > CVS/Root
167
		echo $repository > CVS/Repository
167
		echo "$repository" > CVS/Repository
168
		touch CVS/Entries
168
		touch CVS/Entries
169
		
169
		
170
		# if we're checking out a subdirectory only, create a CVS/ dir
170
		# if we're checking out a subdirectory only, create a CVS/ dir
Lines 172-179 Link Here
172
		# from there to get the full module.
172
		# from there to get the full module.
173
		if [ ! -d "$ECVS_TOP_DIR/$ECVS_MODULE/CVS" ]; then
173
		if [ ! -d "$ECVS_TOP_DIR/$ECVS_MODULE/CVS" ]; then
174
			debug-print "$FUNCNAME: Copying CVS/ directory to module top-level dir"
174
			debug-print "$FUNCNAME: Copying CVS/ directory to module top-level dir"
175
			cp -r CVS $ECVS_TOP_DIR/$ECVS_MODULE/
175
			cp -r CVS "$ECVS_TOP_DIR/$ECVS_MODULE/"
176
			echo $ECVS_MODULE > $ECVS_TOP_DIR/$ECVS_MODULE/CVS/Repository
176
			echo "$ECVS_MODULE" > "$ECVS_TOP_DIR/$ECVS_MODULE/CVS/Repository"
177
		fi
177
		fi
178
		
178
		
179
	else
179
	else
Lines 195-203 Link Here
195
			debug-print "$cvsdirs"
195
			debug-print "$cvsdirs"
196
196
197
			einfo "Modifying CVS dirs..."
197
			einfo "Modifying CVS dirs..."
198
			for x in $cvsdirs; do
198
			for x in "$cvsdirs"; do
199
				debug-print "In $x"
199
				debug-print "In $x"
200
				echo $newserver > $x/Root
200
				echo "$newserver" > "$x/Root"
201
			done
201
			done
202
202
203
		fi
203
		fi
Lines 210-216 Link Here
210
210
211
	# Chowning the directory
211
	# Chowning the directory
212
	if [ "${ECVS_RUNAS}" != "root" ]; then
212
	if [ "${ECVS_RUNAS}" != "root" ]; then
213
		chown -R "$ECVS_RUNAS" /$DIR
213
		chown -R "$ECVS_RUNAS" "/$DIR"
214
	fi
214
	fi
215
215
216
	# finally run the cvs update command
216
	# finally run the cvs update command
Lines 268-318 Link Here
268
	fi
268
	fi
269
269
270
	# log out and restore ownership
270
	# log out and restore ownership
271
	su $ECVS_RUNAS -c "cvs logout" &> /dev/null
271
	su "$ECVS_RUNAS" -c "cvs logout" &> /dev/null
272
	chown root ${T}/cvspass
272
	chown root "${T}/cvspass"
273
}
273
}
274
274
275
cvs_src_unpack() {
275
cvs_src_unpack() {
276
276
277
	debug-print-function $FUNCNAME $*
277
	debug-print-function "$FUNCNAME" "$*"
278
	cvs_fetch || die "died running cvs_fetch"
278
	cvs_fetch || die "died running cvs_fetch"
279
279
280
	einfo "Copying $ECVS_MODULE/$ECVS_SUBDIR from $ECVS_TOP_DIR..."
280
	einfo "Copying $ECVS_MODULE/$ECVS_SUBDIR from $ECVS_TOP_DIR..."
281
	debug-print "Copying module $ECVS_MODULE subdir $ECVS_SUBDIR local_mode=$ECVS_LOCAL from $ECVS_TOP_DIR..."
281
	debug-print "Copying module $ECVS_MODULE subdir $ECVS_SUBDIR local_mode=$ECVS_LOCAL from $ECVS_TOP_DIR..."
282
	
282
	
283
	# probably redundant, but best to make sure
283
	# probably redundant, but best to make sure
284
	mkdir -p $WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR
284
	mkdir -p "$WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR"
285
	
285
	
286
	if [ -n "$ECVS_SUBDIR" ]; then
286
	if [ -n "$ECVS_SUBDIR" ]; then
287
		if [ -n "$ECVS_LOCAL" ]; then
287
		if [ -n "$ECVS_LOCAL" ]; then
288
			cp -f $ECVS_TOP_DIR/$ECVS_MODULE/$ECVS_SUBDIR/* $WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR
288
			cp -f "$ECVS_TOP_DIR/$ECVS_MODULE/$ECVS_SUBDIR"/* "$WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR"
289
		else
289
		else
290
			cp -Rf $ECVS_TOP_DIR/$ECVS_MODULE/$ECVS_SUBDIR $WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR/..
290
			cp -Rf "$ECVS_TOP_DIR/$ECVS_MODULE/$ECVS_SUBDIR" "$WORKDIR/$ECVS_MODULE/$ECVS_SUBDIR/.."
291
		fi    
291
		fi    
292
	else
292
	else
293
		if [ -n "$ECVS_LOCAL" ]; then
293
		if [ -n "$ECVS_LOCAL" ]; then
294
			cp -f $ECVS_TOP_DIR/$ECVS_MODULE/* $WORKDIR/$ECVS_MODULE
294
			cp -f "$ECVS_TOP_DIR/$ECVS_MODULE/"* "$WORKDIR/$ECVS_MODULE"
295
		else
295
		else
296
			cp -Rf $ECVS_TOP_DIR/$ECVS_MODULE $WORKDIR
296
			cp -Rf "$ECVS_TOP_DIR/$ECVS_MODULE" "$WORKDIR"
297
		fi
297
		fi
298
	fi
298
	fi
299
	
299
	
300
	# if the directory is empty, remove it; empty directories cannot exist in cvs.
300
	# if the directory is empty, remove it; empty directories cannot exist in cvs.
301
	# this happens when fex. kde-source requests module/doc/subdir which doesn't exist.
301
	# this happens when fex. kde-source requests module/doc/subdir which doesn't exist.
302
	# still create the empty directory in workdir though.
302
	# still create the empty directory in workdir though.
303
	if [ "`ls -A $DIR`" == "CVS" ]; then
303
	if [ "`ls -A \"$DIR\"`" == "CVS" ]; then
304
		debug-print "$FUNCNAME: removing cvs-empty directory $ECVS_MODULE/$ECVS_SUBDIR"
304
		debug-print "$FUNCNAME: removing cvs-empty directory $ECVS_MODULE/$ECVS_SUBDIR"
305
		rm -rf $DIR
305
		rm -rf "$DIR"
306
	fi
306
	fi
307
	    
307
	    
308
	# implement some of base_src_unpack's functionality;
308
	# implement some of base_src_unpack's functionality;
309
	# note however that base.eclass may not have been inherited!
309
	# note however that base.eclass may not have been inherited!
310
	if [ -n "$PATCHES" ]; then
310
	if [ -n "$PATCHES" ]; then
311
		debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching"
311
		debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching"
312
		cd $S
312
		cd "$S"
313
		for x in $PATCHES; do
313
		for x in "$PATCHES"; do
314
			debug-print "patching from $x"
314
			debug-print "patching from $x"
315
			patch -p0 < $x
315
			patch -p0 < "$x"
316
		done
316
		done
317
		# make sure we don't try to apply patches more than once, since
317
		# make sure we don't try to apply patches more than once, since
318
		# cvs_src_unpack is usually called several times from e.g. kde-source_src_unpack
318
		# cvs_src_unpack is usually called several times from e.g. kde-source_src_unpack

Return to bug 10872