Gentoo Archives: gentoo-dev

From: Ionen Wolkens <ionen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] distutils-r1.eclass: Prefer "rm -rf build" over "setup.py clean -a"
Date: Sun, 17 Apr 2022 10:59:51
Message-Id: YlvzGiP2MwoDw/Ja@eversor
In Reply to: Re: [gentoo-dev] [PATCH 1/2] distutils-r1.eclass: Prefer "rm -rf build" over "setup.py clean -a" by Alexey Sokolov
1 On Sun, Apr 17, 2022 at 11:42:35AM +0100, Alexey Sokolov wrote:
2 > 09.04.2022 17:37, Michał Górny пишет:
3 > > + if [[ ${GPEP517_TESTING} ]]; then
4 > > + rm -rf build || die
5 > > + else
6 > > + esetup.py clean -a
7 > > + fi
8 > > fi
9 > > }
10 > >
11 >
12 > rm -r build || die
13 >
14 > -f makes it not fail, which makes ||die useless
15
16 -f mostly just means it wont error out if the directory is missing
17 which I believe is what is wanted here (this covers a lot of packages
18 so there's less certainty than in an ebuild). Then rm could fail for
19 other reasons such as failure to call the command, or directory not
20 being removable (like no permission to), so should still || die
21
22 --
23 ionen

Attachments

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