Bug 1139799 - zypper-log has a hard dependency on Python 2.x.x and won't work with Python 3.x.x
zypper-log has a hard dependency on Python 2.x.x and won't work with Python 3...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: libzypp
Current
x86-64 Other
: P2 - High : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-30 08:13 UTC by Jinesh Choksi
Modified: 2019-11-11 09:14 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jinesh Choksi 2019-06-30 08:13:39 UTC
In a VM, I had a minimal server install of openSUSE Tumbleweed.

i.e.

Product = openSUSE Tumbleweed
System Role = Server
Patterns = No patterns selected and only the "zypper" package selected with "install recommended packages" option unchecked.

---snip---
hostname:~ # rpm -qa | grep python
python3-gobject-3.32.1-1.3.x86_64
python-rpm-macros-20190610.2ee3233-1.1.noarch
python3-firewall-0.6.3-5.3.noarch
python3-six-1.12.0-3.1.noarch
python3-decorator-4.4.0-1.3.noarch
python3-slip-0.6.5-6.1.noarch
python3-dbus-python-1.2.8-2.5.x86_64
python3-slip-dbus-0.6.5-6.1.noarch
libpython3_7m1_0-3.7.3-1.2.x86_64
python3-base-3.7.3-1.2.x86_64
python3-3.7.3-1.1.x86_64
python3-ply-3.11-3.4.noarch
python3-bind-9.11.2-44.3.noarch
---snip---


---snip---
hostname:~ # zypper install zypper-log
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  zypper-log

1 new package to install.
Overall download size: 42.0 KiB. Already cached: 0 B. After the operation, additional 6.2 KiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package zypper-log-1.14.28-1.1.noarch                                     (1/1),  42.0 KiB (  6.2 KiB unpacked)
Retrieving: zypper-log-1.14.28-1.1.noarch.rpm ......................................................................[done]
Checking for file conflicts: .......................................................................................[done]
(1/1) Installing: zypper-log-1.14.28-1.1.noarch ....................................................................[done]
---snip---


---snip---
hostname:~ # zypper-log
/usr/bin/env: 'python': No such file or directory
---snip---


I tried amending the /usr/sbin/zypper-log script to use:

---snip---
!/usr/bin/env python3
---snip---

instead of:

---snip---
!/usr/bin/env python
---snip---

and got the following error:

---snip---
hostname:/usr/sbin # zypper-log 
  File "/usr/sbin/zypper-log", line 61
    ver = run[4]
               ^
TabError: inconsistent use of tabs and spaces in indentation
---snip---


Current Requires for the package are:

---snip---
%package log
%if 0%{?suse_version} && 0%{?suse_version} < 1140
Requires:       python >= 2.6
Requires:       python-argparse
%else
Requires:       python >= 2.7
%endif
Requires:       xz
BuildArch:      noarch
Summary:        CLI for accessing the zypper logfile
Group:          System/Packages
---snip---
Comment 1 Michael Andres 2019-07-01 10:20:04 UTC
Thanks. We'll review it.
Comment 2 Michael Andres 2019-11-11 09:14:24 UTC
(https://github.com/openSUSE/zypper/pull/304)
Fixed for zypper-1.14.33