[pacman-dev] [PATCH] makepkg: respect --ignorearch when verifying source or printing packagelist

Eli Schwartz eschwartz at archlinux.org
Sun May 13 03:19:52 UTC 2018


On 04/29/2018 07:28 AM, Allan McRae wrote:
> On 04/04/18 07:50, Eli Schwartz wrote:
>> --verifysource is often used to validate the PKGBUILD before uploading
>> to the AUR, but currently there is no way to trivially check all sources.
>> By default we don't check sources we won't use, because it forces
>> downloading those sources, but in certain cases the user might need to
>> check them regardless...
>>
> 
> We looked at this when architecture dependent sources were added and
> many or even most packages with architecture independent sources have
> sources with the same filename from a different source path, or change
> the source to have the same filename to make the rest of the PKGBUILD
> easier.  So that was not implemented.

Since this does not currently work anyway due to --allsource not
supporting it, I don't think it makes sense to reject features over this.

I'd argue we shouldn't support this anyway:

CARCH-specific *tarballs* won't clash anyway as only the one for the
currently building architecture will be extracted, so either they both
use the same internal filelist but won't clash, or they use
CARCH-specific filelists in which case the maintainer must switch
between them anyway. In either case it's out of our hands.

For files, it's trivial to rename them to foo-x86_64 then use foo-$CARCH
in the build/package functions. IMHO it makes more sense, because this
results in more obvious behavior in addition to supporting my patch...
though I could be biased.

I guess an argument could be made that since we functionally don't
support it, we should do an explicit linting check, but that's a
separate matter.

>> --packagelist is usually used to derive the built package names for the
>> user's machine, but in some cases, e.g. repo building, we might want to
>> get the packagelist for all supported arches. This is primarily
>> motivated by the desire to use this in the dbscripts testsuite (which
>> tests for i686 and x86_64). While dbscripts could use `for a in
>> ${ARCHES[@]}; do CARCH=$a makepkg --packagelist` it seemed easier to add
>> this directly in makepkg once I was already changing --verifysource.
> 
> I'm not adding a feature to support a testsuite and not an actual usage.
>  Do the loop.

Would it help to convince you if I said I also want to use this in
devtools instead of some custom function to find cached packages? It's
less important there because unlike dbscripts, I don't need to fix
makepkg 5.1 compatibility *anyway*, but IMHO devtools could still use
it. Even if we only currently support one arch in devtools, it's still
"more proper" behavior.

I'm not sure how many other thirdparty uses could be helped by this.
Mostly because I don't really follow thirdparty infrastructure built
around makepkg.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180512/f8c89ba1/attachment.asc>


More information about the pacman-dev mailing list