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-10-12 21:49:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opi (Old)
 and      /work/SRC/openSUSE:Factory/.opi.new.2443 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opi"

Tue Oct 12 21:49:32 2021 rev:23 rq:924765 version:2.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/opi/opi.changes  2021-09-07 21:22:07.761354304 
+0200
+++ /work/SRC/openSUSE:Factory/.opi.new.2443/opi.changes        2021-10-12 
21:50:55.188006270 +0200
@@ -1,0 +2,8 @@
+Mon Oct 11 17:06:52 UTC 2021 - Dominik Heidler <[email protected]>
+
+- Version 2.4.0
+  * Added
+    - Scrolling of results
+       - Plugin for atom editor
+
+-------------------------------------------------------------------

Old:
----
  opi-2.3.0.tar.gz

New:
----
  opi-2.4.0.tar.gz

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

Other differences:
------------------
++++++ opi.spec ++++++
--- /var/tmp/diff_new_pack.fqJicQ/_old  2021-10-12 21:50:55.664006951 +0200
+++ /var/tmp/diff_new_pack.fqJicQ/_new  2021-10-12 21:50:55.668006957 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           opi
-Version:        2.3.0
+Version:        2.4.0
 Release:        0
 Summary:        OBS Package Installer (CLI)
 License:        GPL-3.0-only
@@ -27,6 +27,7 @@
 BuildArch:      noarch
 BuildRequires:  help2man
 BuildRequires:  python3
+BuildRequires:  python3-curses
 BuildRequires:  python3-lxml
 BuildRequires:  python3-requests
 BuildRequires:  python3-setuptools
@@ -35,6 +36,7 @@
 Requires:       zypper
 # rpm --import used curl but doesn't require it explicitly
 Requires:       curl
+Requires:       python3-curses
 Requires:       python3-lxml
 Requires:       python3-requests
 Requires:       python3-termcolor

++++++ opi-2.3.0.tar.gz -> opi-2.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/.gitignore new/opi-2.4.0/.gitignore
--- old/opi-2.3.0/.gitignore    2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/.gitignore    2021-10-11 19:03:21.000000000 +0200
@@ -56,3 +56,5 @@
 *.egg-info/
 .installed.cfg
 *.egg
+
+config.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/CHANGELOG.md new/opi-2.4.0/CHANGELOG.md
--- old/opi-2.3.0/CHANGELOG.md  2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/CHANGELOG.md  2021-10-11 19:03:21.000000000 +0200
@@ -7,6 +7,13 @@
 
 ## [Unreleased]
 
+## [2.4.0] - 2021-10-11
+
+## Added
+
+- Scroll results if they not fit on the screen
+- Plugin for atom editor
+
 ## [2.3.0] - 2021-06-06
 
 ### Changed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/README.md new/opi-2.4.0/README.md
--- old/opi-2.3.0/README.md     2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/README.md     2021-10-11 19:03:21.000000000 +0200
@@ -40,15 +40,20 @@
 
 ## Use
 
-Command:
+Run:
 
 ```
+opi [package_name]
+```
+
+Example:
+```
 opi filezilla
 ```
 
-Output:
+Demo:
 
