mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[arch] fix -> AUR: not properly handling AUR package dependencies with specific versions
This commit is contained in:
@@ -116,6 +116,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- some packages dependencies cannot be downloaded due to the wrong download URL (missing the 'pkgbase' field to determine the proper url)
|
||||
- not properly extracting srcinfo data when several pkgnames are declared (leads to wrong dependencies requirements)
|
||||
- not detecting some package updates
|
||||
- not properly handling AUR package dependencies with specific versions. e.g: abc>=1.20
|
||||
|
||||
- Flatpak
|
||||
- downgrading crashing with version 1.8.X
|
||||
|
||||
@@ -7,7 +7,7 @@ from typing import Set, List, Iterable, Dict, Optional
|
||||
import requests
|
||||
|
||||
from bauh.api.http import HttpClient
|
||||
from bauh.gems.arch import pacman, AUR_INDEX_FILE
|
||||
from bauh.gems.arch import AUR_INDEX_FILE
|
||||
from bauh.gems.arch.exceptions import PackageNotFoundException
|
||||
|
||||
URL_INFO = 'https://aur.archlinux.org/rpc/?v=5&type=info&'
|
||||
@@ -160,14 +160,16 @@ class AURClient:
|
||||
|
||||
def extract_required_dependencies(self, srcinfo: dict) -> Set[str]:
|
||||
deps = set()
|
||||
|
||||
for attr in ('makedepends',
|
||||
'makedepends_{}'.format('x86_64' if self.x86_64 else 'i686'),
|
||||
'depends',
|
||||
'depends_{}'.format('x86_64' if self.x86_64 else 'i686'),
|
||||
'checkdepends',
|
||||
'checkdepends_{}'.format('x86_64' if self.x86_64 else 'i686')):
|
||||
|
||||
if srcinfo.get(attr):
|
||||
deps.update([pacman.RE_DEP_OPERATORS.split(dep)[0] for dep in srcinfo[attr]])
|
||||
deps.update(srcinfo[attr])
|
||||
|
||||
return deps
|
||||
|
||||
|
||||
@@ -1904,7 +1904,13 @@ class ArchManager(SoftwareManager):
|
||||
return missing_deps
|
||||
|
||||
def _handle_missing_deps(self, context: TransactionContext) -> bool:
|
||||
missing_deps = self._list_missing_deps(context)
|
||||
try:
|
||||
missing_deps = self._list_missing_deps(context)
|
||||
except PackageNotFoundException:
|
||||
return False
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return False
|
||||
|
||||
if missing_deps is None:
|
||||
return False # called off by the user
|
||||
|
||||
@@ -250,10 +250,10 @@ class DependenciesAnalyser:
|
||||
missing_deps.add((dep_name, 'aur'))
|
||||
else:
|
||||
if watcher:
|
||||
message.show_dep_not_found(dep_name, self.i18n, watcher)
|
||||
raise PackageNotFoundException(dep_name)
|
||||
message.show_dep_not_found(dep_exp, self.i18n, watcher)
|
||||
raise PackageNotFoundException(dep_exp)
|
||||
else:
|
||||
raise PackageNotFoundException(dep_name)
|
||||
raise PackageNotFoundException(dep_exp)
|
||||
|
||||
def __fill_aur_update_data(self, pkgname: str, output: dict):
|
||||
output[pkgname] = self.aur_client.map_update_data(pkgname, None)
|
||||
@@ -308,17 +308,20 @@ class DependenciesAnalyser:
|
||||
version_informed = parse_version(version_informed)
|
||||
|
||||
op = dep_split[1] if dep_split[1] != '=' else '=='
|
||||
if not eval('version_found {} version_informed'.format(op)):
|
||||
self._fill_missing_dep(dep_name=dep_name, dep_exp=dep, aur_index=aur_index,
|
||||
missing_deps=missing_deps,
|
||||
remote_provided_map=remote_provided_map,
|
||||
remote_repo_map=remote_repo_map,
|
||||
repo_deps=repo_missing, aur_deps=aur_missing,
|
||||
watcher=watcher,
|
||||
deps_data=deps_data,
|
||||
automatch_providers=automatch_providers)
|
||||
match = eval('version_found {} version_informed'.format(op))
|
||||
except:
|
||||
match = False
|
||||
traceback.print_exc()
|
||||
|
||||
if not match:
|
||||
self._fill_missing_dep(dep_name=dep_name, dep_exp=dep, aur_index=aur_index,
|
||||
missing_deps=missing_deps,
|
||||
remote_provided_map=remote_provided_map,
|
||||
remote_repo_map=remote_repo_map,
|
||||
repo_deps=repo_missing, aur_deps=aur_missing,
|
||||
watcher=watcher,
|
||||
deps_data=deps_data,
|
||||
automatch_providers=automatch_providers)
|
||||
else:
|
||||
self._fill_missing_dep(dep_name=dep_name, dep_exp=dep, aur_index=aur_index,
|
||||
missing_deps=missing_deps,
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body=Les aplicacions {} estan en conflicte. Heu de d
|
||||
arch.install.conflict.popup.title=S’ha detectat un conflicte
|
||||
arch.install.dep_not_found.body.l1=No s’ha trobat la dependència requerida {} a l’AUR ni als dipòsits
|
||||
arch.install.dep_not_found.body.l2=It might be a package database synchronization problem.
|
||||
arch.install.dep_not_found.body.l3=S’ha cancel·lat la instal·lació.
|
||||
arch.install.dep_not_found.body.l3=Operation cancelled.
|
||||
arch.install.dep_not_found.title=No s’ha trobat la dependència
|
||||
arch.install.dependency.install=S’està instal·lant el paquet depenent {}
|
||||
arch.install.dependency.install.error=Could not install the dependent packages: {}. Installation of {} aborted.
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body=Die Anwendungen {} können nicht gleichzeitig i
|
||||
arch.install.conflict.popup.title=Konflikt entdeckt
|
||||
arch.install.dep_not_found.body.l1=Nötige Abhängigkeit {} wurde weder im AUR noch in den standard Spiegelservern gefunden
|
||||
arch.install.dep_not_found.body.l2=It might be a package database synchronization problem.
|
||||
arch.install.dep_not_found.body.l3=Installation abgebrochen.
|
||||
arch.install.dep_not_found.body.l3=Operation cancelled.
|
||||
arch.install.dep_not_found.title=Abhängigkeit nicht gefunden
|
||||
arch.install.dependency.install=Abhängigket {} wird installiert
|
||||
arch.install.dependency.install.error=Could not install the dependent packages: {}. Installation of {} aborted.
|
||||
|
||||
@@ -171,7 +171,7 @@ arch.install.conflict.popup.body=The applications {} are in conflict. You must u
|
||||
arch.install.conflict.popup.title=Conflict detected
|
||||
arch.install.dep_not_found.body.l1=Required dependency {} was not found in AUR nor in the repositories.
|
||||
arch.install.dep_not_found.body.l2=It might be a package database synchronization problem.
|
||||
arch.install.dep_not_found.body.l3=Installation cancelled.
|
||||
arch.install.dep_not_found.body.l3=Operation cancelled.
|
||||
arch.install.dep_not_found.title=Dependency not found
|
||||
arch.install.dependency.install=Installing package dependency {}
|
||||
arch.install.dependency.install.error=Could not install the dependent packages: {}. Installation of {} aborted.
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body=Los aplicativos {} estan en conflicto. Debe des
|
||||
arch.install.conflict.popup.title=Conflicto detectado
|
||||
arch.install.dep_not_found.body.l1=No se encontró la dependencia requerida {} en AUR ni en los repositorios.
|
||||
arch.install.dep_not_found.body.l2=Puede ser un problema de sincronización de la base de paquetes.
|
||||
arch.install.dep_not_found.body.l3=Instalación cancelada.
|
||||
arch.install.dep_not_found.body.l3=Operación cancelada.
|
||||
arch.install.dep_not_found.title=Dependencia no encontrada
|
||||
arch.install.dependency.install=Instalando el paquete dependiente {}
|
||||
arch.install.dependency.install.error=No se pudo instalar los paquetes dependientes: {}. Instalación de {} abortada.
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body=Le applicazioni {} sono in conflitto. È necess
|
||||
arch.install.conflict.popup.title=Conflitto rilevato
|
||||
arch.install.dep_not_found.body.l1=La dipendenza richiesta {} non è stata trovata in AUR né nei depositos.
|
||||
arch.install.dep_not_found.body.l2=It might be a package database synchronization problem.
|
||||
arch.install.dep_not_found.body.l3=Installazione annullata.
|
||||
arch.install.dep_not_found.body.l3=Operation cancelled.
|
||||
arch.install.dep_not_found.title=Dipendenza non trovata
|
||||
arch.install.dependency.install=Installazione della dipendenza pacchetto {}
|
||||
arch.install.dependency.install.error=Could not install the dependent packages: {}. Installation of {} aborted.
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body=Os aplicativos {} estão em conflito. Você pre
|
||||
arch.install.conflict.popup.title=Conflito detectado
|
||||
arch.install.dep_not_found.body.l1=A dependência {} não foi encontrado no AUR nem nos repositórios.
|
||||
arch.install.dep_not_found.body.l2=Pode ser um problema de sincronização das bases de pacotes.
|
||||
arch.install.dep_not_found.body.l3=Instalação cancelada.
|
||||
arch.install.dep_not_found.body.l3=Operação cancelada.
|
||||
arch.install.dep_not_found.title=Dependência não encontrada
|
||||
arch.install.dependency.install=Instalando o pacote dependente {}
|
||||
arch.install.dependency.install.error=Não foi possível instalar os pacotes dependentes: {}. Instalação de {} abortada.
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body=Приложения {} находятся в
|
||||
arch.install.conflict.popup.title=Обнаружен конфликт
|
||||
arch.install.dep_not_found.body.l1=Требуемая зависимость {} не была найдена ни в AUR, ни в зеркалах по умолчанию.
|
||||
arch.install.dep_not_found.body.l2=It might be a package database synchronization problem.
|
||||
arch.install.dep_not_found.body.l3=Установка отменена.
|
||||
arch.install.dep_not_found.body.l3=Operation cancelled.
|
||||
arch.install.dep_not_found.title=Зависимость не найдена
|
||||
arch.install.dependency.install=Установка зависимостей пакета {}
|
||||
arch.install.dependency.install.error=Could not install the dependent packages: {}. Installation of {} aborted.
|
||||
|
||||
@@ -170,7 +170,7 @@ arch.install.conflict.popup.body={} Uygulamaları çakışıyor. Diğerini kurma
|
||||
arch.install.conflict.popup.title=Çakışma tespit edildi
|
||||
arch.install.dep_not_found.body.l1=Gerekli bağımlılık {} ne AUR ne de resmi depolarda bulunamadı.
|
||||
arch.install.dep_not_found.body.l2=Bir paket veritabanı senkronizasyon sorunu olabilir.
|
||||
arch.install.dep_not_found.body.l3=Yükleme iptal edildi.
|
||||
arch.install.dep_not_found.body.l3=Operation cancelled.
|
||||
arch.install.dep_not_found.title=Bağımlılık bulunamadı
|
||||
arch.install.dependency.install=Paket bağımlılığını yükleniyor {}
|
||||
arch.install.dependency.install.error=Bağımlı paketler yüklenemedi: {}. {} Kurulumu iptal edildi.
|
||||
|
||||
Reference in New Issue
Block a user