mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[debian] fix: removing unused packages on any type of transaction
This commit is contained in:
@@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Debian
|
- Debian
|
||||||
- info: crashing when the package size has unexpected symbols [#251](https://github.com/vinifmor/bauh/issues/251)
|
- info: crashing when the package size has unexpected symbols [#251](https://github.com/vinifmor/bauh/issues/251)
|
||||||
- displaying wrong symbols among numbers in install/uninstall/upgrade outputs for systems without english encoding installed
|
- displaying wrong symbols among numbers in install/uninstall/upgrade outputs for systems without english encoding installed
|
||||||
|
- removing unused packages on any type of transaction (this is the default behaviour for aptitude)
|
||||||
|
|
||||||
- UI
|
- UI
|
||||||
- not displaying the right unit symbol for byte based sizes (kB, MB, TB, ...) [#250](https://github.com/vinifmor/bauh/issues/250)
|
- not displaying the right unit symbol for byte based sizes (kB, MB, TB, ...) [#250](https://github.com/vinifmor/bauh/issues/250)
|
||||||
|
|||||||
@@ -259,13 +259,16 @@ class Aptitude:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def gen_remove_cmd(cls, packages: Iterable[str], purge: bool, simulate: bool = False) -> str:
|
def gen_remove_cmd(cls, packages: Iterable[str], purge: bool, simulate: bool = False) -> str:
|
||||||
return cls.gen_transaction_cmd('purge' if purge else 'remove', packages, simulate)
|
return cls.gen_transaction_cmd(type_='purge' if purge else 'remove', packages=packages,
|
||||||
|
simulate=simulate)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def gen_transaction_cmd(type_: str, packages: Iterable[str], simulate: bool = False) -> str:
|
def gen_transaction_cmd(type_: str, packages: Iterable[str], simulate: bool = False,
|
||||||
|
delete_unused: bool = False) -> str:
|
||||||
return f"aptitude {type_} -q -y --no-gui --full-resolver {' '.join(packages)}" \
|
return f"aptitude {type_} -q -y --no-gui --full-resolver {' '.join(packages)}" \
|
||||||
f" -o Aptitude::ProblemResolver::RemoveScore=9999999" \
|
f" -o Aptitude::ProblemResolver::RemoveScore=9999999" \
|
||||||
f" -o Aptitude::ProblemResolver::EssentialRemoveScore=9999999" \
|
f" -o Aptitude::ProblemResolver::EssentialRemoveScore=9999999" \
|
||||||
|
f" -o Aptitude::Delete-Unused={str(delete_unused).lower()}" \
|
||||||
f"{' -V -s -Z' if simulate else ''}"
|
f"{' -V -s -Z' if simulate else ''}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user