aboutcode-org / aboutcode-org/scancode-toolkit

Error when there's sub-directory under rcs & sccs directory

オープン
#1,422 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug core and api major
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

### Description
When I scan a directory sccs(or rcs) with sub-directory(such as rcs/a), the scan scan fails with keyerror.
Note 1: I've scanned a git directory with .git & it works without error.
Note 2: when I comment out '*/rcs' and '*/sccs' in src/commoncode/ignore.py, there's no error.

```
[khoale:~/workspace/test]> mkdir sccs
[khoale:~/workspace/test]> mkdir sccs/a
[khoale:~/workspace/test]> /usr2/khoale/scancode-toolkit-3.0.2/scancode -clp --verbose --json-pp - /usr2/khoale/workspace/test
Setup plugin: output:json-pp...
Setup plugin: scan:packages...
Setup plugin: scan:copyrights...
Setup plugin: scan:licenses...
Collect file inventory...
ERROR: failed to collect codebase at: '/usr2/khoale/workspace/test'
Traceback (most recent call last):
File "/usr2/khoale/scancode-toolkit-3.0.2/src/scancode/cli.py", line 707, in scancode
max_in_memory=max_in_memory
File "/khoale/scancode-toolkit-3.0.2/src/scancode/resource.py", line 280, in __init__
self._populate()
File "/usr2/khoale/scancode-toolkit-3.0.2/src/scancode/resource.py", line 439, in _populate
parent = parent_by_loc.pop(top)
KeyError: '/usr2/khoale/workspace/test/sccs/a'
```

### System configuration
For bug reports, it really helps us to know:
* What OS are you running on? Linux / Ubuntu 16.04 LTS ; python 2.7.3
* What version of scancode-toolkit was used to generate the scan file? scancode-toolkit-3.0.2/
* What installation method was used to install/run scancode? (pip/source download/other)
Download from release git release page & unzip

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。