[pacman-dev] patch submission help
Jeff
jeff at kconline.com
Tue Mar 17 19:49:38 EDT 2009
On Tue, Mar 17, 2009 at 11:17:20AM +1000, Allan McRae wrote:
>
> 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.
This can be dangerous, unless the pacman devs personally undertake the
migration of all extant PKGBUILDs. Since I just realized the problem
yesterday, I have not had time to think about the best fix, but I think
the fix should be rather trivial at least in reference to my patch. I'd
really like to see your branch and I could send you my patch
(onlist/offlist your choice) as a matter of reference if you would like
my input.
> 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.
>From a technical standpoint, I prefer the --check arg better than
putting an option override in a PKGBUILD, but then I also like the
option override as a "hint" to the individual who is building packageX
that the testsuite _should_ be run. I'll keep using my modified
pacman-3.2.2 until I finish the current rebuild, but after that I'd be
happy to test the changes. I have no interest in maintaining my own set
of patches. :)
As a side note, I've modified dozens of PKGBUILDs to implement this
change, and I'm rather clueless as to why all the || return 1 statements
exist since set -e is in use. Are they cruft left behind from an earlier
version of makepkg that didn't bail on the first error? Also, my patch
actually just runs run_build() with an argument (the arg being the name
of the PKGBUILD function to run) so there was no code duplication. In
run_build() I put in a simple:
cd "${srcdir}/${pkgname}-${pkgver}" || cd "${srcdir}"
as it seemed silly to have a cd command in every single PKGBUILD when a
good number of tarballs follow the ${pkgname}-${pkgver} naming scheme. I
don't know if you have added that feature or not. Especially with more
than one function in PKGBUILD, cd would have to be duplicated (and still
will for non-standard source tarballs). A function for determining that
name might be useful, though, and would help in all cases except where
the build dir != source dir (like glibc). Anyway, just food for thought!
--
Jeff
My other computer is an abacus.
More information about the pacman-dev
mailing list