From 6ceadebaa9f81b0ecb2ec30bbfbd1c1171cbd6ba Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 29 Apr 2014 13:36:03 -0500 Subject: [PATCH] honour the --nosource option Patch by Barry Scott https://lists.fedoraproject.org/pipermail/buildsys/2014-January/004238.html --- src/pypungi/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py index c8762926..3b804f71 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,8 +800,10 @@ 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_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)) @@ -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