[pacman-dev] [PATCH 3/5] Clean is done everytime it's asked for

Dave Reisner d at falconindy.com
Fri Aug 12 14:06:41 EDT 2011

On Fri, Aug 12, 2011 at 07:49:07PM +0200, Seblu wrote:
> On Fri, Aug 12, 2011 at 6:58 PM, Dave Reisner <d at falconindy.com> wrote:
> > On Tue, Aug 09, 2011 at 12:56:41PM +0200, Sebastien Luttringer wrote:
> >> Before this, cleaning is done when script exit with a value != 0.
> >> If a build fail, directory remain unclean. The purpose of cleaning should
> >> not be changed if build fail.
> >
> > I think this is intended behavior. One might want to investigate _why_ a
> > build failed by looking in the $srcdir.
> Someone who wants to investigate a build failure doesn't pass -c as argument ?

You're assuming that you know beforehand that the package will build
correctly. For any non-vcs package, I almost always want to use
`makepkg -risc'.

> Same as you don't strip when you want to debug.
> gcc -g toto.c -o toto; strip toto, have the same behaviour

I don't think how this is analogous. The behavior we have with -c is
more similar to:

make && make install && make clean

Note the conditional nature of this.

> When you call "makepkg", it will fail and don't remove content to make
> investigation. If you call "makepkg -c", i suppose, you want do clean
> (even it fail).

And as I mentioned above, you don't know that the package will be built
successfully, but you want the build directory cleaned IFF it does build.

> My idea was to be able to clean a directory without  build package.
> But i can implement something like -C which just clean content of the
> current directory.

More information about the pacman-dev mailing list