mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 21:44:16 +02:00
[gems.debian] fix: not properly handling packages with names ending with :i386
This commit is contained in:
@@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- some desktop entries not being displayed on the desktop environment menu (requires the AppImage to be reinstalled) [#287](https://github.com/vinifmor/bauh/issues/287)
|
- some desktop entries not being displayed on the desktop environment menu (requires the AppImage to be reinstalled) [#287](https://github.com/vinifmor/bauh/issues/287)
|
||||||
- Arch
|
- Arch
|
||||||
- not detecting some package replacements when upgrading due to conflict information having logic operators (e.g: `at-spi2-core: 2.44.1 -> 2.46.0` should replace the installed `at-spi2-atk: 2.38`)
|
- not detecting some package replacements when upgrading due to conflict information having logic operators (e.g: `at-spi2-core: 2.44.1 -> 2.46.0` should replace the installed `at-spi2-atk: 2.38`)
|
||||||
|
- Debian
|
||||||
|
- not properly handling packages with names ending with `:i386` [#298](https://github.com/vinifmor/bauh/issues/298)
|
||||||
- GUI
|
- GUI
|
||||||
- management panel not fully maximizing
|
- management panel not fully maximizing
|
||||||
|
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ class Aptitude:
|
|||||||
@property
|
@property
|
||||||
def re_transaction_pkg(self) -> Pattern:
|
def re_transaction_pkg(self) -> Pattern:
|
||||||
if self._re_transaction_pkg is None:
|
if self._re_transaction_pkg is None:
|
||||||
self._re_transaction_pkg = re.compile(r'([a-zA-Z0-9\-_@~.+]+)({\w+})?\s*\[([a-zA-Z0-9\-_@~.+:]+)'
|
self._re_transaction_pkg = re.compile(r'([a-zA-Z0-9\-_@~.+:]+)({\w+})?\s*\[([a-zA-Z0-9\-_@~.+:]+)'
|
||||||
r'(\s+->\s+([a-zA-Z0-9\-_@~.+:]+))?](\s*<([\-+]?[0-9.,]+\s+\w+)>)?')
|
r'(\s+->\s+([a-zA-Z0-9\-_@~.+:]+))?](\s*<([\-+]?[0-9.,]+\s+\w+)>)?')
|
||||||
|
|
||||||
return self._re_transaction_pkg
|
return self._re_transaction_pkg
|
||||||
|
|||||||
@@ -166,3 +166,33 @@ Description: GNU C compiler
|
|||||||
]
|
]
|
||||||
|
|
||||||
self.assertEqual([p.__dict__ for p in expected], [p.__dict__ for p in returned])
|
self.assertEqual([p.__dict__ for p in expected], [p.__dict__ for p in returned])
|
||||||
|
|
||||||
|
def test_map_transaction_output__it_should_map_i386_packages(self):
|
||||||
|
output = "\nThe following NEW packages will be installed:\n" \
|
||||||
|
" gcc-12-base:i386{a} [12.1.0-2distro~22.04] <+272 kB> glib-networking:i386{a} [2.72.0-1] <+242 kB>\n" \
|
||||||
|
"\nThe following packages will be REMOVED:\n" \
|
||||||
|
" celluloid{a} [0.21-linux+distro] <-1066 kB> libpcre3:i386{a} [2:8.39-13distro0.22.04.1] <-714 kB>"
|
||||||
|
|
||||||
|
transaction = self.aptitude.map_transaction_output(output)
|
||||||
|
to_install = {
|
||||||
|
DebianPackage(name="gcc-12-base:i386",
|
||||||
|
version="12.1.0-2distro~22.04",
|
||||||
|
latest_version="12.1.0-2distro~22.04",
|
||||||
|
transaction_size=272000.0
|
||||||
|
),
|
||||||
|
DebianPackage(name="glib-networking:i386", version="2.72.0-1",
|
||||||
|
latest_version="2.72.0-1", transaction_size=242000.0)
|
||||||
|
}
|
||||||
|
self.assertEqual(to_install, {*transaction.to_install})
|
||||||
|
|
||||||
|
to_remove = {
|
||||||
|
DebianPackage(name="celluloid",
|
||||||
|
version="0.21-linux+distro",
|
||||||
|
latest_version="0.21-linux+distro",
|
||||||
|
transaction_size=-1066000.0
|
||||||
|
),
|
||||||
|
DebianPackage(name="libpcre3:i386", version="2:8.39-13distro0.22.04.1",
|
||||||
|
latest_version="2:8.39-13distro0.22.04.1", transaction_size=-714000.0)
|
||||||
|
}
|
||||||
|
|
||||||
|
self.assertEqual(to_remove, {*transaction.to_remove})
|
||||||
|
|||||||
Reference in New Issue
Block a user