Hello community, here is the log from the commit of package yast2-multipath for openSUSE:Factory checked in at 2018-01-17 21:42:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-multipath (Old) and /work/SRC/openSUSE:Factory/.yast2-multipath.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-multipath" Wed Jan 17 21:42:06 2018 rev:39 rq:548025 version:4.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-multipath/yast2-multipath.changes 2017-06-07 13:08:37.053896323 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-multipath.new/yast2-multipath.changes 2018-01-17 21:42:07.784648230 +0100 @@ -1,0 +2,13 @@ +Fri Dec 1 06:36:14 UTC 2017 - nw...@suse.com + +- fate#323526, support python3 and change indentation to 8 spaces. +- 4.0.0 + +------------------------------------------------------------------- +Wed Aug 16 10:38:16 UTC 2017 - an...@suse.com + +- Use yast2-storage-ng instead of yast2-storage (part of + fate#318196) +- 3.3.0 + +------------------------------------------------------------------- Old: ---- yast2-multipath-3.2.1.tar.bz2 New: ---- yast2-multipath-4.0.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-multipath.spec ++++++ --- /var/tmp/diff_new_pack.LAMLCN/_old 2018-01-17 21:42:08.356621458 +0100 +++ /var/tmp/diff_new_pack.LAMLCN/_new 2018-01-17 21:42:08.360621270 +0100 @@ -17,18 +17,19 @@ Name: yast2-multipath -Version: 3.2.1 +Version: 4.0.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 Requires: yast2 +# StorageManager#deactivate +Requires: yast2-storage-ng >= 3.3.1 BuildRequires: perl-XML-Writer BuildRequires: update-desktop-files BuildRequires: yast2 BuildRequires: yast2-devtools >= 3.1.10 -BuildRequires: yast2-storage BuildRequires: yast2-testsuite BuildArch: noarch ++++++ yast2-multipath-3.2.1.tar.bz2 -> yast2-multipath-4.0.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-multipath-3.2.1/package/yast2-multipath.changes new/yast2-multipath-4.0.0/package/yast2-multipath.changes --- old/yast2-multipath-3.2.1/package/yast2-multipath.changes 2017-03-24 13:57:27.962782690 +0100 +++ new/yast2-multipath-4.0.0/package/yast2-multipath.changes 2017-12-04 10:34:17.000000000 +0100 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Fri Dec 1 06:36:14 UTC 2017 - nw...@suse.com + +- fate#323526, support python3 and change indentation to 8 spaces. +- 4.0.0 + +------------------------------------------------------------------- +Wed Aug 16 10:38:16 UTC 2017 - an...@suse.com + +- Use yast2-storage-ng instead of yast2-storage (part of + fate#318196) +- 3.3.0 + +------------------------------------------------------------------- Fri Mar 24 11:12:09 UTC 2017 - mfi...@suse.com - bnc#1026027 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-multipath-3.2.1/package/yast2-multipath.spec new/yast2-multipath-4.0.0/package/yast2-multipath.spec --- old/yast2-multipath-3.2.1/package/yast2-multipath.spec 2017-03-24 13:57:27.962782690 +0100 +++ new/yast2-multipath-4.0.0/package/yast2-multipath.spec 2017-12-04 10:34:17.000000000 +0100 @@ -17,18 +17,19 @@ Name: yast2-multipath -Version: 3.2.1 +Version: 4.0.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 Requires: yast2 +# StorageManager#deactivate +Requires: yast2-storage-ng >= 3.3.1 BuildRequires: perl-XML-Writer BuildRequires: update-desktop-files BuildRequires: yast2 BuildRequires: yast2-devtools >= 3.1.10 -BuildRequires: yast2-storage BuildRequires: yast2-testsuite BuildArch: noarch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-multipath-3.2.1/src/include/multipath/complex.rb new/yast2-multipath-4.0.0/src/include/multipath/complex.rb --- old/yast2-multipath-3.2.1/src/include/multipath/complex.rb 2017-03-24 13:57:27.962782690 +0100 +++ new/yast2-multipath-4.0.0/src/include/multipath/complex.rb 2017-12-04 10:34:17.000000000 +0100 @@ -26,6 +26,10 @@ # # Compelx stuffs for multipath yast module, this file is included # by Multipath.ycp. + +require "yast" +require "y2storage" + module Yast module MultipathComplexInclude def initialize_multipath_complex(include_target) @@ -34,7 +38,6 @@ textdomain "multipath" Yast.import "Service" - Yast.import "Storage" Yast.import "Label" Yast.import "Wizard" Yast.import "Mode" @@ -3651,7 +3654,8 @@ return end else - Storage.ActivateMultipath(true) + # There is no multipathd service, rely on Y2Storage + Y2Storage::StorageManager.instance.activate end @service_status = 1 @@ -3686,7 +3690,8 @@ return end else - Storage.ActivateMultipath(false) + # There is no multipathd service, rely on Y2Storage + Y2Storage::StorageManager.instance.deactivate end @service_status = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-multipath-3.2.1/src/modules/Multipath.rb new/yast2-multipath-4.0.0/src/modules/Multipath.rb --- old/yast2-multipath-3.2.1/src/modules/Multipath.rb 2017-03-24 13:57:27.966782690 +0100 +++ new/yast2-multipath-4.0.0/src/modules/Multipath.rb 2017-12-04 10:34:17.000000000 +0100 @@ -29,6 +29,7 @@ # Representation of the configuration of multipath. # Input and output routines. require "yast" +require "y2storage" module Yast class MultipathClass < Module @@ -47,7 +48,6 @@ Yast.import "PackageSystem" Yast.import "Mode" Yast.import "Stage" - Yast.import "Storage" @config_modified = false @@ -300,8 +300,10 @@ return false end else - Storage.ActivateMultipath(false) - Storage.ActivateMultipath(true) + # There is no multipathd service, rely on Y2Storage to deactivate and + # reactivate multipath (and all the associated virtual devices) + Y2Storage::StorageManager.instance.deactivate + Y2Storage::StorageManager.instance.activate end Builtins.sleep(sl) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-multipath-3.2.1/src/servers_non_y2/ag_multipath new/yast2-multipath-4.0.0/src/servers_non_y2/ag_multipath --- old/yast2-multipath-3.2.1/src/servers_non_y2/ag_multipath 2017-03-24 13:57:27.978782690 +0100 +++ new/yast2-multipath-4.0.0/src/servers_non_y2/ag_multipath 2017-12-04 10:34:17.000000000 +0100 @@ -1,11 +1,11 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding: utf8 -*- # -# Authors: Hu Ziming <hzman...@gmail.com> -# Lukas Ocilka <loci...@suse.cz> +# Authors: Hu Ziming <hzman...@gmail.com> +# Lukas Ocilka <loci...@suse.cz> # -# File: ag_multipath +# File: ag_multipath # # License: # @@ -34,7 +34,7 @@ import os import sys -class Pattern: +class Pattern(object): uuid = r'^\w{3,}' uuid_spliter_1_start = '(' uuid_spliter_1_end = ')' @@ -44,10 +44,10 @@ path = r' \\_' # <-- class Pattern -class Multipath_Parser: +class Multipath_Parser(object): def __init__(self, command): - self.command = command + self.command = command def get_mode(self, dataline): if re.compile(Pattern.uuid).match(dataline): @@ -66,14 +66,14 @@ curr_group = -1 curr_path = -1 - # calls system command - # TODO: use non blocking Popen3 class + # calls system command + # TODO: use non blocking Popen3 class fp = os.popen(self.command) self.data = fp.readlines() fp.close() self.formatted = [] - # parses system command output + # parses system command output for dataline in self.data: data_dict, mode = self.parse_line(dataline) if mode == None: @@ -121,7 +121,7 @@ # print mode # print data_dict - # list of maps + # list of maps return self.output() @@ -133,30 +133,30 @@ for device in self.formatted: out = out + '\t$[\n' - for key in ['uuid', 'alias', 'misc', 'size', 'features', 'hwhandler']: - out = out + '\t\t"%s":"%s",\n' % (key, device[key]) + for key in ['uuid', 'alias', 'misc', 'size', 'features', 'hwhandler']: + out = out + '\t\t"%s":"%s",\n' % (key, device[key]) - for path_group in xrange(device['group_cnt']): + for path_group in range(device['group_cnt']): out = out + '\t\t"path_group":$[\n' group_index = 'PG%d' % path_group - for key in ['selector', 'prio']: - out = out + '\t\t\t"%s":"%s",\n' % (key, device[group_index][key]) + for key in ['selector', 'prio']: + out = out + '\t\t\t"%s":"%s",\n' % (key, device[group_index][key]) - for path in xrange(device[group_index]['path_cnt']): + for path in range(device[group_index]['path_cnt']): out = out + '\t\t\t"path":$[\n' path_index = 'P%d' % path - out = out + '\t\t\t\t"%s":"%s",\n' % ('bus_address' , device[group_index][path_index]['bus_addr']) + out = out + '\t\t\t\t"%s":"%s",\n' % ('bus_address' , device[group_index][path_index]['bus_addr']) - for key in ['path_device', 'major', 'minor', 'status1', 'status2']: - out = out + '\t\t\t\t"%s":"%s",\n' % (key , device[group_index][path_index][key]) + for key in ['path_device', 'major', 'minor', 'status1', 'status2']: + out = out + '\t\t\t\t"%s":"%s",\n' % (key , device[group_index][path_index][key]) out = out + '\t\t\t],\n' out = out + '\t\t],\n' out = out + '\t],\n' - out = out + "]" + out = out + "]" return out @@ -216,62 +216,62 @@ return (data_dict, mode) # <-- class Multipath_Parser -class SCR_Agent: +class SCR_Agent(object): def __init__(self): - self.command = "" - self.path = "" - self.args = "" + self.command = "" + self.path = "" + self.args = "" def SCR_Command (self): - scr_command = sys.stdin.readline() + scr_command = sys.stdin.readline() - # scr_command examples: - # `Read(.) - # `Read (.some.path) - # `Write (.some.path, "value") + # scr_command examples: + # `Read(.) + # `Read (.some.path) + # `Write (.some.path, "value") - # the first argument is command - p = re.compile ('^`\w+') - if (p.match (scr_command)): - self.command = p.search (scr_command).group() + # the first argument is command + p = re.compile ('^`\w+') + if (p.match (scr_command)): + self.command = p.search (scr_command).group() - # FIXME: parse path - # FIXME: parse args + # FIXME: parse path + # FIXME: parse args # <-- SCR_Command # <-- class SCR_Agent def main(): while True: - scr_agent = SCR_Agent () - scr_agent.SCR_Command () + scr_agent = SCR_Agent () + scr_agent.SCR_Command () - # SCR::Read - if (scr_agent.command == '`Read'): - # This is a fake, the command returns what would '/sbin/multipath -l' - # return if it was supported - # You can use ag_multipath_testdata1.out or ag_multipath_testdata2.out - # as a source of data - # - # foobar = Multipath_Parser('/yast/test/multipath/multipath.sh') - - foobar = Multipath_Parser('/sbin/multipath -l') - ret = foobar.parse() - - # print the data to stdout as string - print ret + "\n" - # flushing, otherwise it is buffered - sys.stdout.flush() - - # Exit - elif (scr_agent.command == '`result'): - break - else: - print "nil\n" - sys.stdout.flush() + # SCR::Read + if (scr_agent.command == '`Read'): + # This is a fake, the command returns what would '/sbin/multipath -l' + # return if it was supported + # You can use ag_multipath_testdata1.out or ag_multipath_testdata2.out + # as a source of data + # + # foobar = Multipath_Parser('/yast/test/multipath/multipath.sh') + + foobar = Multipath_Parser('/sbin/multipath -l') + ret = foobar.parse() + + # print the data to stdout as string + print(ret + "\n") + # flushing, otherwise it is buffered + sys.stdout.flush() + + # Exit + elif (scr_agent.command == '`result'): + break + else: + print("nil\n") + sys.stdout.flush() # <-- main if __name__ == '__main__':