[pacman-dev] [PATCH 4/4] makepkg: use c-style for loops for integrity checks
allan at archlinux.org
Wed Sep 4 23:33:19 EDT 2013
On 04/09/13 13:19, Dave Reisner wrote:
> These loops already maintain an independent loop counter, so cut out
> the middle man. An extra fix is needed to continue supporting sparse
> arrays which, while weird, are valid.
> Signed-off-by: Dave Reisner <dreisner at archlinux.org>
> If we don't care about supporting sparse arrays, I can simply drop the final
> hunk off of this patch and adjust the commit message. Keeping support was
> simple enough that I felt compelled to offer it.
> Note, however, that removing support then causes makepkg to fail in cryptic
> ways when it does encounter a sparse array, e.g.:
> $ makepkg -g
> ==> Generating checksums for source files...
> ==> ERROR: Unable to find source file .
Would putting quotes around the outputted source file name clear this
up? Note that the output of 'makepkg -g' is incorrect (but working -
see below) in the case of sparse source arrays.
> And if you're still lost, a sparse array could be constructed like this:
> This is perhaps a contrived example, but it's valid, and today's makepkg
> handles it just fine.
Also, this currently works with the above source array...
Which I am guess is not supported after this patch.
I am in favour of dropping support for sparse source arrays and just
clarifying the output when an empty source entry is present. That could
just be added in check_sanity.
More information about the pacman-dev