Replace '-' in kernel version with '_'
authorArun Sharma <asharma@fb.com>
Wed, 4 May 2011 20:48:11 +0000 (13:48 -0700)
committerMichal Marek <mmarek@suse.cz>
Wed, 4 May 2011 21:07:48 +0000 (23:07 +0200)
Removing the '-' results in hard to read filenames such as:
kernel-2.6.35.2000042g76e4caf-28.x86_64.rpm

kernel-2.6.35.2_000042_g76e4caf-28.x86_64.rpm is easier to
read.

Signed-off-by: Arun Sharma <asharma@fb.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/package/Makefile
scripts/package/mkspec

index a834b935f5363d80ab56b15a1acf3cb477f21e42..1b7eaea83123a523ea0936e6e4302f16de8a29a6 100644 (file)
@@ -26,7 +26,7 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
                   else echo rpm; fi)
 
 # Remove hyphens since they have special meaning in RPM filenames
-KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE))
+KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
 MKSPEC     := $(srctree)/scripts/package/mkspec
 PREV       := set -e; cd ..;
 
index e1c1d5b8ca70842e426d653fa508f9ed89601f8a..ed8b6a8b4b8edef3ba39801c4d74476e60e54503 100755 (executable)
@@ -22,7 +22,7 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
 fi
 
 PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
-__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"`
+__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"`
 
 echo "Name: kernel"
 echo "Summary: The Linux Kernel"