You are not logged in.

#1 2020-07-28 08:18:40

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

[SOLVED] Unable to use namcap

No matter what PKGBUILD is I'm testing it always gives me this error:

namcap aur/anydesk-bin/PKGBUILD 
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.8/site-packages/namcap.py", line 247, in <module>
    process_pkgbuild(package, active_modules)
  File "/usr/lib/python3.8/site-packages/namcap.py", line 148, in process_pkgbuild
    ret = rule.analyze(pkginfo, package)
  File "/usr/lib/python3.8/site-packages/Namcap/rules/makedepends.py", line 59, in analyze
    for s in pkginfo["source"]:
  File "/usr/lib/python3.8/site-packages/Namcap/package.py", line 128, in __getitem__
    return self._data[self.canonical_varname(key)]
KeyError: 'source'
namcap --version
3.2.10

I doubt that this is a problem with package itself and should be discussed in bugtracker, it seems that I'm missing something, any ideas?

Last edited by aminvakil (2020-07-28 08:48:50)

Offline

#2 2020-07-28 08:32:48

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,985
Website

Re: [SOLVED] Unable to use namcap

It does matter, which PKGBUILD you're testing.
Namcap expects the PKGBUILD to have a source array.
But the PKGBUILD you're testing does not have one, hence the error.
It has two arrays source_i686 and source_x86_64 specific for the respective architecture.
It might be woth a feature request on the bug tracker.

PS: There's already a bug filed on this: https://bugs.archlinux.org/task/65042

Last edited by schard (2020-07-28 09:03:02)


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#3 2020-07-28 08:48:30

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

Re: [SOLVED] Unable to use namcap

Oops!

I had checked multiple packages, but as you've mentioned all of them are using source_i686 and source_x86_64, will follow the bugtracker, thanks!

Offline

Board footer

Powered by FluxBB