r3638 - in trunk/kernel/source/linux-2.6/debian: bin templates

Jurij Smakov jurij-guest at costa.debian.org
Sun Jul 31 00:56:28 UTC 2005


Author: jurij-guest
Date: 2005-07-31 00:56:28 +0000 (Sun, 31 Jul 2005)
New Revision: 3638

Modified:
   trunk/kernel/source/linux-2.6/debian/bin/gencontrol
   trunk/kernel/source/linux-2.6/debian/templates/control.image.in
Log:
* The control.image.in template now supports
  arch_depends, arch_suggests and arch_recommends
  substitutions, so that we can generate these
  fields individually for each architecture.
  That should take care of 319896. It's quite
  a rewrite, so please test.
* At the moment the arch-specific depends,
  suggests and recommends are hard-coded into
  the debian/bin/gencontrol. It's not the prettiest
  solution but it works.
* Changed gencontrol to strip all lines starting
  with # from the generated files, so comments
  in templates are now allowed.


Modified: trunk/kernel/source/linux-2.6/debian/bin/gencontrol
===================================================================
--- trunk/kernel/source/linux-2.6/debian/bin/gencontrol	2005-07-31 00:08:59 UTC (rev 3637)
+++ trunk/kernel/source/linux-2.6/debian/bin/gencontrol	2005-07-31 00:56:28 UTC (rev 3638)
@@ -3,7 +3,30 @@
 # This is created by the debian/makevars target in the rules file.
 #
 . debian/makevars
+#
+# Various arch-specific substitutions to kludge around the fact
+# that we cannot have the arch-specific Depends, Suggests and 
+# Recommends. Note that currently Depends and Suggests fields 
+# for the images are guaranteed non-empty, but Recommends is 
+# only non-empty on i386, so we have to treat it slightly 
+# differently.
+#
+arch_depends_amd64='e2fsprogs (>= 1.35-7)'
+arch_depends_hppa='palo'
+arch_depends_powerpc='mkvmlinuz'
 
+arch_suggests_alpha='aboot'
+arch_suggests_amd64='lilo (>= 19.1) | grub'
+arch_suggests_i386='lilo (>= 19.1) | grub'
+arch_suggests_ia64='elilo'
+arch_suggests_m68k='vmelilo'
+arch_suggests_mips='arcboot (>= 0.3.8)'
+arch_suggests_mipsel='colo, delo'
+arch_suggests_s390='s390-tools'
+arch_suggests_sparc='silo'
+
+arch_recommends_i386='irqbalance'
+
 list_arches() {
   find debian/arch -mindepth 1 -maxdepth 1 \
     ! -name '*.svn*' -type d -printf '%f\n'
@@ -49,19 +72,30 @@
   desc=""
   [ -f "${sdir}/desc.${4}" ] && . "${sdir}/desc.${4}"
   [ -z "${longclass}" ] && longclass="${class}"
-  cat debian/templates/control.${1} |	\
-  sed -e "s#@version@#${version}#g"	\
-      -e "s#@major@#${major}#g"		\
-      -e "s#@arch@#${2}#g"		\
-      -e "s#@subarch@#${sa}#g"		\
-      -e "s#@flavour@#${4}#g"		\
-      -e "s#@class@#${class}#g"		\
-      -e "s#@longclass@#${longclass}#g"	\
-      -e "s#@ltver@#${ltver}#g"         \
-      -e "s#@srcver@#${srcver}#g"	\
-      -e "s#@lt_depends@#${lt_depends}#g"   \
-      -e "s#@lt_provides@#${lt_provides}#g" \
-      -e "s#@abiname@#${abiname}#g"
+  
+  eval "arch_depends=\${arch_depends_${2}}"
+  eval "arch_suggests=\${arch_suggests_${2}}"
+  eval "arch_recommends=\${arch_recommends_${2}}"
+  if [ -n "${arch_recommends}" ]; then
+    arch_recommends="Recommends: ${arch_recommends}"
+  fi
+
+  cat debian/templates/control.${1} |			\
+  sed -e "s#@version@#${version}#g"			\
+      -e "s#@major@#${major}#g"				\
+      -e "s#@arch@#${2}#g"				\
+      -e "s#@subarch@#${sa}#g"				\
+      -e "s#@flavour@#${4}#g"				\
+      -e "s#@class@#${class}#g"				\
+      -e "s#@longclass@#${longclass}#g"			\
+      -e "s#@ltver@#${ltver}#g"         		\
+      -e "s#@srcver@#${srcver}#g"			\
+      -e "s#@lt_depends@#${lt_depends}#g"		\
+      -e "s#@lt_provides@#${lt_provides}#g" 		\
+      -e "s#@abiname@#${abiname}#g"			\
+      -e "s#@arch_depends@#${arch_depends}#g"		\
+      -e "s#@arch_suggests@#${arch_suggests}#g"		\
+      -e "s#@arch_recommends@#${arch_recommends}#g"
    [ -z "${5}" ] || printf "${desc}\n"
 }
 
@@ -78,5 +112,5 @@
   done
 done
 sed -e '/^[[:space:]]*$/d' control.tmp | \
-sed -e 's/^Package:/\n&/g' > debian/control
+sed -e 's/^Package:/\n&/g' | grep -v '^#' > debian/control
 rm -rf control.tmp

Modified: trunk/kernel/source/linux-2.6/debian/templates/control.image.in
===================================================================
--- trunk/kernel/source/linux-2.6/debian/templates/control.image.in	2005-07-31 00:08:59 UTC (rev 3637)
+++ trunk/kernel/source/linux-2.6/debian/templates/control.image.in	2005-07-31 00:56:28 UTC (rev 3638)
@@ -1,3 +1,7 @@
+#
+# If you would like to change the arch-specific Depends, Suggests,
+# or Recommends, have a look at the debian/bin/gencontrol file.
+#
 Package: linux-image- at subarch@@version at -@abiname at -@flavour@
 Architecture: @arch@
 Section: base
@@ -3,8 +7,8 @@
 Priority: optional
 Provides: linux-image, linux-image- at major@
-Depends: initrd-tools (>= 0.1.78), coreutils | fileutils (>= 4.0), module-init-tools (>= 0.9.13), e2fsprogs (>= 1.35-7) [amd64], palo [hppa], mkvmlinuz [powerpc]
+Depends: initrd-tools (>= 0.1.78), coreutils | fileutils (>= 4.0), module-init-tools (>= 0.9.13), @arch_depends@
 Conflicts: hotplug (<< 0.0.20040105-1)
-Suggests: aboot [alpha], lilo (>= 19.1) | grub [amd64 i386], elilo [ia64], vmelilo [m68k], arcboot (>= 0.3.8) [mips], colo [mipsel], delo [mipsel], s390-tools [s390], silo [sparc], fdutils, linux-doc- at version@ | linux-source- at version@
-Recommends: irqbalance [i386]
+Suggests: fdutils, linux-doc- at version@ | linux-source- at version@, @arch_suggests@
+ at arch_recommends@
 Description: Linux kernel @version@ image on @class@ machines
  This package provides the binary image and pre-built loadable modules for




More information about the Kernel-svn-changes mailing list