canonical / canonical/layer-basic

Cannot uninstall PyYAML. It is a distutils installed project

Aperta
#192 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
10
Fork
42
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start in lib/charms/layer/basic.py at bootstrap_charm_deps and compare it with the install hook shown in the traceback. Inspect how the pip3 command uses the wheelhouse and handles the existing PyYAML installation. Done means a charm using layer-basic can deploy without the distutils-installed PyYAML uninstall failure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.