[pacman-dev] [PATCH] makepkg: do not run prepare() with --noextract

Evangelos Foutras evangelos at foutrelis.com
Fri Feb 19 02:44:38 UTC 2016


On 17/02/16 09:50, Allan McRae wrote:
> On 17/02/16 17:11, Evangelos Foutras wrote:
>> This is partial revert of 8454daa7feef (makepkg: run pkgver() and
>> prepare() with --noextract).
>> 
>> Reasoning for the reversion (copied from FS#43498):
>> 
>>     Running prepare() when --noextract is used no longer allows running
>>     'makepkg -o && makepkg -e' with any PKGBUILD that applies patches in
>>     prepare(). [1]
>> 
>>     Sure there's --noprepare which restores the old behavior, but that's
>>     a lot of extra typing for what I believe is a much more common use
>>     of --noextract.
>>
> 
> So you are taking this from a case where you can use makepkg --noextract
> with or without prepare() and making it so you can only use it without
> to avoid some typing...

When there is no reason to be doing that, then removing this "feature"
is the correct approach. prepare() is there to modify the sources after
extraction; otherwise we might as well move its body into build().

Quoting another of my comments on FS#43498:

=====================================================================
I don't see the need for a --prepare switch to be used together with
--noextract (I consider prepare() tightly coupled to source extraction);
its usefulness would be minimal at best.

If someone really wants to call prepare() when not extracting sources
(for some special testing/bisect scenario), they can call it from build().
=====================================================================

Running prepare() with --noextract makes no sense to me and, therefore,
do not believe it needs to be a supported configuration. YAGNI seems to
apply in this case. [1]

[1] https://en.wikipedia.org/wiki/You_aren't_gonna_need_it


More information about the pacman-dev mailing list