From 39f318923eff5579762235245c7a5c5e5c86b2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 8 Apr 2014 01:06:43 +0200 Subject: [PATCH] pungi: fix --nosource option https://bugzilla.redhat.com/show_bug.cgi?id=1014680 --- pungi/effective-nosource-option.patch | 79 +++++++++++++++++++++++++++ pungi/pungi.spec | 2 + 2 files changed, 81 insertions(+) create mode 100644 pungi/effective-nosource-option.patch diff --git a/pungi/effective-nosource-option.patch b/pungi/effective-nosource-option.patch new file mode 100644 index 0000000..cabe18c --- /dev/null +++ b/pungi/effective-nosource-option.patch @@ -0,0 +1,79 @@ +From a403e72e5c76c8f885b7b2120b7f5753c8f5006d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Mon, 7 Apr 2014 00:49:29 +0200 +Subject: [PATCH] Do not collect (or even check existence) src.rpms when + --nosource given +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Organization: Invisible Things Lab +Cc: Marek Marczykowski-Górecki + +Signed-off-by: Marek Marczykowski-Górecki +--- + src/pypungi/__init__.py | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py +index e719f1a..67f4663 100644 +--- a/src/pypungi/__init__.py ++++ b/src/pypungi/__init__.py +@@ -774,7 +774,8 @@ class Pungi(pypungi.PungiBase): + + # get package objects according to the input list + self.getPackageObjects() +- self.createSourceHashes() ++ if self.is_sources: ++ self.createSourceHashes() + + pass_num = 0 + added = set() +@@ -799,16 +800,18 @@ class Pungi(pypungi.PungiBase): + for po in sorted(self.po_list): + added.update(self.get_package_deps(po)) + +- added_srpms = self.add_srpms() +- added.update(added_srpms) +- if self.is_selfhosting: +- for srpm_po in sorted(added_srpms): +- added.update(self.get_package_deps(srpm_po)) ++ if self.is_sources: ++ added_srpms = self.add_srpms() ++ added.update(added_srpms) ++ if self.is_selfhosting: ++ for srpm_po in sorted(added_srpms): ++ added.update(self.get_package_deps(srpm_po)) + + if self.is_fulltree: + new = self.add_fulltree() + self.fulltree_packages.update(new) +- self.fulltree_packages.update([ self.sourcerpm_srpmpo_map[i.sourcerpm] for i in new ]) ++ if self.is_sources: ++ self.fulltree_packages.update([ self.sourcerpm_srpmpo_map[i.sourcerpm] for i in new ]) + added.update(new) + if added: + continue +@@ -816,7 +819,8 @@ class Pungi(pypungi.PungiBase): + # add langpacks + new = self.add_langpacks(self.po_list) + self.langpack_packages.update(new) +- self.langpack_packages.update([ self.sourcerpm_srpmpo_map[i.sourcerpm] for i in new ]) ++ if self.is_sources: ++ self.langpack_packages.update([ self.sourcerpm_srpmpo_map[i.sourcerpm] for i in new ]) + added.update(new) + if added: + continue +@@ -824,7 +828,8 @@ class Pungi(pypungi.PungiBase): + # add multilib packages + new = self.add_multilib(self.po_list) + self.multilib_packages.update(new) +- self.multilib_packages.update([ self.sourcerpm_srpmpo_map[i.sourcerpm] for i in new ]) ++ if self.is_sources: ++ self.multilib_packages.update([ self.sourcerpm_srpmpo_map[i.sourcerpm] for i in new ]) + added.update(new) + if added: + continue +-- +1.8.3.1 + diff --git a/pungi/pungi.spec b/pungi/pungi.spec index dff737c..a3eaaa0 100644 --- a/pungi/pungi.spec +++ b/pungi/pungi.spec @@ -15,6 +15,7 @@ URL: https://fedorahosted.org/pungi Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 Patch0: support-verify-downloaded-packages.patch Patch1: disable-efi.patch +Patch2: effective-nosource-option.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: yum => 3.4.3-28, repoview, createrepo >= 0.4.11 Requires: lorax @@ -31,6 +32,7 @@ A tool to create anaconda based installation trees/isos of a set of rpms. %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %{__python} setup.py build