Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/aria2: aria2-1.12.0.ebuild ChangeLog
Date: Tue, 05 Jul 2011 23:29:54
Message-Id: 201107051929.05346.vapier@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/aria2: aria2-1.12.0.ebuild ChangeLog by Paul Arthur
1 On Sunday, July 03, 2011 18:49:52 Paul Arthur wrote:
2 > On 2011-07-03, Jonathan Callen <abcd@g.o> wrote:
3 > > Peter Volkov wrote:
4 > >>> rm -rf "${D}/usr/share/doc/aria2"
5 > >>>
6 > >> || die
7 > >
8 > > `rm -f` never fails -- if the target does not exist, then rm simply
9 > > returns true. (The only reason it would fail that I can think of is
10 > > /bin/rm not existing, in which case you have a bigger problem.)
11 > >
12 > > To test, try `rm -f /nonexistant/file; echo $?`
13 >
14 > jill-zeke /var/tmp $ rm -f testfile
15 > rm: cannot remove `testfile': Operation not permitted
16 > jill-zeke /var/tmp $ echo $?
17 > 1
18 > jill-zeke /var/tmp $ rm -rf testdir
19 > rm: cannot remove `testdir/test': Permission denied
20 > jill-zeke /var/tmp $ echo $?
21 > 1
22
23 if this occurs *inside the ebuild env*, then most likely something else is
24 screwed up and will be caught anyways
25
26 personally, i generally like to use:
27 rm -r "${D}"/usr/share/doc/aria2 || die
28 that way when the package stops installing aria2, i notice and can remove the
29 call to `rm` altogether ...
30 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature