FS#80140 - [namcap] on a specific package, it crashes with python backtrace and `list index out of range`.

Attached to Project: Arch Linux
Opened by Oid Maps (dreieck) - Thursday, 02 November 2023, 09:31 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 02 November 2023, 09:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I have built a package using the attached `PKGBUILD`. The resulting package file is `svg2tikz-git-2.1.0+78.r442.20231102.aab48a4-2-any.pkg.tar`, which is also attached.

When I run `namcap svg2tikz-git-2.1.0+78.r442.20231102.aab48a4-2-any.pkg.tar`, it crashes with

```
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/namcap.py", line 253, in <module>
process_realpackage(package, active_modules)
File "/usr/lib/python3.11/site-packages/namcap.py", line 95, in process_realpackage
rule.analyze(pkginfo, pkgtar)
File "/usr/lib/python3.11/site-packages/Namcap/rules/pydepends.py", line 137, in analyze
if is_script(f) and script_type(f) not in ["python", "python3"]:
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Namcap/util.py", line 48, in script_type
name = cmd[0]
~~~^^^
IndexError: list index out of range
```


Additional info:
* package version(s): namcap: 3.4.2


Regards!
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 02 November 2023, 09:58 GMT
Reason for closing:  Upstream
Additional comments about closing:  namcap bug tracker is at https://gitlab.archlinux.org/pacman/namc ap

Loading...