[arch-general] makechrootpkg and multiple sources, a bug?

Allan McRae allan at archlinux.org
Sun Feb 20 05:54:28 EST 2011


On 20/02/11 20:35, Allan McRae wrote:
> On 20/02/11 20:19, Magnus Therning wrote:
>> On Sun, Feb 20, 2011 at 08:09:16PM +1000, Allan McRae wrote:
>>> On 20/02/11 20:05, Magnus Therning wrote:
>>>> On Sun, Feb 20, 2011 at 07:55:10PM +1000, Allan McRae wrote:
>>>>> On 20/02/11 19:36, Magnus Therning wrote:
>>>>>> I just tried building a package with more than one source file using
>>>>>> makechrootpkg. It failed with this message:
>>>>>>
>>>>>> ==> ERROR: Integrity checks (md5) differ in size from the source
>>>>>> array.
>>>>>
>>>>> That is an error from makepkg.
>>>>
>>>> Indeed, but AFAICS it's caused by makechrootpkg not copying all the
>>>> sources into the build chroot for makepkg to find.
>>>>
>>>
>>> No... it cause by your PKGBUILD having more/less entries in the
>>> sources array that the md5sums array.
>>
>> Please, read my initial email!
>>
>> My PKGBUILD is just fine, it builds out of the build chroot (using
>> makepkg directly) and it builds when I modify makechrootpkg as I
>> outlined.
>>
>> The source array is modified based on files in the dir holding the
>> PKGBUILD, like this:
>>
>> if [[ -f my.patch ]]; then
>> sources=(${sources[@] my.patch)
>> fi
>>
>> So the build failure reported by makepkg *really* is caused by
>> makechrootpkg not copying over all the source files.
>>
>> (Now it may be bad to modify the source array that way, but that's a
>> different discussion altogether.)
>>
>
> makechrootpkg sets SRCDEST and copies the source files there. Your
> PKGBUILD assumes the sources are alongside the PKGBUILD. When run with
> makechrootpkg, your PKGBUILD fails as the "[[ -f my.patch ]]" fails as
> my.patch is not in the current directory, but rather in $SRCDIR.
>
> Try:
> if [[ -f $SRCDIR/my.patch ]];

Well, that would be wrong.  This probably works...

if [[ -f ${SRCDEST:-.}/my.patch ]]

Allan


More information about the arch-general mailing list