pstodulk pushed to preupgrade-assistant (f22). "added patch for RepoData"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 30 09:50:13 UTC 2015


>From c1ab322c12d3d75054da498d28ef290eb2a35c56 Mon Sep 17 00:00:00 2001
From: Petr Stodulka <pstodulk at redhat.com>
Date: Thu, 30 Apr 2015 11:49:19 +0200
Subject: added patch for RepoData


diff --git a/preupgrade-assistant-repodata.patch b/preupgrade-assistant-repodata.patch
new file mode 100644
index 0000000..b93b48c
--- /dev/null
+++ b/preupgrade-assistant-repodata.patch
@@ -0,0 +1,40 @@
+diff --git a/preup/kickstart.py b/preup/kickstart.py
+index ca4945f..5bbbd53 100644
+--- a/preup/kickstart.py
++++ b/preup/kickstart.py
+@@ -14,7 +14,12 @@ from pykickstart.version import makeVersion
+ from pykickstart.constants import KS_SCRIPT_POST
+ from preup.logger import  log_message
+ from preup import settings
+-from preup.utils import write_to_file, get_file_content
++from preup.utils import write_to_file, get_file_content, get_system
++
++if not get_system():
++    from pykickstart.commands.repo import RHEL6_RepoData as SystemRepoData
++else:
++    from pykickstart.commands.repo import F21_RepoData as SystemRepoData
+ 
+ 
+ class YumGroupManager(object):
+@@ -119,10 +124,10 @@ class YumGroupGenerator(object):
+         return output + output_packages
+ 
+ 
+-class RepoData(commands.repo.F21_RepoData):
++class RepoData(SystemRepoData):
+     def __init__(self, *args, **kwargs):
+         self.enabled = kwargs.pop("enabled", True)
+-        commands.repo.F21_RepoData.__init__(self, *args, **kwargs)
++        SystemRepoData.__init__(self, *args, **kwargs)
+ 
+ 
+ class KickstartGenerator(object):
+@@ -232,7 +237,7 @@ class KickstartGenerator(object):
+             data = {}
+             data['name'] = key
+             data['baseurl'] = value.strip()
+-            repodata = commands.repo.RHEL6_RepoData(**data)
++            repodata = SystemRepoData(**data)
+             repos += repodata.__str__()
+         self.ks.handler.repo.dataList().append(repos)
+ 
diff --git a/preupgrade-assistant.spec b/preupgrade-assistant.spec
index 71d9994..4c2ad17 100644
--- a/preupgrade-assistant.spec
+++ b/preupgrade-assistant.spec
@@ -4,15 +4,16 @@
 
 Name:           preupgrade-assistant
 Version:        %{pa_version}
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Preupgrade assistant performs assessment of the system
 License:        GPLv3+
 URL:            https://github.com/phracek/preupgrade-assistant
 Source0:        https://github.com/phracek/%{name}/archive/%{pa_version}.tar.gz
 Source1:        macros.preupgrade-assistant
 Patch0:         preupgrade-assistant-do-not-ship-ui.patch
-# this can be removed for version greater than 0.11.11
+# these patches can be removed for version greater than 0.11.11
 Patch1:         preupgrade-assistant-version.patch
+Patch2:         preupgrade-assistant-repodata.patch
 BuildArch:      noarch
 
 BuildRequires:  rpm-devel
@@ -70,6 +71,7 @@ migration after the installation of Fedora system.
 %setup -q -n %{name}-%{version}
 %patch0 -p1 -b .not-ui
 %patch1 -p1 -b .version
+%patch2 -p1 -b .repodata
 
 rm -rf preup_ui
 rm -rf ui-conf
@@ -156,6 +158,9 @@ rm -f ${RPM_BUILD_ROOT}%{_bindir}/premigrate
 %{_rpmconfigdir}/macros.d/macros.preupgrade-assistant
 
 %changelog
+* Thu Apr 30 2015 Petr Stodulka <pstodulk at redhat.com> - 0.11.11-2
+- added patch from upstream for *RepoData in preup/kickstart.py
+
 * Wed Apr 29 2015 Petr Stodulka <pstodulk at redhat.com> - 0.11.11-1
 - Upgrate to 0.11.11
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/preupgrade-assistant.git/commit/?h=f22&id=c1ab322c12d3d75054da498d28ef290eb2a35c56


More information about the scm-commits mailing list