canonical / canonical/layer-basic
Cannot uninstall PyYAML. It is a distutils installed project
- 主要言語
- Python
- スター
- 10
- フォーク
- 42
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm trying to deploy a charm I've built some time ago which now fails to deploy: https://github.com/erik78se/layer-nextcloud
It seems that the layer-basic pulls in pyYAML which then collides with some system package. I'm not sure about the mechanism, but perhaps there is a way to get around this issue since I'm only including layer-basic in my charm (layer.yaml).
```
$ juju debug-log
2020-10-19 17:12:42 DEBUG install Found existing installation: six 1.15.0
2020-10-19 17:12:42 DEBUG install Uninstalling six-1.15.0:
2020-10-19 17:12:42 DEBUG install Successfully uninstalled six-1.15.0
2020-10-19 17:12:42 DEBUG install Running setup.py install for six: started
2020-10-19 17:12:42 DEBUG install Running setup.py install for six: finished with status 'done'
2020-10-19 17:12:42 DEBUG install Found existing installation: netaddr 0.7.19
2020-10-19 17:12:42 DEBUG install Uninstalling netaddr-0.7.19:
2020-10-19 17:12:42 DEBUG install Successfully uninstalled netaddr-0.7.19
2020-10-19 17:12:42 DEBUG install Running setup.py install for netaddr: started
2020-10-19 17:12:43 DEBUG install Running setup.py install for netaddr: finished with status 'done'
2020-10-19 17:12:43 DEBUG install Found existing installation: PyYAML 3.12
2020-10-19 17:12:43 DEBUG install Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
2020-10-19 17:12:43 DEBUG install Traceback (most recent call last):
2020-10-19 17:12:43 DEBUG install File "/var/lib/juju/agents/unit-nextcloud-2/charm/hooks/install", line 8, in
2020-10-19 17:12:43 DEBUG install basic.bootstrap_charm_deps()
2020-10-19 17:12:43 DEBUG install File "lib/charms/layer/basic.py", line 208, in bootstrap_charm_deps
2020-10-19 17:12:43 DEBUG install env=_get_subprocess_env())
2020-10-19 17:12:43 DEBUG install File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
2020-10-19 17:12:43 DEBUG install raise CalledProcessError(retcode, cmd)
2020-10-19 17:12:43 DEBUG install subprocess.CalledProcessError: Command '['pip3', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'wheel', 'pbr', 'Jinja2', 'six', 'netaddr', 'PyYAML', 'MarkupSafe', 'pyaml', 'Tempita', 'charmhelpers', 'charms.reactive']' returned non-zero exit status 1.
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
lib/charms/layer/basic.py の bootstrap_charm_deps から始め、traceback に示されている install hook と比較します。pip3 コマンドが wheelhouse をどのように使用し、既存の PyYAML のインストールをどのように処理しているかを調べます。layer-basic を使用する charm を、distutils でインストールされた PyYAML のアンインストール失敗なしにデプロイできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100