canonical / canonical/layer-basic

Cannot uninstall PyYAML. It is a distutils installed project

Abierto
#192 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
10
Forks
42
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Empieza en lib/charms/layer/basic.py, en bootstrap_charm_deps, y compáralo con el install hook mostrado en el traceback. Inspecciona cómo el comando pip3 usa el wheelhouse y gestiona la instalación existente de PyYAML. El trabajo estará terminado cuando un charm que use layer-basic pueda desplegarse sin el error de desinstalación de PyYAML instalada mediante distutils.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.