Install command refuses a running Home when the time locale is not English (strptime on ps lstart)

Ouverte
#517 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
73/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
bash, linux, python, rust
Domaine
backend, cli

Piste de recherche

Start with the runtime cleanup code in install.sh around line 601, where ps -o lstart= output is parsed by the embedded Python. Check how the two process start-time reads are compared and how Python's locale affects strptime. Add the suggested regression test using a non-English LC_TIME; done when cleanup handles that locale and the installer tests pass.

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

Description

Problem

The install command refuses to update a Home whose Runtime is running when the computer's time format is not English:

[4/5] Install
  ... Stopping verified Runtime processes for this installation so the new version can be installed...
Runtime cleanup stopped: time data 'Mon Nov 2 12:06:28 2026' does not match format '%a %b %d %H:%M:%S %Y'
Error: Close this installation's Runtime and retry; its existing files were preserved

Seen 2 Nov 2026 on a Jetson (Ubuntu 22.04) whose system time locale is es_CO.UTF-8, installing 2.0.0 over a running 2.0.0 Home. Nothing was changed.

Cause

install.sh (2.0.0, line ~601) reads each Runtime's start time with ps -o lstart= under LC_ALL=C (English day and month names), then parses it with time.strptime(..., "%a %b %d %H:%M:%S %Y"). Python's strptime matches %a/%b against the process's own LC_TIME names, so on a Spanish (or any non-English) time locale the English names never match.

Workaround

Stop Home first (Ctrl+C in its terminal), or run the installer with the C locale:

curl -fsSL https://elastos.elacitylabs.com/install.sh | LC_ALL=C bash

Checked: the second form installed and moved that Jetson Home to the stable channel.

Fix

Compare the start time as the raw lstart string (both reads come from ps under LC_ALL=C), or run the embedded Python with LC_ALL=C and set locale.setlocale(locale.LC_TIME, "C") before parsing. Add a test that runs the cleanup with LC_TIME=es_CO.UTF-8 (or any non-English locale available on the runner).

Langage dominant
Rust
Étoiles
6
Forks
2
Merge moyen
1 j 3 h
PR mergées (30 j)
42

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

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.

Autres issues de elastos/elastos-runtime

Toutes les issues de elastos/elastos-runtime

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

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