[pacman-dev] patch submission help

Allan McRae allan at archlinux.org
Mon Mar 16 21:17:20 EDT 2009


Jeff wrote:
> In the last month I have created and tested [1] a patch for pacman-3.2.2
> that allows for 3 different PKGBUILD functions: build() check() inst().
> This allows for a new option in makepkg.conf called check which is
> expected to default to !check (and overridden for toolchain packages).
>
> build() and check() are never run in fakeroot, only inst() (with
> exception for !fakeroot or --asroot, of course) which conforms to the
> fakeroot recommendation. My attempt was to make the patch backwards
> compatible so that if any of the functions weren't present, it was not
> an error. However, I realized while writing this email that this means
> that a PKGBUILD with just build() would run completely in a non-fakeroot
> environment which needs re-thinking.
>
> Anyway, it's a rather small patch as seen below:
>
> $ grep ^- makepkg.patch | grep -v ^--- |wc -l
> 16
> $ grep ^+ makepkg.patch | grep -v ^+++ |wc -l
> 33
>
> The reason for this email, though, is that I subbed to this list to
> watch how things are done, learn protocol, etc. So I grabbed the git
> repo and started looking at how I was going to apply this patch since
> enough has changed to cause all but 1 hunk to fail. I am not familiar
> with git, preferring svn, but can read docs. Where I'm tripped up is
> realizing that head doesn't reflect what private branches might hold.
> One person (sorry, I forget who) mentioned having a branch with many
> makepkg changes in it which would cause me to have to hand apply these
> changes again. I have no interest in doing that, so I'm asking: does
> this feature seem like it would be worthwhile (read; would the patch be
> accepted)? If so, how do I access private branches so my branch doesn't
> conflict with them?
>
>
> [1] I am building a base system with the new PKGBUILD format and am
> about 3/4 of the way done with no known makepkg errors (running makepkg
> with sh -x for extra detail)
>   

Hi Jeff,

The person with many makepkg changes on their branch would be me, but 
the vast majority have now been applied to the master git branch.

Note that with the changes that are now in the pacmans git repo, there 
is support for build() and package() functions in PKGBUILDs.  When the 
package() function is present, it is run under fakeroot but the build() 
function is not.  Otherwise it is backwards compatible.

I like the idea of an additional check() function. However, I could 
implement it slightly differently - instead of a makepkg.conf flag to 
run the check() function or not, I think it may be better to add a 
--check flag to makepkg so people specify when to run it.

Anyway, I think the key point here is that if you have ideas for 
pacman/makepkg features and want to implement them, it is probably best 
to email here first to see what is already going on.

Allan




More information about the pacman-dev mailing list