[pacman-dev] [PATCH 1/2] Refactor check_sanity, to give it some sanity of its own

Allan McRae allan at archlinux.org
Sun Aug 3 00:52:48 EDT 2014


On 03/08/14 10:25, Dave Reisner wrote:
> On Sat, Aug 02, 2014 at 11:54:30AM -0400, Dave Reisner wrote:
>> Break apart each of the blocks into their own separate functions. And,
>> instead of the hand crafted eval statements, reuse the logic from
>> pkgbuild-introspection[0] to abstract away the complexities of parsing
>> bash.
>>
>> This commit fixes at least 3 bugs in check_sanity, and one other:
>>
>> 1) The wrong variable is shown for the error which would be thrown
>> when, e.g.  pkgname=('foopkg' 'bar at pkg')
>> 2) The "arch" variable is not sanity checked when the PKGBUILD has
>> package_$pkgname() instead of package().
>> 3) Avoid linting pkgrel/epoch in package functions (because we don't
>> actually support these overrides).
> 
> Looking at get_full_version, I guess I have this wrong. I was thrown off
> by the last line that makepkg outputs, "Finished making: ...", where it
> reports the global pkgver, which might be irrelevant to the package with
> the package override.
> 

Currently we can override pkgver, pkgrel and epoch.  This was on the
bases of a single piece of software which was really two pieces of
software bundled in the same tarball with different versions.  I am
think we could just remove it and simplify a lot of things...

Opinions?

Allan


More information about the pacman-dev mailing list