arch="noarch !armv7" causes -dbg subpackage to fail
15:33 < zv> in an APKBUILD, is something like arch="noarch !x86_64" legitimate? abuild seems to use the string literal "noarch" for comparison -- https://git.alpinelinux.org/abuild/tree/abuild.in#n1204
15:35 < zv> the reasoning here is for when e.g. makedepends cannot be satisfied on a particular arch
15:38 <@psykose> yes
15:38 <@psykose> that line is in trace way after everything happens
15:39 <@psykose> if you do noarch !x86_64 the whole build just gets skipped on x86_64, it's not really 'actual noarch', so it works like all !x86_64 and just doesn't build it
15:41 < zv> psykose: the problem I am experiencing is, say it's "noarch !x86_64", now my arm build fails because it complains that -dbg is empty
15:43 <@psykose> well, that's a separate question
15:43 < ikke> then you should only add $pkgname-dbg if $CARCH != x86_64
15:44 <@psykose> nah
15:44 <@psykose> noarch implicitly skips strip/-dbgsplit
15:44 <@psykose> in your case you want all !x86_64 if your intention is 'dont build it on x86_64'
15:44 <@psykose> i'm not sure what you're actually doing however
15:45 <@psykose> 'for when e.g. makedepends cannot be satisfied on a particular arch' generally just means 'so you disable it on that arch', just a regular all !x86_64
15:45 < zv> I just want to skip it on x86_64 because it will otherwise fail to build with unsatisfied deps, the package itself is truly noarch
15:45 <@psykose> what's in the -dbg
15:46 <@psykose> also i was wrong, it doesn't skip -dbg
15:46 < zv> nothing at all. hence why it fails. when arch="noarch" (not arch="noarch !x86_64") it works fine
15:46 < ikke> Why is $pkgname-dbg in there then?
15:46 < ikke> Just remove it?
15:46 <@psykose> can you just paste the actual file
15:47 < zv> https://cgit.adelielinux.org/packages/tree/user/ant/APKBUILD
15:48 <@psykose> and when you build that on x86_64 env, it fails? what should i run to reproduce it
15:49 <@psykose> that looks correct however
15:49 <@psykose> we have a million of those
15:49 < zv> s/x86_64/armv7 here, you can reproduce it by just 'abuild -r', the relevant bit of error log is here https://git.adelielinux.org/adelie/packages/-/issues/1031
15:49 < zv> the build is successful when you change it back to arch="noarch"
15:49 < ikke> that does not seem to correspond with the APKBUILD you linked to
15:50 <@psykose> do you have DEFAULT_DBG=1
15:50 <@psykose> that would do that
15:50 <@psykose> the check here would add a -dbg with nothing https://git.alpinelinux.org/abuild/tree/abuild.in#n2893
15:51 <@psykose> since you have "noarch .." instead of "noarch" it would create a subpackage that does nothing and fail like that
15:51 <@psykose> it is an actual bug but we don't use default_dbg ourselves
15:51 <@psykose> the [ "$arch" != "noarch" ] has to be changes to just check if 'noarch at all'
15:51 <@psykose> you can probably patch it pretty easily
Upstream: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10109