mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[arch] fix -> AUR: not installing the correct package built when several are generated
This commit is contained in:
@@ -64,6 +64,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- info dialog of installed packages displays the latest PKGBUILD file instead of the one used for installation/upgrade/downgrade (the fix will only work for new installed packages)
|
||||
- multi-threaded download: not retrieving correctly some source files URLs (e.g: linux-xanmod-lts)
|
||||
- importing PGP keys (Generic error). Now the key server is specified: `gpg --keyserver SERVER --recv-key KEYID` (the server address is retrieved from [bauh-files](https://github.com/vinifmor/bauh-files/blob/master/arch/gpgservers.txt))
|
||||
- not installing the correct package built when several are generated (e.g: linux-xanmod-lts)
|
||||
- some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, makepkg)
|
||||
- Flatpak
|
||||
- downgrading crashing with version 1.8.X
|
||||
|
||||
@@ -1680,7 +1680,21 @@ class ArchManager(SoftwareManager):
|
||||
context.watcher.print('Could not find the built package. Aborting...')
|
||||
return False
|
||||
|
||||
context.install_file = '{}/{}'.format(context.project_dir, gen_file[0])
|
||||
file_to_install = gen_file[0]
|
||||
|
||||
if len(gen_file) > 1:
|
||||
srcinfo = aur.map_srcinfo(makepkg.gen_srcinfo(context.project_dir))
|
||||
pkgver = '-{}'.format(srcinfo['pkgver']) if srcinfo.get('pkgver') else ''
|
||||
pkgrel = '-{}'.format(srcinfo['pkgrel']) if srcinfo.get('pkgrel') else ''
|
||||
arch = '-{}'.format(srcinfo['arch']) if srcinfo.get('arch') else ''
|
||||
name_start = '{}{}{}{}'.format(context.name, pkgver, pkgrel, arch)
|
||||
|
||||
perfect_match = [f for f in gen_file if f.startswith(name_start)]
|
||||
|
||||
if perfect_match:
|
||||
file_to_install = perfect_match[0]
|
||||
|
||||
context.install_file = '{}/{}'.format(context.project_dir, file_to_install)
|
||||
|
||||
if self._install(context=context):
|
||||
self._save_pkgbuild(context)
|
||||
|
||||
Reference in New Issue
Block a user