Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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 Doug Newgard (Scimmia) - Saturday, 12 May 2018, 14:22 GMT
Task Type Bug Report
Category Arch Projects
Status Assigned
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
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

Loading...