phracek pushed to preupgrade-assistant (master). "Fix print issue #1224892 (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue May 26 07:25:53 UTC 2015
From 53d176e42c8fe5956e425922006d1b18b886108e Mon Sep 17 00:00:00 2001
From: Petr Hracek <phracek at redhat.com>
Date: Tue, 26 May 2015 09:23:42 +0200
Subject: Fix print issue #1224892
Signed-off-by: Petr Hracek <phracek at redhat.com>
diff --git a/preupgrade-assistant-print.patch b/preupgrade-assistant-print.patch
new file mode 100644
index 0000000..7138c63
--- /dev/null
+++ b/preupgrade-assistant-print.patch
@@ -0,0 +1,81 @@
+diff --git a/preupg-create-group-xml b/preupg-create-group-xml
+index e75aba4..aa7a656 100755
+--- a/preupg-create-group-xml
++++ b/preupg-create-group-xml
+@@ -1,4 +1,5 @@
+ #!/usr/bin/python2
++from __future__ import print_function
+ import os
+ import sys
+ import optparse
+@@ -24,12 +25,12 @@ def main():
+ )
+ opts, args = parser.parse_args()
+ if len(args) > 1 or len(args) == 0:
+- print 'Specify just one directory with INI file.'
++ print('Specify just one directory with INI file.')
+ parser.print_help()
+ sys.exit(1)
+
+ if not os.path.exists(args[0]):
+- print 'Dir', args[0], 'does not exists.'
++ print('Dir %s does not exists.' % args[0])
+ sys.exit(1)
+
+ if args[0].endswith('/'):
+@@ -40,12 +41,12 @@ def main():
+ if d.endswith(".ini"):
+ found = 1
+ if not found:
+- print 'In directory %s was not found any INI file.' % args[0]
++ print ('In directory %s was not found any INI file.' % args[0])
+ sys.exit(1)
+
+ dir_name = utils.get_valid_scenario(args[0])
+ if dir_name is None:
+- print 'Dir does not contain proper scenario.'
++ print('Dir does not contain proper scenario.')
+ sys.exit(1)
+ index = 0
+ for i, d in enumerate(args[0].split(os.path.sep)):
+@@ -63,7 +64,7 @@ def main():
+ try:
+ target_tree = ElementTree.parse(template_file).getroot()
+ except IOError, e:
+- print 'Problem with reading template.xml file'
++ print ('Problem with reading template.xml file')
+ sys.exit(1)
+ target_tree = ComposeXML.run_compose(target_tree, os.path.dirname(dir_name), content=os.path.basename(dir_name))
+
+@@ -71,9 +72,9 @@ def main():
+ # must be encoded by ElementTree!
+ data = ElementTree.tostring(target_tree, "utf-8")
+ write_to_file(os.path.join(dir_name, filename), "wb", data, False)
+- print 'Generated report file for preupgrade-assistant is:', ''.join(os.path.join(dir_name, filename))
++ print ('Generated report file for preupgrade-assistant is:', ''.join(os.path.join(dir_name, filename)))
+ except IOError, e:
+- print "Problem with writing file ", filename
++ print ("Problem with writing file %s." % filename)
+
+
+ #oscap_group.write_profile_xml(target_tree)
+diff --git a/preupg-xccdf-compose b/preupg-xccdf-compose
+index 0da14fe..83529bf 100755
+--- a/preupg-xccdf-compose
++++ b/preupg-xccdf-compose
+@@ -1,5 +1,5 @@
+ #!/usr/bin/python2
+-
++from __future__ import print_function
+ import sys
+ import optparse
+ from preuputils.compose import XCCDFCompose
+@@ -13,7 +13,7 @@ def main():
+ parser = optparse.OptionParser(usage="%prog dirname", description="Create XML files for OpenSCAP")
+ opts, args = parser.parse_args()
+ if len(args) > 1 or len(args) == 0:
+- print 'Specify just one directory'
++ print ('Specify just one directory')
+ parser.print_help()
+ sys.exit(0)
+
diff --git a/preupgrade-assistant.spec b/preupgrade-assistant.spec
index 2fe4b6e..1252181 100644
--- a/preupgrade-assistant.spec
+++ b/preupgrade-assistant.spec
@@ -4,7 +4,7 @@
Name: preupgrade-assistant
Version: 0.11.12
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Preupgrade assistant performs assessment of the system
License: GPLv3+
URL: https://github.com/phracek/preupgrade-assistant
@@ -13,6 +13,7 @@ Source1: macros.preupgrade-assistant
Patch0: preupgrade-assistant-do-not-ship-ui.patch
Patch1: preupgrade-assistant-reports.patch
Patch2: preupgrade-assistant-html.patch
+Patch3: preupgrade-assistant-print.patch
BuildArch: noarch
BuildRequires: rpm-devel
@@ -79,6 +80,7 @@ and scripts for generating contents.
%patch0 -p1 -b .not-ui
%patch1 -p1 -b .reports
%patch2 -p1 -b .html_patch
+%patch3 -p1 -b .print
rm -rf preup_ui
rm -rf ui-conf
@@ -167,12 +169,18 @@ rm -f ${RPM_BUILD_ROOT}%{_bindir}/premigrate
%{_rpmconfigdir}/macros.d/macros.preupgrade-assistant
%changelog
+* Tue May 26 2015 Petr Hracek <phracek at redhat.com> - 0.11.12-4
+- Fix print issue #1224892
+
* Wed May 20 2015 Petr Stodulka <pstodulk at redhat.com> - 0.11.12-3
- fixed wrong substitution for solution texts
* Tue May 19 2015 Petr Stodulka <pstodulk at redhat.com> - 0.11.12-2
- added patch for updating solution.txt caused by splitting reports
+* Tue May 26 2015 Petr Hracek <phracek at redhat.com> - 0.11.12-2
+- Fix print issue #1224892
+
* Fri May 15 2015 Petr Hracek <phracek at redhat.com> - 0.11.12-1
- Rebase to new upstream version 0.11.12
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/preupgrade-assistant.git/commit/?h=master&id=53d176e42c8fe5956e425922006d1b18b886108e
More information about the scm-commits
mailing list