Fix: Load Pakva file if --name is used with govel

This commit is contained in:
L0m1g 2025-05-05 16:27:52 +02:00
parent db9b597878
commit fb8c7f1b86
2 changed files with 17 additions and 1 deletions

View file

@ -110,3 +110,11 @@ pak() {{
def __repr__(self):
return f"<Pakva {self.name}-{self.version}>"
@classmethod
def load_from_name(cls, name):
"""
Charge un fichier Pakva depuis son nom uniquement.
"""
path = Config.GOVEL_DIR / name[0] / name / "Pakva"
return cls.read(path)

View file

@ -1,4 +1,12 @@
import os
#
# Erminig - Fonctions de base pour les paquets
# Copyright (C) 2025 L0m1g
# Sous licence DOUARN - Voir le fichier LICENCE pour les détails
#
# Ce fichier fait partie du projet Erminig.
# Libre comme lair, stable comme un menhir, et salé comme le beurre.
#
import hashlib
import tarfile
import tempfile