canonical / canonical/layer-basic

Cannot uninstall PyYAML. It is a distutils installed project

Ouverte
#192 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Python
Étoiles
10
Forks
42
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez dans lib/charms/layer/basic.py, au niveau de bootstrap_charm_deps, et comparez-le avec le install hook indiqué dans le traceback. Examinez comment la commande pip3 utilise le wheelhouse et gère l'installation existante de PyYAML. La tâche est terminée lorsqu'un charm utilisant layer-basic peut être déployé sans l'échec de désinstallation de PyYAML installée par distutils.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.