-![Screenshot](screenshot.png)
+![Screenshot](demo.gif)
 
 ### Using DNF instead of Zypper
 If you want to, you can use [DNF](https://en.opensuse.org/SDB:DNF) instead of 
Zypper.
@@ -75,26 +80,47 @@
 ```
 
 ```
+usage: opi [-h] [-v] [-r] [query [query ...]]
+
 openSUSE Package Installer
 ==========================
 
 Search and install almost all packages available for openSUSE and SLE:
- 1. openSUSE Build Service
- 2. Packman
- 2. Popular packages for various vendors
-
-Usage: opi <query>
-
-  <query> can be any package name or part of it and will be searched for
-  both at the openSUSE Build Service and Packman.
-
-Also this queries can be used to install packages from various other vendors:
-
-  chrome            Google Chrome webbrowser
-  codecs            Media Codecs from Packman Repo
+  1. openSUSE Build Service
+  2. Packman
+  2. Popular packages for various vendors
+
+positional arguments:
+  query                 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.
+
+optional arguments:
+  -h, --help            show this help message and exit
+  -v, --version         show program's version number and exit
+  -r, --reversed-output
+                        print the search results in reverse
+
+Also these queries can be used to install packages from various other vendors:
+  atom              Atom Text Editor
+  brave             Brave web browser
+  chrome            Google Chrome web browser
+  codecs            Media Codecs from Packman and official repo
+  dotnet            Microsoft .NET
+  megasync          Mega Desktop App
+  msedge-beta       Microsoft Edge Beta
+  msedge-dev        Microsoft Edge Dev
   msteams           Microsoft Teams
+  plex              Plex Media Server
   skype             Microsoft Skype
-  teamviewer        Teamviewer remote access
+  slack             Slack messenger
+  sublime           Editor for code, markup and prose
+  teamviewer        TeamViewer remote access
+  vivaldi           Vivaldi web browser
   vscode            Microsoft Visual Studio Code
   vscodium          Visual Studio Codium
+  yandex-disk       Yandex.Disk cloud storage client
+  zoom              Zoom Video Conference
 ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/bin/opi new/opi-2.4.0/bin/opi
--- old/opi-2.3.0/bin/opi       2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/bin/opi       2021-10-11 19:03:21.000000000 +0200
@@ -75,10 +75,10 @@
        binary_names = opi.get_binary_names(binaries)
 
        # Print package name options
-       opi.print_package_names(binary_names, reverse=args.reversed_output)
+       package_name_list = opi.get_package_name_list(binary_names, 
reverse=args.reversed_output)
 
        # Select a package name option
-       selected_name_num = opi.ask_number(1, len(binary_names))
+       selected_name_num = opi.ask_number(1, len(binary_names), 
text=package_name_list)
        selected_name = binary_names[selected_name_num-1]
        print("You have selected package name: %s" % selected_name)
        binary_options = opi.get_binaries_by_name(selected_name, binaries)
Binary files old/opi-2.3.0/demo.gif and new/opi-2.4.0/demo.gif differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/opi/__init__.py 
new/opi-2.4.0/opi/__init__.py
--- old/opi-2.3.0/opi/__init__.py       2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/opi/__init__.py       2021-10-11 19:03:21.000000000 +0200
@@ -1,3 +1,4 @@
+import os
 import sys
 import subprocess
 import re
@@ -5,9 +6,14 @@
 
 import requests
 import lxml.etree
+
 from termcolor import colored
+from shutil import which
+from tempfile import NamedTemporaryFile
+from os import path, remove
 
 from opi.backends import get_backend, BackendConstants
+from opi import pager
 
 OBS_APIROOT = {
        'openSUSE': 'https://api.opensuse.org',
@@ -290,15 +296,33 @@
        answer = input(q) or default_answer
        return answer.strip().lower() == 'y'
 
-def ask_number(min_num, max_num, question="Choose a number (0 to quit):"):
-       input_string = input(question + ' ').strip() or '0'
+def ask_number(min_num, max_num, question="Pick a number (0 to quit):", 
text=None):
+       """
+               Ask the user for a number to pick with defined min and max.
+               Exit if the number is 0.
+               Specify the number with question.
+               If text is defined, this string will be shown above the prompt.
+               If needed, a pager will be used.
+       """
+       if text:
+               text_len_lines = len(text.split('\n'))
+               if text_len_lines < (os.get_terminal_size().lines-1):
+                       # no pager needed
+                       print(text)
+                       input_string = input(question + ' ')
+               else:
+                       input_string = pager.ask_number_with_pager(text, 
question)
+       else:
+               input_string = input(question + ' ')
+
+       input_string = input_string.strip() or '0'
        num = int(input_string) if input_string.isdecimal() else -1
        if num == 0:
                sys.exit()
        elif num >= min_num and num <= max_num:
                return num
        else:
-               return ask_number(min_num, max_num, question)
+               return ask_number(min_num, max_num, question, text)
 
 def ask_keep_repo(repo):
        if not ask_yes_or_no('Do you want to keep the repo "%s"?' % repo, 'y'):
@@ -307,7 +331,7 @@
                if get_backend() == BackendConstants.dnf:
                        subprocess.call(['sudo', 'rm', '/etc/zypp/repos.d/' + 
repo + '.repo'])
 
-def print_package_names(package_names, reverse=False):
+def get_package_name_list(package_names, reverse=False):
        package_list = []
        i = 1
        for package_name in package_names:
@@ -315,8 +339,7 @@
                i += 1
        if reverse:
                package_list.reverse()
-       for e in package_list:
-               print(e)
+       return '\n'.join(package_list)
 
 def print_binary_options(binaries):
        i = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/opi/pager.py new/opi-2.4.0/opi/pager.py
--- old/opi-2.3.0/opi/pager.py  1970-01-01 01:00:00.000000000 +0100
+++ new/opi-2.4.0/opi/pager.py  2021-10-11 19:03:21.000000000 +0200
@@ -0,0 +1,87 @@
+import sys
+
+import curses
+
+def ask_number_with_pager(text, question="Pick a number (0 to quit):"):
+       try:
+               stdscr = curses.initscr()
+               curses.noecho()
+               curses.cbreak() # react on keys without enter
+
+               text_len_lines = len(text.split('\n'))
+               max_top_line = text_len_lines - (curses.LINES-2)
+               scrollarea = curses.newpad(text_len_lines, curses.COLS)
+               scrollarea.addstr(0, 0, text)
+               scrollarea_topline_ptr = 0
+               def ensure_scrollarea_bounds(scrollarea_topline_ptr):
+                       scrollarea_topline_ptr = max(scrollarea_topline_ptr, 0)
+                       scrollarea_topline_ptr = min(scrollarea_topline_ptr, 
max_top_line)
+                       return scrollarea_topline_ptr
+               def scrollarea_refresh():
+                       scrollarea.refresh(scrollarea_topline_ptr, 0, 0, 0, 
curses.LINES-3, curses.COLS-1)
+                       # remove artefacts due to smaller status line when 
scrolling up
+                       controlbar.addstr(0, 0, ' ' * curses.COLS)
+                       controlbar.addstr(0, 0,
+                               "Use arrow keys or PgUP/PgDown to scroll - 
lines %i-%i/%i %i%%" % (
+                                       scrollarea_topline_ptr,
+                                       scrollarea_topline_ptr + 
(curses.LINES-2),
+                                       text_len_lines,
+                                       int(100*scrollarea_topline_ptr / 
max_top_line)
+                               ),
+                               curses.A_REVERSE
+                       )
+
+               controlbar = stdscr.subwin(2, curses.COLS, curses.LINES-2, 0)
+               controlbar.keypad(True) # enable key bindings and conversions
+               # ensure clean line
+               controlbar.addstr(1, 0, ' ' * (curses.COLS-1))
+               controlbar.addstr(1, 0, question, curses.A_BOLD)
+               controlbar.refresh()
+               scrollarea_refresh()
+
+               question += ' '
+               input_string = ''
+               while not input_string.endswith('\n'):
+                       c = controlbar.getkey(1, len(question) + 
len(input_string))
+                       if c == 'KEY_PPAGE':
+                               scrollarea_topline_ptr -= (curses.LINES-2) // 2
+                               scrollarea_topline_ptr = 
ensure_scrollarea_bounds(scrollarea_topline_ptr)
+                               scrollarea_refresh()
+                       elif c == 'KEY_NPAGE':
+                               scrollarea_topline_ptr += (curses.LINES-2) // 2
+                               scrollarea_topline_ptr = 
ensure_scrollarea_bounds(scrollarea_topline_ptr)
+                               scrollarea_refresh()
+                       elif c == 'KEY_UP':
+                               scrollarea_topline_ptr -= 1
+                               scrollarea_topline_ptr = 
ensure_scrollarea_bounds(scrollarea_topline_ptr)
+                               scrollarea_refresh()
+                       elif c == 'KEY_DOWN':
+                               scrollarea_topline_ptr += 1
+                               scrollarea_topline_ptr = 
ensure_scrollarea_bounds(scrollarea_topline_ptr)
+                               scrollarea_refresh()
+                       elif c == 'KEY_HOME':
+                               scrollarea_topline_ptr = 0
+                               scrollarea_topline_ptr = 
ensure_scrollarea_bounds(scrollarea_topline_ptr)
+                               scrollarea_refresh()
+                       elif c == 'KEY_END':
+                               scrollarea_topline_ptr = sys.maxsize
+                               scrollarea_topline_ptr = 
ensure_scrollarea_bounds(scrollarea_topline_ptr)
+                               scrollarea_refresh()
+                       elif c == 'KEY_BACKSPACE':
+                               input_string = input_string[:-1]
+                               controlbar.addstr(1, len(question) + 
len(input_string), ' ')
+                       #elif c == 'KEY_LEFT' or c == 'KEY_RIGHT':
+                       #       pass
+                       elif c.startswith('KEY_') or len(c) > 1:
+                               pass
+                       else:
+                               input_string += c
+                               if c != '\n':
+                                       controlbar.addstr(1, 0, question, 
curses.A_BOLD)
+                                       controlbar.addstr(1, len(question), 
input_string)
+               return input_string
+       finally:
+               curses.nocbreak()
+               stdscr.keypad(False)
+               curses.echo()
+               curses.endwin()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/opi/plugins/atom.py 
new/opi-2.4.0/opi/plugins/atom.py
--- old/opi-2.3.0/opi/plugins/atom.py   1970-01-01 01:00:00.000000000 +0100
+++ new/opi-2.4.0/opi/plugins/atom.py   2021-10-11 19:03:21.000000000 +0200
@@ -0,0 +1,24 @@
+import opi
+
+from opi.plugins import BasePlugin
+
+class Atom(BasePlugin):
+       main_query = "atom"
+       description = "Atom Text Editor"
+       queries = ('atom', 'atom-editor')
+
+       @classmethod
+       def run(cls, query):
+               if not opi.ask_yes_or_no("Do you want to install Atom from Atom 
repository?", 'y'):
+                       return
+
+               opi.add_repo(
+                       filename = 'atom',
+                       name = 'Atom',
+                       url = 
'https://packagecloud.io/AtomEditor/atom/el/7/x86_64/?type=rpm',
+                       gpgkey = 
'https://packagecloud.io/AtomEditor/atom/gpgkey'
+               )
+
+               opi.install_packages(['atom'])
+
+               opi.ask_keep_repo('atom')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/opi/version.py new/opi-2.4.0/opi/version.py
--- old/opi-2.3.0/opi/version.py        2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/opi/version.py        2021-10-11 19:03:21.000000000 +0200
@@ -1 +1 @@
-__version__ = '2.3.0'
+__version__ = '2.4.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/config.example.php 
new/opi-2.4.0/proxy/config.example.php
--- old/opi-2.3.0/proxy/config.example.php      2021-09-06 16:45:54.000000000 
+0200
+++ new/opi-2.4.0/proxy/config.example.php      1970-01-01 01:00:00.000000000 
+0100
@@ -1,8 +0,0 @@
-<?php
-
-# Copy and rename this file to 'config.php' and fill in your API credentials
-
-$obs_username = '';
-$obs_password = '';
-$pmbs_username = '';
-$pmbs_password = '';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/config.sample.json 
new/opi-2.4.0/proxy/config.sample.json
--- old/opi-2.3.0/proxy/config.sample.json      1970-01-01 01:00:00.000000000 
+0100
+++ new/opi-2.4.0/proxy/config.sample.json      2021-10-11 19:03:21.000000000 
+0200
@@ -0,0 +1,12 @@
+{
+       "openSUSE": {
+               "user": "OBS_USERNAME",
+               "pass": "OBS_PASS",
+               "url": "https://api.opensuse.org/";
+       },
+       "Packman": {
+               "user": "PMBS_USERNAME",
+               "pass": "PMBS_PASS",
+               "url": "https://pmbs.links2linux.de/";
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/dependencies.txt 
new/opi-2.4.0/proxy/dependencies.txt
--- old/opi-2.3.0/proxy/dependencies.txt        1970-01-01 01:00:00.000000000 
+0100
+++ new/opi-2.4.0/proxy/dependencies.txt        2021-10-11 19:03:21.000000000 
+0200
@@ -0,0 +1 @@
+python3-gunicorn python3-Flask python3-requests python3-gevent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/index.php 
new/opi-2.4.0/proxy/index.php
--- old/opi-2.3.0/proxy/index.php       2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/proxy/index.php       1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-<?php
-
-# Test it with `php -S localhost:8000 index.php`
-
-require __DIR__ . '/config.php';
-
-# TODO add API rate limits.
-
-$obs_api_link = $_GET['obs_api_link'];
-$obs_instance = $_GET['obs_instance']; # OBS / Packman
-
-if ($obs_instance === 'openSUSE') {
-    $username = $obs_username;
-    $password = $obs_password;
-} elseif ($obs_instance === 'Packman') {
-    $username = $pmbs_username;
-    $password = $pmbs_password;
-}
-
-$obs_api_link = str_replace('://', "://$username:$password@", $obs_api_link);
-
-header("Access-Control-Allow-Origin: *");
-
-echo file_get_contents($obs_api_link);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/install.sh 
new/opi-2.4.0/proxy/install.sh
--- old/opi-2.3.0/proxy/install.sh      1970-01-01 01:00:00.000000000 +0100
+++ new/opi-2.4.0/proxy/install.sh      2021-10-11 19:03:21.000000000 +0200
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+python3 setup.py install -f
+cp -v opi-proxy.service /etc/systemd/system/
+systemctl daemon-reload
+test -e /etc/opi-proxy.json || cp -v config.sample.json /etc/opi-proxy.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/opi-proxy.service 
new/opi-2.4.0/proxy/opi-proxy.service
--- old/opi-2.3.0/proxy/opi-proxy.service       1970-01-01 01:00:00.000000000 
+0100
+++ new/opi-2.4.0/proxy/opi-proxy.service       2021-10-11 19:03:21.000000000 
+0200
@@ -0,0 +1,12 @@
+[Unit]
+Description=OPI Proxy
+After=syslog.target
+
+[Service]
+ExecStart=/usr/bin/gunicorn -b :80 opi_proxy:app -k gevent -u nobody -g 
nogroup --log-syslog
+Environment=CONFIG=/etc/opi-proxy.json
+Restart=always
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/opi_proxy/__init__.py 
new/opi-2.4.0/proxy/opi_proxy/__init__.py
--- old/opi-2.3.0/proxy/opi_proxy/__init__.py   1970-01-01 01:00:00.000000000 
+0100
+++ new/opi-2.4.0/proxy/opi_proxy/__init__.py   2021-10-11 19:03:21.000000000 
+0200
@@ -0,0 +1,30 @@
+#!/usr/bin/python3
+
+import os
+import json
+
+import requests
+from flask import Flask, request, Response
+
+app = Flask(__name__)
+
+CONFIG_FILE = os.environ.get('CONFIG', 'config.json')
+config = json.load(open(CONFIG_FILE))
+
[email protected]('/')
+def endpoint():
+       c = config[request.args['obs_instance']]
+       assert request.args['obs_api_link'].startswith(c['url'])
+       r = requests.get(request.args['obs_api_link'], auth=(c['user'], 
c['pass']))
+       r.raise_for_status()
+       return Response(
+               r.text,
+               status=r.status_code,
+               headers={
+                       "Access-Control-Allow-Origin": "*"
+               },
+               mimetype=r.headers.get("content-type", "text/plain")
+       )
+
+if __name__ == '__main__':
+       app.run(host='0.0.0.0', debug=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/proxy/setup.py new/opi-2.4.0/proxy/setup.py
--- old/opi-2.3.0/proxy/setup.py        1970-01-01 01:00:00.000000000 +0100
+++ new/opi-2.4.0/proxy/setup.py        2021-10-11 19:03:21.000000000 +0200
@@ -0,0 +1,15 @@
+#!/usr/bin/python3
+
+from distutils.core import setup
+import os
+
+setup(
+    name='opi_proxy',
+    version='1.0',
+    license='GPLv3',
+    description='Proxy server for communication between OPI and OBS/PMBS',
+    author='Dominik Heidler',
+    author_email='[email protected]',
+    requires=['requests', 'Flask'],
+    packages=['opi_proxy'],
+)
Binary files old/opi-2.3.0/screenshot.png and new/opi-2.4.0/screenshot.png 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/setup.py new/opi-2.4.0/setup.py
--- old/opi-2.3.0/setup.py      2021-09-06 16:45:54.000000000 +0200
+++ new/opi-2.4.0/setup.py      2021-10-11 19:03:21.000000000 +0200
@@ -13,7 +13,7 @@
     description='Tool to Search and install almost all packages available for 
openSUSE and SLE',
     author='Guo Yunhe, Dominik Heidler, KaratekHD',
     author_email='[email protected], [email protected], [email protected]',
-    requires=['lxml', 'requests', 'termcolor'],
+    requires=['lxml', 'requests', 'termcolor', 'curses'],
     packages=['opi', 'opi.plugins', 'opi.config', 'opi.backends'],
     scripts=['bin/opi'],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/test/01_install_from_packman.py 
new/opi-2.4.0/test/01_install_from_packman.py
--- old/opi-2.3.0/test/01_install_from_packman.py       2021-09-06 
16:45:54.000000000 +0200
+++ new/opi-2.4.0/test/01_install_from_packman.py       2021-10-11 
19:03:21.000000000 +0200
@@ -6,22 +6,23 @@
 
 c = pexpect.spawn('./bin/opi gstreamer-plugins-ugly', 
logfile=sys.stdout.buffer, echo=False)
 
-c.expect("1. gstreamer-plugins-ugly\r\n")
-c.expect('Choose a number')
+c.expect('1. gstreamer-plugins-ugly\r\n')
+c.sendline('q')
+c.expect('Pick a number')
 c.sendline('1')
 
-c.expect("3. .*Packman Essentials", timeout=10)
+c.expect('3. .*Packman Essentials', timeout=10)
 c.sendline('3')
 
-c.expect("Do you want to reject the key", timeout=10)
+c.expect('Do you want to reject the key', timeout=10)
 c.sendline('t')
 
-c.expect("new packages to install", timeout=60)
-c.expect("Continue", timeout=60)
+c.expect('new packages to install', timeout=60)
+c.expect('Continue', timeout=60)
 c.sendline('y')
 c.interact()
 c.wait()
 c.close()
-assert c.exitstatus == 0, "Exit code: %i" % c.exitstatus
+assert c.exitstatus == 0, 'Exit code: %i' % c.exitstatus
 
 subprocess.check_call(['rpm', '-qi', 'gstreamer-plugins-ugly'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/test/02_install_from_home.py 
new/opi-2.4.0/test/02_install_from_home.py
--- old/opi-2.3.0/test/02_install_from_home.py  2021-09-06 16:45:54.000000000 
+0200
+++ new/opi-2.4.0/test/02_install_from_home.py  2021-10-11 19:03:21.000000000 
+0200
@@ -6,24 +6,25 @@
 
 c = pexpect.spawn('./bin/opi xosview', logfile=sys.stdout.buffer, echo=False)
 
-c.expect("1. xosview\r\n")
-c.expect('Choose a number')
+c.expect('1. xosview\r\n')
+c.sendline('q')
+c.expect('Pick a number')
 c.sendline('1')
 
-c.expect("2. .*X11:Utilities", timeout=10)
+c.expect('2. .*X11:Utilities', timeout=10)
 c.sendline('2')
 
-c.expect("new packages to install", timeout=60)
-c.expect("Continue", timeout=60)
+c.expect('new packages to install', timeout=60)
+c.expect('Continue', timeout=60)
 c.sendline('y')
 
-c.expect("Do you want to keep the repo", timeout=350)
+c.expect('Do you want to keep the repo', timeout=350)
 c.sendline('n')
 
 c.interact()
 c.wait()
 c.close()
-assert c.exitstatus == 0, "Exit code: %i" % c.exitstatus
+assert c.exitstatus == 0, 'Exit code: %i' % c.exitstatus
 
 subprocess.check_call(['rpm', '-qi', 'xosview'])
 subprocess.check_call('zypper lr -u | grep -v X11', shell=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-2.3.0/test/run_container_test.sh 
new/opi-2.4.0/test/run_container_test.sh
--- old/opi-2.3.0/test/run_container_test.sh    2021-09-06 16:45:54.000000000 
+0200
+++ new/opi-2.4.0/test/run_container_test.sh    2021-10-11 19:03:21.000000000 
+0200
@@ -6,7 +6,7 @@
        podman run -td --dns=1.1.1.1 --name=opi_base opensuse/tumbleweed
        podman exec -it opi_base zypper -n ref
        # opi dependencies
-       podman exec -it opi_base zypper -n install sudo python3 
python3-requests python3-lxml python3-termcolor curl
+       podman exec -it opi_base zypper -n install sudo python3 
python3-requests python3-lxml python3-termcolor python3-curses curl
 
        # test dependencies
        podman exec -it opi_base zypper -n install python3-pexpect

Reply via email to