[pacman-dev] [PATCH] Add a -C, --cleanbuild option to clear the source directory before building a package.

Allan McRae allan at archlinux.org
Thu Oct 10 06:47:40 EDT 2013


On 10/10/13 19:29, Lukas Jirkovsky wrote:
> On Thu, Oct 10, 2013 at 2:41 AM, Allan McRae <allan at archlinux.org> wrote:
>> On 04/10/13 23:57, Lukáš Jirkovský wrote:
>>> Implements FS#17175.
>>
>> Grr...    Completely rejected.
> 
> No problem, I won't use it anyway ;-)
> 
>> Issues:
>> 1) it does not remove $srcdir...
> 
> Well, it removes contents of the $srcdir just like the message said.
> That's because the later code expects $srcdir to exist. Doing "rm -rf
> $srcdir && make -p $srcdir" seems a bit superfluous.

Did you test it - it does not remove ANYTHING.

rm -rf "$srcdir/*"

vs

rm -rf "$srcdir"/*

>> 2) when you fix the "rm -rf" line to do it properly, it deletes
>> everything just moved to srcdir (local sources, non-vcs sources...)
> 
> I don't see a problem here. I thought that this is what people wanted it to do.

With that patch, using -C means anything with a non-vcs will not build
due to having no files in $srcdir.  My patch "Link non-vcs sources into
$srcdir during extraction" fixes that.

Allan



More information about the pacman-dev mailing list