mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
Added the config option to disable flatpaks (disabled by default), and the flag --no-flatpaks which will skip flatpak packages.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# pyright: reportUnusedCallResult=false
|
||||
"""
|
||||
Module containing the CLI Application.
|
||||
"""
|
||||
@@ -27,6 +28,7 @@ def main():
|
||||
epilog="See more help at: https://github.com/kiviktnm/decman",
|
||||
)
|
||||
|
||||
|
||||
parser.add_argument(
|
||||
"--source", action="store", help="python file containing configuration"
|
||||
)
|
||||
@@ -52,6 +54,12 @@ def main():
|
||||
default=False,
|
||||
help="don't upgrade foreign packages",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-flatpaks",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="don't upgrade flatpak packages",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-files", action="store_true", default=False, help="don't install any files"
|
||||
)
|
||||
@@ -177,6 +185,7 @@ def _set_up(store: l.Store, args):
|
||||
args.print,
|
||||
not args.no_packages,
|
||||
not args.no_foreign_packages,
|
||||
not args.no_flatpaks
|
||||
not args.no_files,
|
||||
not args.no_systemd_units,
|
||||
not args.no_commands,
|
||||
@@ -195,6 +204,7 @@ class Core:
|
||||
self.only_print,
|
||||
self.update_packages,
|
||||
self.update_foreign_packages,
|
||||
self.update_flatpaks,
|
||||
self.update_files,
|
||||
self.update_units,
|
||||
self.run_commands,
|
||||
@@ -279,6 +289,7 @@ class Core:
|
||||
self.pacman.remove(to_remove)
|
||||
|
||||
# flatpak
|
||||
if conf.enable_flatpak and self.update_flatpaks:
|
||||
self.flatpak.remove(to_remove_flatpak)
|
||||
|
||||
def _upgrade_pkgs(self):
|
||||
@@ -297,6 +308,7 @@ class Core:
|
||||
)
|
||||
|
||||
# flatpak
|
||||
if conf.enable_flatpak and self.update_flatpaks:
|
||||
self.flatpak.upgrade()
|
||||
|
||||
def _install_pkgs(self):
|
||||
@@ -327,6 +339,7 @@ class Core:
|
||||
if conf.enable_fpm and self.update_foreign_packages:
|
||||
self.fpm.install(to_install_fpm, force=self.force_build)
|
||||
|
||||
if conf.enable_flatpak and self.update_flatpaks:
|
||||
self.flatpak.install(to_install_flatpak)
|
||||
|
||||
def _create_and_remove_files(self):
|
||||
|
||||
@@ -265,4 +265,5 @@ build_dir: str = "/tmp/decman/build"
|
||||
pkg_cache_dir: str = "/var/cache/decman"
|
||||
aur_rpc_timeout: typing.Optional[int] = 30
|
||||
enable_fpm: bool = True
|
||||
enable_flatpak: bool = False
|
||||
number_of_packages_stored_in_cache: int = 3
|
||||
|
||||
Reference in New Issue
Block a user