Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package opi for openSUSE:Factory checked in 
at 2023-10-11 23:56:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opi (Old)
 and      /work/SRC/openSUSE:Factory/.opi.new.1807 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opi"

Wed Oct 11 23:56:15 2023 rev:49 rq:1116886 version:3.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/opi/opi.changes  2023-09-26 22:04:51.083296760 
+0200
+++ /work/SRC/openSUSE:Factory/.opi.new.1807/opi.changes        2023-10-12 
11:48:01.913920664 +0200
@@ -1,0 +2,12 @@
+Wed Oct 11 10:10:08 UTC 2023 - Dominik Heidler <dheid...@suse.de>
+
+- Version 3.6.0
+- Increase timeouts in testsuite and improve output
+- test: remove yandex-disk from multi-install test
+- Run testsuite for (fake) MicroOS
+- Fix repo URL generation for MicroOS and Leap Micro (fixes #158)
+- Add multi package option
+- Add ocenaudio audio editor (fixes #155)
+- Ignore gpg check for unsigned pkgs (or pkgs without published key)
+
+-------------------------------------------------------------------

Old:
----
  opi-3.5.0.tar.gz

New:
----
  opi-3.6.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ opi.spec ++++++
--- /var/tmp/diff_new_pack.j3SUte/_old  2023-10-12 11:48:02.453940688 +0200
+++ /var/tmp/diff_new_pack.j3SUte/_new  2023-10-12 11:48:02.453940688 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           opi
-Version:        3.5.0
+Version:        3.6.0
 Release:        0
 Summary:        OBS Package Installer (CLI)
 License:        GPL-3.0-only

++++++ opi-3.5.0.tar.gz -> opi-3.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/.github/workflows/ci.yaml 
new/opi-3.6.0/.github/workflows/ci.yaml
--- old/opi-3.5.0/.github/workflows/ci.yaml     2023-09-25 15:23:16.000000000 
+0200
+++ new/opi-3.6.0/.github/workflows/ci.yaml     2023-10-11 12:09:59.000000000 
+0200
@@ -9,7 +9,7 @@
   workflow_dispatch:
 
 jobs:
-  tumbleweed:
+  Tumbleweed:
     # The type of runner that the job will run on
     runs-on: ubuntu-latest
 
@@ -21,7 +21,7 @@
       # Runs a single command using the runners shell
       - name: Run testsuite
         run: ./test/run_all.sh opensuse/tumbleweed
-  leap:
+  Leap:
     runs-on: ubuntu-latest
     steps:
       # Checks-out your repository under $GITHUB_WORKSPACE, so your job can 
access it
@@ -30,3 +30,12 @@
       # Runs a single command using the runners shell
       - name: Run testsuite
         run: ./test/run_all.sh opensuse/leap
+  MicroOS:
+    runs-on: ubuntu-latest
+    steps:
+      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can 
access it
+      - uses: actions/checkout@v3
+
+      # Runs a single command using the runners shell
+      - name: Run testsuite
+        run: ./test/run_all.sh opensuse/microos
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/README.md new/opi-3.6.0/README.md
--- old/opi-3.5.0/README.md     2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/README.md     2023-10-11 12:09:59.000000000 +0200
@@ -94,7 +94,7 @@
 ```
 
 ```
-usage: opi [-h] [-v] [-n] [query ...]
+usage: opi [-h] [-v] [-n] [-P] [-m] [query ...]
 
 openSUSE Package Installer
 ==========================
@@ -113,25 +113,28 @@
 options:
   -h, --help     show this help message and exit
   -v, --version  show program's version number and exit
-  -n             Run in non interactive mode
+  -n             run in non interactive mode
+  -P             don't run any plugins - only search repos, OBS and Packman
+  -m             run installation process individually for each query arg
 
-Also these queries can be used to install packages from various other vendors:
+Also these queries (provided by plugins) can be used to install packages from 
various other vendors:
   anydesk           AnyDesk remote access
   atom              Atom Text Editor
   brave             Brave web browser
   chrome            Google Chrome web browser
   codecs            Media Codecs from Packman and official repo
-  dotnet            Microsoft .NET
+  dotnet            Microsoft .NET framework
   jami              Jami p2p messenger
   maptool           Virtual Tabletop for playing roleplaying games
   megasync          Mega Desktop App
-  msedge            Microsoft Edge
+  msedge            Microsoft Edge web browser
+  ocenaudio         Audio Editor
   plex              Plex Media Server
-  resilio-sync      Resilio Sync decentralized file synchronization between 
devices using the bittorrent protocol
+  resilio-sync      Decentralized file synchronization between devices using 
bittorrent protocol
   skype             Microsoft Skype
   slack             Slack messenger
   sublime           Editor for code, markup and prose
-  teams-for-linux   unofficial Microsoft Teams for Linux
+  teams-for-linux   Unofficial Microsoft Teams for Linux client
   teamviewer        TeamViewer remote access
   vivaldi           Vivaldi web browser
   vscode            Microsoft Visual Studio Code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/bin/opi new/opi-3.6.0/bin/opi
--- old/opi-3.5.0/bin/opi       2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/bin/opi       2023-10-11 12:09:59.000000000 +0200
@@ -34,8 +34,7 @@
                return [item for sublist in textRows for item in sublist]
 
 
-try:
-       pm = PluginManager()
+def setup_argparser(plugin_manager):
        ap = argparse.ArgumentParser(
                formatter_class=PreserveWhiteSpaceWrapRawTextHelpFormatter,
                description=textwrap.dedent('''\
@@ -50,72 +49,102 @@
                '''),
                epilog=textwrap.dedent('''\
                        Also these queries (provided by plugins) can be used to 
install packages from various other vendors:
-               ''') + pm.get_plugin_string(' ' * 2))
+               ''') + plugin_manager.get_plugin_string(' ' * 2))
 
        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=f'opi 
version {__version__}')
-       ap.add_argument('-n', dest='non_interactive', action='store_true', 
help="Run in non interactive mode")
-       ap.add_argument('-P', dest='no_plugins', action='store_true', 
help="Don't run any plugins - only search repos, OBS and Packman")
+       ap.add_argument('-n', dest='non_interactive', action='store_true', 
help='run in non interactive mode')
+       ap.add_argument('-P', dest='no_plugins', action='store_true', 
help="don't run any plugins - only search repos, OBS and Packman")
+       ap.add_argument('-m', dest='multi_package', action='store_true', 
help='run installation process individually for each query arg')
+
+       return ap
+
+
+def repo_query(query):
+       try:
+               print(f'Searching repos for: {(" ".join(query) if 
isinstance(query, list) else query)}')
+
+               binaries = []
+               binaries.extend(opi.search_published_binary('openSUSE', query))
+               binaries.extend(opi.search_published_binary('Packman', query))
+               binaries = opi.sort_uniq_binaries(binaries)
+               if len(binaries) == 0:
+                       print('No package found.')
+                       return
+
+               # Print and select a package name option
+               binary_names = opi.get_binary_names(binaries)
+               selected_name = opi.ask_for_option(binary_names)
+               print('You have selected package name:', selected_name)
+
+               # Inject binaries from local repos
+               binaries = opi.search_local_repos(selected_name) + binaries
+
+               binary_options = opi.get_binaries_by_name(selected_name, 
binaries)
+
+               # Print and select a binary package option
+               selected_binary = opi.ask_for_option(binary_options, 
option_filter=opi.format_binary_option, disable_pager=True)
+               print('You have selected binary package:', 
opi.format_binary_option(selected_binary, table=False))
+               if opi.is_personal_project(selected_binary['project']):
+                       print(colored(
+                               'BE CAREFUL! The package is from a personal 
repository and NOT reviewed by others.\n'
+                               'You can ask the author to submit the package 
to development projects and openSUSE:Factory.\n'
+                               'Learn more at 
https://en.opensuse.org/openSUSE:How_to_contribute_to_Factory',
+                               'red'
+                       ))
+               elif selected_binary['project'] == 'openSUSE:Factory':
+                       print(opi.colored(
+                               'BE CAREFUL! You are about to add the Factory 
Repository.\n'
+                               'This repo contains the unreleased Tumbleweed 
distro before openQA tests have been run.\n'
+                               'Only proceed if you know what you are doing!',
+                               'yellow'
+                       ))
+                       if not opi.ask_yes_or_no('Do you want to continue?', 
default_answer='n'):
+                               return
+
+               # Install selected package
+               opi.install_binary(selected_binary)
+       except (opi.NoOptionSelected, opi.HTTPError):
+               return
+
+
+if __name__ == '__main__':
+       try:
+               pm = PluginManager()
+               ap = setup_argparser(pm)
+               args = ap.parse_args()
 
-       args = ap.parse_args()
-
-       if not args.query:
-               ap.print_help()
-               sys.exit()
-
-       if args.non_interactive:
-               global_state.arg_non_interactive = True
-               if subprocess.run(['sudo', '-n', 'true']).returncode != 0:
-                       print('Error: In non-interactive mode this command must 
be run as root')
-                       print('       or sudo must not require interaction.')
-                       sys.exit(1)
-
-       if not args.no_plugins:
-               # Try to find a matching plugin for the query (and run it and 
exit afterwards)
-               pm.run(args.query[0])
-
-       binaries = []
-       binaries.extend(opi.search_published_binary('openSUSE', args.query))
-       binaries.extend(opi.search_published_binary('Packman', args.query))
-       binaries = opi.sort_uniq_binaries(binaries)
-       if len(binaries) == 0:
-               print('No package found.')
-               sys.exit()
-
-       # Print and select a package name option
-       binary_names = opi.get_binary_names(binaries)
-       selected_name = opi.ask_for_option(binary_names)
-       print('You have selected package name:', selected_name)
-
-       # Inject binaries from local repos
-       binaries = opi.search_local_repos(selected_name) + binaries
-
-       binary_options = opi.get_binaries_by_name(selected_name, binaries)
-
-       # Print and select a binary package option
-       selected_binary = opi.ask_for_option(binary_options, 
option_filter=opi.format_binary_option, disable_pager=True)
-       print('You have selected binary package:', 
opi.format_binary_option(selected_binary, table=False))
-       if opi.is_personal_project(selected_binary['project']):
-               print(colored(
-                       'BE CAREFUL! The package is from a personal repository 
and NOT reviewed by others.\n'
-                       'You can ask the author to submit the package to 
development projects and openSUSE:Factory.\n'
-                       'Learn more at 
https://en.opensuse.org/openSUSE:How_to_contribute_to_Factory',
-                       'red'
-               ))
-       elif selected_binary['project'] == 'openSUSE:Factory':
-               print(opi.colored(
-                       'BE CAREFUL! You are about to add the Factory 
Repository.\n'
-                       'This repo contains the unreleased Tumbleweed distro 
before openQA tests have been run.\n'
-                       'Only proceed if you know what you are doing!',
-                       'yellow'
-               ))
-               if not opi.ask_yes_or_no('Do you want to continue?', 
default_answer='n'):
+               if not args.query:
+                       ap.print_help()
                        sys.exit()
 
-       # Install selected package
-       opi.install_binary(selected_binary)
-except KeyboardInterrupt:
-       print()
+               if args.non_interactive:
+                       global_state.arg_non_interactive = True
+                       if subprocess.run(['sudo', '-n', 'true']).returncode != 
0:
+                               print('Error: In non-interactive mode this 
command must be run as root')
+                               print('       or sudo must not require 
interaction.')
+                               sys.exit(1)
+
+               # Search plugins
+               if not args.no_plugins:
+                       # Iterate over queries, copy list as modifying it from 
within the loop
+                       for query in list(args.query):
+                               # Try to find a matching plugin for the query 
(and run it); runs just first query if not in multi_package mode
+                               if pm.run(query):
+                                       # After plugin successfully ran, remove 
from queries to not try again in repo search
+                                       args.query.remove(query)
+                                       if not args.multi_package:
+                                               sys.exit()
+
+               # Search repos
+               if not args.multi_package:
+                       repo_query(args.query)
+               else:
+                       for query in args.query:
+                               repo_query(query)
+
+       except KeyboardInterrupt:
+               print()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/__init__.py 
new/opi-3.6.0/opi/__init__.py
--- old/opi-3.5.0/opi/__init__.py       2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/opi/__init__.py       2023-10-11 12:09:59.000000000 +0200
@@ -26,6 +26,15 @@
 
 REPO_DIR = '/etc/zypp/repos.d/'
 
+##################
+### Exceptions ###
+##################
+
+class NoOptionSelected(Exception):
+       pass
+
+class HTTPError(Exception):
+       pass
 
 ###################
 ### System Info ###
@@ -71,6 +80,12 @@
                        project = 'openSUSE:Leap:$releasever'
                else:
                        project = 'openSUSE:Leap:' + version
+       elif name == 'openSUSE Leap Micro':
+               # Leap Micro major version seems to be 10 lower than Leap the 
version it is based on
+               if use_releasever_variable:
+                       project = 'openSUSE:Leap:1$releasever'
+               else:
+                       project = 'openSUSE:Leap:1' + version
        elif name.startswith('SLE'):
                project = 'SLE' + version
        if prefix:
@@ -107,6 +122,8 @@
 
 def add_openh264_repo(dup=False):
        project = get_os_release()['NAME']
+       project = project.replace('openSUSE MicroOS', 'openSUSE Tumbleweed')
+       project = project.replace('openSUSE Leap Micro', 'openSUSE Leap')
        project = project.replace(':', '_').replace(' ', '_')
 
        url = f'http://codecs.opensuse.org/openh264/{project}/'
@@ -280,11 +297,13 @@
 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 +327,8 @@
                # 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)
 
@@ -386,7 +407,7 @@
                        print('Please use different search keywords. Some short 
keywords cause OBS timeout.')
                else:
                        print('HTTPError:', e)
-               sys.exit(1)
+               raise HTTPError()
 
 def get_binary_names(binaries):
        names = []
@@ -558,7 +579,7 @@
        input_string = input_string.strip() or '0'
        num = int(input_string) if input_string.isdecimal() else -1
        if num == 0:
-               sys.exit()
+               raise NoOptionSelected()
        elif not (num >= 1 and num <= len(options)):
                return ask_for_option(options, question, option_filter, 
disable_pager)
        else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/plugins/__init__.py 
new/opi-3.6.0/opi/plugins/__init__.py
--- old/opi-3.5.0/opi/plugins/__init__.py       2023-09-25 15:23:16.000000000 
+0200
+++ new/opi-3.6.0/opi/plugins/__init__.py       2023-10-11 12:09:59.000000000 
+0200
@@ -1,7 +1,7 @@
 import os
-import sys
 from importlib import import_module
 import inspect
+from opi import NoOptionSelected
 
 class BasePlugin:
        main_query = ''
@@ -32,8 +32,11 @@
                query = query.lower()
                for plugin in self.plugins:
                        if plugin.matches(query):
-                               plugin.run(query)
-                               sys.exit()
+                               try:
+                                       plugin.run(query)
+                               except NoOptionSelected:
+                                       pass
+                               return True
 
        def get_plugin_string(self, indent=''):
                plugins = ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/plugins/chrome.py 
new/opi-3.6.0/opi/plugins/chrome.py
--- old/opi-3.5.0/opi/plugins/chrome.py 2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/opi/plugins/chrome.py 2023-10-11 12:09:59.000000000 +0200
@@ -18,7 +18,6 @@
                        'google-chrome-beta',
                        'google-chrome-unstable',
                ])
-
                opi.add_repo(
                        filename = 'google-chrome',
                        name = 'google-chrome',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/plugins/dotnet.py 
new/opi-3.6.0/opi/plugins/dotnet.py
--- old/opi-3.5.0/opi/plugins/dotnet.py 2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/opi/plugins/dotnet.py 2023-10-11 12:09:59.000000000 +0200
@@ -3,7 +3,7 @@
 
 class MSDotnet(BasePlugin):
        main_query = 'dotnet'
-       description = 'Microsoft .NET'
+       description = 'Microsoft .NET framework'
        queries = ['dotnet-sdk', 'dotnet']
 
        @classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/plugins/maptool.py 
new/opi-3.6.0/opi/plugins/maptool.py
--- old/opi-3.5.0/opi/plugins/maptool.py        2023-09-25 15:23:16.000000000 
+0200
+++ new/opi-3.6.0/opi/plugins/maptool.py        2023-10-11 12:09:59.000000000 
+0200
@@ -23,7 +23,7 @@
                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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/plugins/ms_edge.py 
new/opi-3.6.0/opi/plugins/ms_edge.py
--- old/opi-3.5.0/opi/plugins/ms_edge.py        2023-09-25 15:23:16.000000000 
+0200
+++ new/opi-3.6.0/opi/plugins/ms_edge.py        2023-10-11 12:09:59.000000000 
+0200
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/plugins/ocenaudio.py 
new/opi-3.6.0/opi/plugins/ocenaudio.py
--- old/opi-3.5.0/opi/plugins/ocenaudio.py      1970-01-01 01:00:00.000000000 
+0100
+++ new/opi-3.6.0/opi/plugins/ocenaudio.py      2023-10-11 12:09:59.000000000 
+0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi/version.py new/opi-3.6.0/opi/version.py
--- old/opi-3.5.0/opi/version.py        2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/opi/version.py        2023-10-11 12:09:59.000000000 +0200
@@ -1 +1 @@
-__version__ = '3.5.0'
+__version__ = '3.6.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/opi.changes new/opi-3.6.0/opi.changes
--- old/opi-3.5.0/opi.changes   2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/opi.changes   2023-10-11 12:09:59.000000000 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Wed Oct 11 10:08:35 UTC 2023 - Dominik Heidler <dheid...@suse.de>
+
+- Version 3.6.0
+- Increase timeouts in testsuite and improve output
+- test: remove yandex-disk from multi-install test
+- Run testsuite for (fake) MicroOS
+- Fix repo URL generation for MicroOS and Leap Micro (fixes #158)
+- Add multi package option
+- Add ocenaudio audio editor (fixes #155)
+- Ignore gpg check for unsigned pkgs (or pkgs without published key)
+
+-------------------------------------------------------------------
 Mon Sep 25 13:23:05 UTC 2023 - Dominik Heidler <dheid...@suse.de>
 
 - Version 3.5.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/test/05_install_from_local_repo.py 
new/opi-3.6.0/test/05_install_from_local_repo.py
--- old/opi-3.5.0/test/05_install_from_local_repo.py    2023-09-25 
15:23:16.000000000 +0200
+++ new/opi-3.6.0/test/05_install_from_local_repo.py    2023-10-11 
12:09:59.000000000 +0200
@@ -2,7 +2,6 @@
 
 import sys
 import pexpect
-import subprocess
 
 c = pexpect.spawn('./bin/opi htop', logfile=sys.stdout.buffer, echo=False)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/test/06_install_non_interactive.py 
new/opi-3.6.0/test/06_install_non_interactive.py
--- old/opi-3.5.0/test/06_install_non_interactive.py    2023-09-25 
15:23:16.000000000 +0200
+++ new/opi-3.6.0/test/06_install_non_interactive.py    2023-10-11 
12:09:59.000000000 +0200
@@ -10,7 +10,7 @@
 c.expect('Pick a number')
 c.expect(r'([0-9]+)\. [^ ]*(openSUSE-Tumbleweed-Oss|Main Repository)', 
timeout=10)
 c.expect('Installing from existing repo', timeout=10)
-c.expect('Continue?', timeout=20)
+c.expect('Continue?', timeout=60)
 c.interact()
 c.wait()
 c.close()
@@ -25,7 +25,7 @@
 c.expect('Pick a number')
 c.expect(r'([0-9]+)\. [^ ]*(filesystems)', timeout=10)
 c.expect('Adding repo \'filesystems\'', timeout=10)
-c.expect('Continue?', timeout=20)
+c.expect('Continue?', timeout=60)
 c.interact()
 c.wait()
 c.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/test/07_install_multiple.py 
new/opi-3.6.0/test/07_install_multiple.py
--- old/opi-3.5.0/test/07_install_multiple.py   1970-01-01 01:00:00.000000000 
+0100
+++ new/opi-3.6.0/test/07_install_multiple.py   2023-10-11 12:09:59.000000000 
+0200
@@ -0,0 +1,35 @@
+#!/usr/bin/python3
+
+import sys
+import pexpect
+import subprocess
+
+c = pexpect.spawn('./bin/opi -nm zfs resilio-sync html2text', 
logfile=sys.stdout.buffer, echo=False)
+
+# plugins are installed first
+c.expect('Do you want to install')
+c.expect('Import package signing key', timeout=10)
+c.expect('Continue')
+c.expect('Do you want to keep', timeout=500)
+
+# packages come after plugins
+c.expect(r'([0-9]+)\. zfs', timeout=10)
+c.expect('Pick a number')
+c.expect(r'([0-9]+)\. [^ ]*(filesystems)', timeout=10)
+c.expect('Adding repo \'filesystems\'', timeout=10)
+c.expect('Continue?', timeout=60)
+
+c.expect(r'([0-9]+)\. html2text', timeout=60)
+c.expect('Pick a number')
+c.expect(r'([0-9]+)\. [^ ]*(openSUSE-Tumbleweed-Oss|Main Repository)', 
timeout=10)
+c.expect('Installing from existing repo', timeout=10)
+c.expect('Continue?', timeout=60)
+
+c.interact()
+c.wait()
+c.close()
+print()
+assert c.exitstatus == 0, f'Exit code: {c.exitstatus}'
+subprocess.check_call(['rpm', '-qi', 'resilio-sync'])
+subprocess.check_call(['rpm', '-qi', 'zfs'])
+subprocess.check_call(['rpm', '-qi', 'html2text'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/test/run.sh new/opi-3.6.0/test/run.sh
--- old/opi-3.5.0/test/run.sh   2023-09-25 15:23:16.000000000 +0200
+++ new/opi-3.6.0/test/run.sh   2023-10-11 12:09:59.000000000 +0200
@@ -6,6 +6,8 @@
 ./test/$1
 result=$?
 
+echo "$(tput bold)$(tput setaf 6)===== Finished test: $1 =====$(tput sgr0)"
+
 if [[ "$result" == "0" ]] ; then
        echo "$(tput bold)$(tput setaf 2)>>>>> PASSED <<<<<$(tput sgr0)"
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-3.5.0/test/run_container_test.sh 
new/opi-3.6.0/test/run_container_test.sh
--- old/opi-3.5.0/test/run_container_test.sh    2023-09-25 15:23:16.000000000 
+0200
+++ new/opi-3.6.0/test/run_container_test.sh    2023-10-11 12:09:59.000000000 
+0200
@@ -3,11 +3,22 @@
 base_image="${2:-opensuse/tumbleweed}"
 opi_base_image="opi_base_${base_image/\//_}"
 
+if [[ "$2" == "opensuse/microos" ]] ; then
+       base_image="opensuse/tumbleweed"
+       opi_base_image="opi_base_opensuse_microos"
+fi
+
 # prepare container image
 if ! podman image exists $opi_base_image ; then
        echo "Preparing container"
        podman run -td --dns=1.1.1.1 --name=opi_base $base_image
        podman exec -it opi_base zypper -n ref
+
+       if [[ "$2" == "opensuse/microos" ]] ; then
+               # fake MicroOS
+               podman exec -it opi_base zypper -n install --force-resolution 
MicroOS-release
+       fi
+
        # opi dependencies
        podman exec -it opi_base zypper -n install sudo python3 
python3-requests python3-lxml python3-termcolor python3-curses python3-rpm curl
 

Reply via email to