From 0a907f3452272a210fff811ef2d57f442ba43d34 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 10 Jun 2011 12:46:28 +0200 Subject: [PATCH] ugly hack to proceed with the build on f15 --- onelab-k32-tags.mk | 5 +++-- spec2make.py | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/onelab-k32-tags.mk b/onelab-k32-tags.mk index f55254c2..69981c14 100644 --- a/onelab-k32-tags.mk +++ b/onelab-k32-tags.mk @@ -3,8 +3,9 @@ ### linux-2.6-BRANCH := rhel6 linux-2.6-GITPATH := git://git.onelab.eu/linux-2.6.git@rhel6 -# help out spec2make on f8 and centos5, due to a bug in rpm -ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)" +# help out spec2make on f8 and centos5, due to a bug in rpm +# ditto on f15 for spec2make.py - tmp hopefully +ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f15 centos5)" kernel-WHITELIST-RPMS := kernel-devel,kernel-headers endif kernel-DEVEL-RPMS += elfutils-libelf-devel diff --git a/spec2make.py b/spec2make.py index 0e5a47df..94dedd8b 100755 --- a/spec2make.py +++ b/spec2make.py @@ -50,7 +50,9 @@ def main (): target = options.target whitelist=options.whitelist.split(',') # Print non-empty packages + counter=0 for package in specobj.packages: + counter += 1 header=package.header name=header.format('%{name}') version=header.format('%{version}') @@ -60,9 +62,18 @@ def main (): # skip dummy entries if not (name and version and release and arch) : continue - whitelisted = name in whitelist + # select relevant packages + # could not find the magic recipe to do this properly yet + # so ugly temporary hack : + # when whitelisted, we expose the first package plus the white-listed ones + # otherwise we expose everything + relevant=False + if not whitelist: relevant=True + else: + if counter==1: relevant=True + else: relevant=name in whitelist - if header.fullFilelist or whitelisted: + if relevant: # attach (add) rpm path to package print "%s.rpms += RPMS/%s/%s-%s-%s.%s.rpm"%\ (package_name, arch, name, version, release, arch) -- 2.47.0