Project

General

Profile

Bug #101275

Revoir le test test_apt_pkg_vs_apt ?

Added by Benjamin Dauvergne about 2 months ago. Updated about 2 months ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
25 January 2025
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Vu dans #101220 ce test est fortement dépendant de l'état des paquets sur la machine (il faut des paquets installés du dépôt Entr'ouvert sur machine déjà, sinon ça ne test pas grand chose).

Dans cette situation:

entrouvert-archive-keyring:
  Installé : 0.26-1~eob120+1
  Candidat : 0.28-1~eob120+1
 Table de version :
     0.28-1~eob120+1 500
        500 https://deb.entrouvert.org bookworm/main amd64 Packages
 *** 0.26-1~eob120+1 100
        100 /var/lib/dpkg/status

Le code suivant ne renvoie pas deb.entrouvert.org dans les repos.

    def repo_from_version(lines, version):
        # Parse apt-cache policy output
        repo = []
        priority = None
        for line in lines:
            line = line.strip()
            if not priority:
                if not line.startswith('*** %s' % version):
                    continue
                priority = line.split(' ')[2].strip()
                continue
            if line.startswith('***'):
                break  # another version table entry : too far
            if line.startswith(priority):
                repo.append(line.split(' ')[1])
        return repo

Je ne vois pas trop comment ça peut trouver les informations liés à la version non installée du paquet vu que ça ne cherche que les lignes commençant par '***' qui indique la version installée.


Related issues

Related to Hobo - Bug #101220: build en échec sur test_version.test_apt_pkg_vs_aptSolution déployée24 January 2025

Actions

History

#1

Updated by Benjamin Dauvergne about 2 months ago

  • Related to Bug #101220: build en échec sur test_version.test_apt_pkg_vs_apt added

Also available in: Atom PDF