FS#58552 - [namcap] Invalid "Non standard variable 'source_x86_64' ..." when x86_64 is the only arch

Attached to Project: Arch Linux
Opened by Antony Lee (anntzer) - Saturday, 12 May 2018, 09:34 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:51 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
When a package only supports one arch but has nominally arch-specific sources (e.g.: when we are just repackaging an arch-dependent binary from upstream, but upstream only provides binary for one of the arches supported by Arch Linux), it makes sense to specify the sources as "source_$arch" (e.g. "source_x86" instead of "source" (this usage is consistent with the "Tip" at https://wiki.archlinux.org/index.php/PKGBUILD#source). But namcap specifically throws a warning in that case; I consider the warning invalid.


Additional info:
* namcap 3.2.7


Steps to reproduce:
Create the following PKGBUILD

# Maintainer: me.
pkgname='foobar'
pkgdesc='hello'
url='https://not.an.url'
license=('MIT')
pkgver=0
pkgrel=0
arch=('x86_64')
source_x86_64=('foobar.baz')

build() {
true
}
package() {
true
}

and pass it to namcap. It prints:
PKGBUILD (foobar) W: Non standard variable 'source_x86_64' doesn't start with an underscore


The relevant line is at https://git.archlinux.org/namcap.git/tree/Namcap/rules/extravars.py#n35, where arch-specific variables are considered only if `len(pkginfo["arch"]) >= 2`. Deleting that clause should be sufficient; happy to provide a patch if that helps.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Friday, 11 August 2023, 15:51 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/pacman/namc ap/issues/50
Comment by (arisinfenix) - Monday, 27 January 2020, 09:01 GMT Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...