public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in rox-base/rox-clib: ChangeLog rox-clib-2.1.10.ebuild
       [not found] <E1J0J2N-0002lC-4B@stork.gentoo.org>
@ 2007-12-06 23:46 ` Donnie Berkholz
  2007-12-07 15:16   ` Jim Ramsay
  0 siblings, 1 reply; 3+ messages in thread
From: Donnie Berkholz @ 2007-12-06 23:46 UTC (permalink / raw
  To: gentoo-dev, lack

On 15:53 Thu 06 Dec     , Jim Ramsay (lack) wrote:
> 1.1                  rox-base/rox-clib/rox-clib-2.1.10.ebuild
> 
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/rox-base/rox-clib/rox-clib-2.1.10.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/rox-base/rox-clib/rox-clib-2.1.10.ebuild?rev=1.1&content-type=text/plain

> src_install() {
> 	local baselibdir="/usr/$(get_libdir)"
> 	local NATIVE_FEED_DIR="/usr/share/0install.net/native_feeds"
> 	local ICON_CACHE_DIR="/var/cache/0install.net/interface_icons"
> 
> 	#  clean up source instead of remove it!
> 	( cd src && make clean )
> 
> 	# remove silly .cvs files
> 	find . -name '.cvs*' | xargs rm -f >/dev/null 2>&1
> 	dodoc ${baselibdir}/${APPNAME}
> 	dodir ${baselibdir}/${APPNAME}
> 	cp -r . "${D}${baselibdir}/${APPNAME}"
> 	(
> 		cd Help
> 		dodoc Authors Changes ToDo README Versions
> 	)

Instead of these subshells to save the original directory, a more common 
technique is pushd/popd. Another possibility is 'cd foo; stuff; cd -', 
but that doesn't stack.

> 	0distutils ROX-CLib.xml > tmp.native_feed || die "0distutilss feed edit failed"
> 	insinto "${baselibdir}/ROX-CLib/"
> 	newins tmp.native_feed ROX-CLib.xml
> 
> 	local feedname
> 	feedname=$(0distutils -e tmp.native_feed) || "0distutils URI escape failed"
> 	dosym "${baselibdir}/ROX-CLib/ROX-CLib.xml" "${NATIVE_FEED_DIR}/${feedname}"
> 
> 	local cachedname
> 	cachedname=$(0distutils -c tmp.native_feed) || "0distutils URI escape failed"
> 	dosym "${baselibdir}/ROX-CLib/.DirIcon" "${ICON_CACHE_DIR}/${cachedname}"
> 
> }

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in rox-base/rox-clib: ChangeLog rox-clib-2.1.10.ebuild
  2007-12-06 23:46 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in rox-base/rox-clib: ChangeLog rox-clib-2.1.10.ebuild Donnie Berkholz
@ 2007-12-07 15:16   ` Jim Ramsay
  2007-12-09  7:19     ` Donnie Berkholz
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Ramsay @ 2007-12-07 15:16 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

Donnie Berkholz <dberkholz@gentoo.org> wrote:
> Instead of these subshells to save the original directory, a more
> common technique is pushd/popd. Another possibility is 'cd foo;
> stuff; cd -', but that doesn't stack.

That's an excellent idea, I'll update these to not use subshells in the
future.

Is there some sort of equivalent way to back-out of whatever 'insinto'
does to the environment?

-- 
Jim Ramsay
Gentoo/Linux Developer (rox,gkrellm)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in rox-base/rox-clib: ChangeLog rox-clib-2.1.10.ebuild
  2007-12-07 15:16   ` Jim Ramsay
@ 2007-12-09  7:19     ` Donnie Berkholz
  0 siblings, 0 replies; 3+ messages in thread
From: Donnie Berkholz @ 2007-12-09  7:19 UTC (permalink / raw
  To: gentoo-dev

On 10:16 Fri 07 Dec     , Jim Ramsay wrote:
> Donnie Berkholz <dberkholz@gentoo.org> wrote:
> > Instead of these subshells to save the original directory, a more
> > common technique is pushd/popd. Another possibility is 'cd foo;
> > stuff; cd -', but that doesn't stack.
> 
> That's an excellent idea, I'll update these to not use subshells in the
> future.
> 
> Is there some sort of equivalent way to back-out of whatever 'insinto'
> does to the environment?

You're kinda stuck with subshells if you have to change install 
directories in an eclass.

You could theoretically save the variable set by running insinto() and 
later restore it, but I'm not sure that's supposed to be part of the API 
(check PMS?).

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-09  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1J0J2N-0002lC-4B@stork.gentoo.org>
2007-12-06 23:46 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in rox-base/rox-clib: ChangeLog rox-clib-2.1.10.ebuild Donnie Berkholz
2007-12-07 15:16   ` Jim Ramsay
2007-12-09  7:19     ` Donnie Berkholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox