Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ocenaudio #156

Merged
merged 3 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion opi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion opi/plugins/dotnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class MSDotnet(BasePlugin):
main_query = 'dotnet'
description = 'Microsoft .NET'
description = 'Microsoft .NET framework'
queries = ['dotnet-sdk', 'dotnet']

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion opi/plugins/maptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion opi/plugins/ms_edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class MSEdge(BasePlugin):
main_query = 'msedge'
description = 'Microsoft Edge'
description = 'Microsoft Edge web browser'
queries = ['microsoft-edge', 'msedge', 'edge']

@classmethod
Expand Down
14 changes: 14 additions & 0 deletions opi/plugins/ocenaudio.py
Original file line number Diff line number Diff line change
@@ -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