X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=spec2make.c;fp=spec2make.c;h=1d68503b028c0d4193439c3d8b895f86ce8d3b6d;hb=d54c43a63e687b59b3e90cb1cd25c95ecf3ecccd;hp=712ce68633d992658650390bb07c8cf9b5eb513c;hpb=1e60e4c66a5ed1423e181f34c0b70ba0ef087b40;p=build.git diff --git a/spec2make.c b/spec2make.c index 712ce686..1d68503b 100644 --- a/spec2make.c +++ b/spec2make.c @@ -176,20 +176,25 @@ main(int argc, char *argv[]) arch=target; } } - /* skip empty packages */ - if (pkg->fileList) { - /* attach (add) rpm path to package */ - printf("%s.rpms += RPMS/%s/%s-%s-%s.%s.rpm\n", - package_name, arch, name, version, release, arch); - /* convenience */ - printf("%s.rpmnames += %s\n", - package_name, name); - /* attach path to rpm name */ - printf("%s.rpm-path := RPMS/%s/%s-%s-%s.%s.rpm\n", - name,arch, name, version, release, arch); - /* attach package to rpm name for backward resolution - should be unique */ - printf("%s.package := %s\n", - name,package_name); + /* skip empty packages + * + * Unfortunately, f8 + the RHEL kernel break this bit of cleverness. The following + * line returns false for the kernel-devel package even though it is not empty thereby breaking the build. + * Rather than unfolding the kernel package macros in the current specfile, this hack should work till f8 dies its natural death. */ + + if (pkg->fileList || !strncmp(name,"kernel",sizeof("kernel")-1)) { + /* attach (add) rpm path to package */ + printf("%s.rpms += RPMS/%s/%s-%s-%s.%s.rpm\n", + package_name, arch, name, version, release, arch); + /* convenience */ + printf("%s.rpmnames += %s\n", + package_name, name); + /* attach path to rpm name */ + printf("%s.rpm-path := RPMS/%s/%s-%s-%s.%s.rpm\n", + name,arch, name, version, release, arch); + /* attach package to rpm name for backward resolution - should be unique */ + printf("%s.package := %s\n", + name,package_name); } } }