diff --git a/opi/__init__.py b/opi/__init__.py index 3cf4f8d..eaa2e2c 100644 --- a/opi/__init__.py +++ b/opi/__init__.py @@ -280,11 +280,13 @@ def install_packages(packages, **kwargs): def dist_upgrade(**kwargs): pkgmgr_action('dup', **kwargs) -def pkgmgr_action(action, packages=[], from_repo=None, allow_vendor_change=False, allow_arch_change=False, allow_downgrade=False, allow_name_change=False): +def pkgmgr_action(action, packages=[], from_repo=None, allow_vendor_change=False, allow_arch_change=False, allow_downgrade=False, allow_name_change=False, allow_unsigned=False): if get_backend() == BackendConstants.zypp: args = ['sudo', 'zypper'] if global_state.arg_non_interactive: args.append('-n') + if allow_unsigned: + args.append('--no-gpg-checks') args.append(action) if from_repo: args.extend(['--from', from_repo]) @@ -308,6 +310,8 @@ def pkgmgr_action(action, packages=[], from_repo=None, allow_vendor_change=False # allow_downgrade and allow_name_change are default in DNF if allow_vendor_change: args.append('--setopt=allow_vendor_change=True') + if allow_unsigned: + args.append('--nogpgcheck') args.extend(packages) subprocess.call(args) diff --git a/opi/plugins/dotnet.py b/opi/plugins/dotnet.py index 0819f80..a62b9c4 100644 --- a/opi/plugins/dotnet.py +++ b/opi/plugins/dotnet.py @@ -3,7 +3,7 @@ class MSDotnet(BasePlugin): main_query = 'dotnet' - description = 'Microsoft .NET' + description = 'Microsoft .NET framework' queries = ['dotnet-sdk', 'dotnet'] @classmethod diff --git a/opi/plugins/maptool.py b/opi/plugins/maptool.py index 60c3041..d39bbf2 100644 --- a/opi/plugins/maptool.py +++ b/opi/plugins/maptool.py @@ -23,7 +23,7 @@ def install_github_release(org, repo): print(f"No RPM asset found for {org}/{repo} release {latest_release['tag_name']}") return rpm_url = rpm_assets[0]['browser_download_url'] - opi.install_packages([rpm_url]) + opi.install_packages([rpm_url], allow_unsigned=True) # no key available class MapTool(BasePlugin): main_query = 'maptool' diff --git a/opi/plugins/ms_edge.py b/opi/plugins/ms_edge.py index cf6f5a4..6161cdc 100644 --- a/opi/plugins/ms_edge.py +++ b/opi/plugins/ms_edge.py @@ -5,7 +5,7 @@ class MSEdge(BasePlugin): main_query = 'msedge' - description = 'Microsoft Edge' + description = 'Microsoft Edge web browser' queries = ['microsoft-edge', 'msedge', 'edge'] @classmethod diff --git a/opi/plugins/ocenaudio.py b/opi/plugins/ocenaudio.py new file mode 100644 index 0000000..0ddc226 --- /dev/null +++ b/opi/plugins/ocenaudio.py @@ -0,0 +1,14 @@ +import opi +from opi.plugins import BasePlugin + +class Ocenaudio(BasePlugin): + main_query = 'ocenaudio' + description = 'Audio Editor' + queries = [main_query] + + @classmethod + def run(cls, query): + if not opi.ask_yes_or_no('Do you want to install ocenaudio from ocenaudio.com?'): + return + + opi.install_packages(['https://www.ocenaudio.com/downloads/index.php/ocenaudio_opensuse.rpm'], allow_unsigned=True) # rpm is unsigned