Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opi for openSUSE:Factory checked in at 2021-09-07 21:21:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opi (Old) and /work/SRC/openSUSE:Factory/.opi.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opi" Tue Sep 7 21:21:27 2021 rev:22 rq:917142 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/opi/opi.changes 2021-08-23 10:09:07.408179675 +0200 +++ /work/SRC/openSUSE:Factory/.opi.new.1899/opi.changes 2021-09-07 21:22:07.761354304 +0200 @@ -1,0 +2,11 @@ +Mon Sep 6 14:49:35 UTC 2021 - Dominik Heidler <[email protected]> + +- Version 2.3.0 + * Changed + - Fixed gpgcheck entry in add_repo() + - Allowed using multiple query keywords that are combined using AND + * Added + - Plugin for sublime text + - Plugin for yandex-disk + +------------------------------------------------------------------- Old: ---- opi-2.2.0.tar.gz New: ---- opi-2.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opi.spec ++++++ --- /var/tmp/diff_new_pack.369uXO/_old 2021-09-07 21:22:08.221354860 +0200 +++ /var/tmp/diff_new_pack.369uXO/_new 2021-09-07 21:22:08.225354865 +0200 @@ -17,7 +17,7 @@ Name: opi -Version: 2.2.0 +Version: 2.3.0 Release: 0 Summary: OBS Package Installer (CLI) License: GPL-3.0-only ++++++ opi-2.2.0.tar.gz -> opi-2.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.2.0/CHANGELOG.md new/opi-2.3.0/CHANGELOG.md --- old/opi-2.2.0/CHANGELOG.md 2021-08-20 16:28:49.000000000 +0200 +++ new/opi-2.3.0/CHANGELOG.md 2021-09-06 16:45:54.000000000 +0200 @@ -7,6 +7,18 @@ ## [Unreleased] +## [2.3.0] - 2021-06-06 + +### Changed + +- Fixed gpgcheck entry in `add_repo()` +- Allowed using multiple query keywords that are combined using AND + +### Added + +- Plugin for sublime text +- Plugin for yandex-disk + ## [2.2.0] - 2021-08-20 ### Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.2.0/bin/opi new/opi-2.3.0/bin/opi --- old/opi-2.2.0/bin/opi 2021-08-20 16:28:49.000000000 +0200 +++ new/opi-2.3.0/bin/opi 2021-09-06 16:45:54.000000000 +0200 @@ -2,6 +2,7 @@ import os import sys +import re import argparse import textwrap sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/..')) @@ -10,10 +11,30 @@ from opi.plugins import PluginManager from opi.version import __version__ + +class PreserveWhiteSpaceWrapRawTextHelpFormatter(argparse.RawTextHelpFormatter): + def __add_whitespace(self, idx, iWSpace, text): + if idx == 0: + return text + return (" " * iWSpace) + text + + def _split_lines(self, text, width): + textRows = text.splitlines() + for idx,line in enumerate(textRows): + search = re.search('\s*[0-9\-]{0,}\.?\s*', line) + if line.strip() == "": + textRows[idx] = " " + elif search: + lWSpace = search.end() + lines = [self.__add_whitespace(i,lWSpace,x) for i,x in enumerate(textwrap.wrap(line, width))] + textRows[idx] = lines + return [item for sublist in textRows for item in sublist] + + try: pm = PluginManager() ap = argparse.ArgumentParser( - formatter_class=argparse.RawDescriptionHelpFormatter, + formatter_class=PreserveWhiteSpaceWrapRawTextHelpFormatter, description=textwrap.dedent('''\ openSUSE Package Installer ========================== @@ -28,20 +49,21 @@ Also these queries can be used to install packages from various other vendors: ''') + pm.get_plugin_string(' '*2)) - ap.add_argument('query', nargs='?', type=str, - help='can be any package name or part of it and will be searched for both at the openSUSE Build Service and Packman.' - ) + ap.add_argument('query', nargs='*', type=str, help=textwrap.dedent('''\ + can be any package name or part of it and will be searched for both at the openSUSE Build Service and Packman. + If multiple query arguments are provided only results matching all of them are returned. + ''')) ap.add_argument('-v', '--version', action='version', version=('opi version ' + __version__)) ap.add_argument('-r', '--reversed-output', action='store_true', help='print the search results in reverse') args = ap.parse_args() - if len(sys.argv) < 2: + if not args.query: ap.print_help() sys.exit() # Try to find a matching plugin for the query (and run it and exit afterwards) - pm.run(args.query) + pm.run(args.query[0]) binaries = [] binaries.extend(opi.search_published_binary('openSUSE', args.query)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.2.0/opi/__init__.py new/opi-2.3.0/opi/__init__.py --- old/opi-2.2.0/opi/__init__.py 2021-08-20 16:28:49.000000000 +0200 +++ new/opi-2.3.0/opi/__init__.py 2021-09-06 16:45:54.000000000 +0200 @@ -93,7 +93,7 @@ tf.file.write("baseurl=%s\n" % url) tf.file.write("enabled=%i\n" % enabled) tf.file.write("type=%s\n" % repo_type) - tf.file.write("gpgcheck=%i\n" % enabled) + tf.file.write("gpgcheck=%i\n" % gpgcheck) if gpgkey: subprocess.call(['sudo', 'rpm', '--import', gpgkey]) tf.file.write("gpgkey=%s\n" % gpgkey) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.2.0/opi/plugins/sublime.py new/opi-2.3.0/opi/plugins/sublime.py --- old/opi-2.2.0/opi/plugins/sublime.py 1970-01-01 01:00:00.000000000 +0100 +++ new/opi-2.3.0/opi/plugins/sublime.py 2021-09-06 16:45:54.000000000 +0200 @@ -0,0 +1,23 @@ +import opi +from opi.plugins import BasePlugin +import subprocess + +class SublimeText(BasePlugin): + main_query = "sublime" + description = "Editor for code, markup and prose" + queries = ('sublime', 'sublime-text', 'sublimetext') + + @classmethod + def run(cls, query): + if not opi.ask_yes_or_no("Do you want to install sublime-text from sublime-text repository?", 'y'): + return + + opi.add_repo( + filename = 'sublime-text', + name = 'sublime-text', + url = 'https://download.sublimetext.com/rpm/stable/x86_64', + gpgkey = 'https://download.sublimetext.com/sublimehq-rpm-pub.gpg' + ) + + opi.install_packages(['sublime-text']) + opi.ask_keep_repo('sublime-text') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.2.0/opi/plugins/yandex-disk.py new/opi-2.3.0/opi/plugins/yandex-disk.py --- old/opi-2.2.0/opi/plugins/yandex-disk.py 1970-01-01 01:00:00.000000000 +0100 +++ new/opi-2.3.0/opi/plugins/yandex-disk.py 2021-09-06 16:45:54.000000000 +0200 @@ -0,0 +1,24 @@ +import opi +from opi.plugins import BasePlugin +import subprocess + +class YandexDisk(BasePlugin): + main_query = "yandex-disk" + description = "Yandex.Disk cloud storage client" + queries = ('yandex-disk') + + @classmethod + def run(cls, query): + if not opi.ask_yes_or_no("Do you want to install yandex-disk from yandex-disk repository?", 'y'): + return + + opi.add_repo( + filename = 'yandex-disk', + name = 'yandex-disk', + url = 'https://repo.yandex.ru/yandex-disk/rpm/stable/$basearch/', + gpgkey = 'https://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG', + gpgcheck = False + ) + + opi.install_packages(['yandex-disk']) + opi.ask_keep_repo('yandex-disk') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.2.0/opi/version.py new/opi-2.3.0/opi/version.py --- old/opi-2.2.0/opi/version.py 2021-08-20 16:28:49.000000000 +0200 +++ new/opi-2.3.0/opi/version.py 2021-09-06 16:45:54.000000000 +0200 @@ -1 +1 @@ -__version__ = '2.2.0' +__version__ = '2.3.0'
