Hello community, here is the log from the commit of package btrfsmaintenance for openSUSE:Factory checked in at 2018-02-27 17:00:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/btrfsmaintenance (Old) and /work/SRC/openSUSE:Factory/.btrfsmaintenance.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "btrfsmaintenance" Tue Feb 27 17:00:10 2018 rev:15 rq:580565 version:0.4 Changes: -------- --- /work/SRC/openSUSE:Factory/btrfsmaintenance/btrfsmaintenance.changes 2018-01-20 11:28:15.560032082 +0100 +++ /work/SRC/openSUSE:Factory/.btrfsmaintenance.new/btrfsmaintenance.changes 2018-02-27 17:00:29.638543994 +0100 @@ -1,0 +2,6 @@ +Mon Feb 5 15:13:00 UTC 2018 - lpecha...@suse.com + +- Move the defrag plugin over to Python 3. (bsc#1070322) +- Added patch: python3-support-bsc1070322.diff + +------------------------------------------------------------------- New: ---- python3-support-bsc1070322.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btrfsmaintenance.spec ++++++ --- /var/tmp/diff_new_pack.dYyCIl/_old 2018-02-27 17:00:30.870499481 +0100 +++ /var/tmp/diff_new_pack.dYyCIl/_new 2018-02-27 17:00:30.874499337 +0100 @@ -29,9 +29,10 @@ Group: System/Base Url: https://github.com/kdave/btrfsmaintenance Source0: %{name}-%{version}.tar.bz2 +Patch0: python3-support-bsc1070322.diff BuildRequires: systemd Requires: btrfsprogs -Requires: zypp-plugin-python +Requires: python3-zypp-plugin Requires: libzypp(plugin:commit) Supplements: btrfsprogs BuildArch: noarch @@ -43,6 +44,7 @@ %prep %setup -q +%patch0 -p1 %build ++++++ python3-support-bsc1070322.diff ++++++ Index: btrfsmaintenance-0.4/btrfs-defrag-plugin.py =================================================================== --- btrfsmaintenance-0.4.orig/btrfs-defrag-plugin.py +++ btrfsmaintenance-0.4/btrfs-defrag-plugin.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # This plugin defragments rpm files after update. # @@ -17,14 +17,19 @@ # contiguous space, the bigger the extent is, the worse and the extent # size hint is not reached anyway -from sys import stderr +import sys +if sys.version_info[0] >= 3: + from builtins import str + popen_kwargs = { 'encoding': 'ascii' } +else: + popen_kwargs = { } from zypp_plugin import Plugin import subprocess DEBUG=False EXTENT_SIZE=64*1024*1024 LOGFILE='/tmp/btrfs-defrag-plugin.log' -PATH=subprocess.check_output(["rpm", "--eval", "%_dbpath"]).strip() +PATH=subprocess.check_output(["rpm", "--eval", "%_dbpath"], **popen_kwargs).strip() def dbg(args): if not DEBUG: return @@ -34,7 +39,7 @@ def dbg(args): f.close() def qx(args): - out=subprocess.Popen(args, shell=True, stdout=subprocess.PIPE).stdout + out=subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, **popen_kwargs).stdout outstr="".join(out.readlines()) out.close() return outstr