From e39e268dbd024c35c68f1948748658cd164f0d94 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 27 Oct 2009 16:35:16 +0000 Subject: [PATCH] Move all description related config options into its own section. * debian/bin/gencontrol.py: Handle description parts. * debian/config: Update. * debian/lib/python/debian_linux/config.py: Recognize new section. * debian/lib/python/debian_linux/gencontrol.py: Remove old code. svn path=/dists/trunk/linux-2.6/; revision=14469 --- debian/bin/gencontrol.py | 11 ++++-- debian/config/alpha/defines | 18 +++++----- debian/config/alpha/vserver/defines | 4 +-- debian/config/amd64/defines | 8 ++--- debian/config/armel/defines | 38 ++++++++++---------- debian/config/defines | 6 ++-- debian/config/featureset-openvz/defines | 9 ++--- debian/config/featureset-vserver/defines | 8 +++-- debian/config/featureset-xen/defines | 8 ++--- debian/config/hppa/defines | 16 +++++---- debian/config/i386/defines | 28 +++++++-------- debian/config/i386/openvz/defines | 4 ++- debian/config/i386/xen/defines | 6 ++-- debian/config/ia64/defines | 8 ++--- debian/config/m68k/defines | 36 +++++++++---------- debian/config/mips/defines | 36 +++++++++---------- debian/config/mipsel/defines | 30 ++++++++-------- debian/config/powerpc/defines | 12 +++---- debian/config/s390/defines | 36 ++++++++++--------- debian/config/sparc/defines | 12 +++---- debian/lib/python/debian_linux/config.py | 4 ++- debian/lib/python/debian_linux/gencontrol.py | 3 -- 22 files changed, 179 insertions(+), 162 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 6a60c2898..b3db6022d 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -73,8 +73,12 @@ class Gencontrol(Base): def do_flavour_setup(self, vars, makeflags, arch, featureset, flavour, extra): config_base = self.config.merge('base', arch, featureset, flavour) + config_description = self.config.merge('description', arch, featureset, flavour) config_image = self.config.merge('image', arch, featureset, flavour) + vars['class'] = config_description['hardware'] + vars['longclass'] = config_description.get('hardware-long') or vars['class'] + vars['localversion-image'] = vars['localversion'] override_localversion = config_image.get('override-localversion', None) if override_localversion is not None: @@ -106,6 +110,7 @@ class Gencontrol(Base): headers = self.templates["control.headers"] config_entry_base = self.config.merge('base', arch, featureset, flavour) + config_entry_description = self.config.merge('description', arch, featureset, flavour) config_entry_image = self.config.merge('image', arch, featureset, flavour) config_entry_relations = self.config.merge('relations', arch, featureset, flavour) @@ -136,12 +141,12 @@ class Gencontrol(Base): image_fields['Conflicts'].append(PackageRelationGroup([a])) image_fields['Depends'].append(l_depends) - desc_parts = self.config.get_merge('image', arch, featureset, flavour, 'desc-parts') + desc_parts = self.config.get_merge('description', arch, featureset, flavour, 'parts') if desc_parts: desc = image_fields['Description'] for part in desc_parts[::-1]: - desc.append(config_entry_image['desc-long-part-' + part]) - desc.append_short(config_entry_image.get('desc-short-part-' + part, '')) + desc.append(config_entry_description['part-long-' + part]) + desc.append_short(config_entry_description.get('part-short-' + part, '')) packages_dummy = [] packages_own = [] diff --git a/debian/config/alpha/defines b/debian/config/alpha/defines index aaf51f499..f6357a359 100644 --- a/debian/config/alpha/defines +++ b/debian/config/alpha/defines @@ -7,14 +7,14 @@ kernel-arch: alpha [image] suggests: aboot, fdutils -[alpha-generic_base] -class: Alpha -longclass: DEC Alpha systems with extended kernel start address (Wildfire, Titan, Marvel) +[alpha-generic_description] +hardware: Alpha +hardware-long: DEC Alpha systems with extended kernel start address (Wildfire, Titan, Marvel) -[alpha-smp_base] -class: Alpha SMP -longclass: DEC Alpha SMP systems with extended kernel start address (Wildfire, Titan, Marvel) +[alpha-smp_description] +hardware: Alpha SMP +hardware-long: DEC Alpha SMP systems with extended kernel start address (Wildfire, Titan, Marvel) -[alpha-legacy_base] -class: Alpha Legacy -longclass: DEC Alpha systems with legacy kernel start address +[alpha-legacy_description] +hardware: Alpha Legacy +hardware-long: DEC Alpha systems with legacy kernel start address diff --git a/debian/config/alpha/vserver/defines b/debian/config/alpha/vserver/defines index 2d358a44b..aa754a20b 100644 --- a/debian/config/alpha/vserver/defines +++ b/debian/config/alpha/vserver/defines @@ -1,8 +1,8 @@ [base] flavours: alpha -[alpha_base] -class: Alpha +[alpha_description] +hardware: Alpha [alpha_image] configs: alpha/config.alpha-generic diff --git a/debian/config/amd64/defines b/debian/config/amd64/defines index ff2cd4dec..1e6ad0992 100644 --- a/debian/config/amd64/defines +++ b/debian/config/amd64/defines @@ -13,12 +13,12 @@ configs: amd64/config suggests: grub | lilo -[amd64_base] -class: 64-bit PCs -longclass: PCs with AMD64 or Intel 64 processors +[amd64_description] +hardware: 64-bit PCs +hardware-long: PCs with AMD64 or Intel 64 processors +parts: xen [amd64_image] configs: kernelarch-x86/config-arch-64 amd64/config.amd64 -desc-parts: xen diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 3069fc856..804b79f28 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -10,48 +10,48 @@ kernel-arch: arm [image] suggests: fdutils -[iop32x_base] -class: IOP32x -longclass: IOP32x based systems (Thecus N2100, etc) - [iop32x_build] image-file: arch/arm/boot/zImage +[iop32x_description] +hardware: IOP32x +hardware-long: IOP32x based systems (Thecus N2100, etc) + [iop32x_image] # Thecus N2100: 1441792 - 8 = 1441784 check-size: 1441784 -[ixp4xx_base] -class: IXP4xx -longclass: IXP4xx based systems (Linksys NSLU2, etc) - [ixp4xx_build] image-file: arch/arm/boot/zImage +[ixp4xx_description] +hardware: IXP4xx +hardware-long: IXP4xx based systems (Linksys NSLU2, etc) + [ixp4xx_image] # Linksys NSLU2: 1441792 - 16 - 16 = 1441760 check-size: 1441760 -[kirkwood_base] -class: Marvell Kirkwood -longclass: Marvell Kirkwood based systems (SheevaPlug, QNAP TS-119/TS-219, etc) - [kirkwood_build] image-file: arch/arm/boot/zImage +[kirkwood_description] +hardware: Marvell Kirkwood +hardware-long: Marvell Kirkwood based systems (SheevaPlug, QNAP TS-119/TS-219, etc) + [kirkwood_image] recommends: uboot-mkimage # SheevaPlug: 4194304 - 8 - 64 = 4194232 # QNAP TS-119/TS-219: 2097152 - 8 - 64 = 2097080 check-size: 2097080 -[orion5x_base] -class: Marvell Orion -longclass: Marvell Orion 5181, 5182 and 5281 based systems (QNAP TS-109/TS-209, etc) - [orion5x_build] image-file: arch/arm/boot/zImage +[orion5x_description] +hardware: Marvell Orion +hardware-long: Marvell Orion 5181, 5182 and 5281 based systems (QNAP TS-109/TS-209, etc) + [orion5x_image] recommends: uboot-mkimage # D-Link DNS-323: 1572864 - 8 - 64 = 1572792 @@ -59,6 +59,6 @@ recommends: uboot-mkimage # QNAP TS-109/TS-209 & TS-409: 2097152 - 8 - 64 = 2097080 check-size: 1572792 -[versatile_base] -class: Versatile -longclass: Versatile systems (PB, AB, Qemu) +[versatile_description] +hardware: Versatile +hardware-long: Versatile systems (PB, AB, Qemu) diff --git a/debian/config/defines b/debian/config/defines index 412b03e2e..1eb0c0888 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -31,9 +31,11 @@ enabled: false [featureset-xen_base] enabled: false -[image] -desc-long-part-xen: This kernel also runs on a Xen hypervisor. +[description] +part-long-xen: This kernel also runs on a Xen hypervisor. It supports only unprivileged (domU) operation. + +[image] initramfs-generators: initramfs-tools initramfs-fallback type: plain diff --git a/debian/config/featureset-openvz/defines b/debian/config/featureset-openvz/defines index 487133f7f..061c4f0c8 100644 --- a/debian/config/featureset-openvz/defines +++ b/debian/config/featureset-openvz/defines @@ -1,6 +1,7 @@ +[description] +part-long-openvz: This kernel includes support for OpenVZ container-based virtualization. +part-short-openvz: OpenVZ support +parts: openvz + [image] depends: vzctl -desc-long-part-openvz: This kernel includes support for OpenVZ container-based virtualization. -desc-parts: openvz -desc-short-part-openvz: OpenVZ support - diff --git a/debian/config/featureset-vserver/defines b/debian/config/featureset-vserver/defines index 08d396600..601b9681d 100644 --- a/debian/config/featureset-vserver/defines +++ b/debian/config/featureset-vserver/defines @@ -1,5 +1,7 @@ +[description] +part-long-vserver: This kernel includes support for Linux-VServer virtualization. +part-short-vserver: Linux-VServer support +parts: vserver + [image] -desc-long-part-vserver: This kernel includes support for Linux-VServer virtualization. -desc-parts: vserver -desc-short-part-vserver: Linux-VServer support recommends: util-vserver diff --git a/debian/config/featureset-xen/defines b/debian/config/featureset-xen/defines index 11424550c..04c447f0d 100644 --- a/debian/config/featureset-xen/defines +++ b/debian/config/featureset-xen/defines @@ -1,5 +1,5 @@ -[image] -desc-long-part-xenold: This kernel only runs on a Xen hypervisor. +[description] +part-long-xenold: This kernel only runs on a Xen hypervisor. It supports both privileged (dom0) and unprivileged (domU) operation. -desc-parts: xenold -desc-short-part-xenold: oldstyle Xen support +part-short-xenold: oldstyle Xen support +parts: xenold diff --git a/debian/config/hppa/defines b/debian/config/hppa/defines index deac30069..e0a8e5aae 100644 --- a/debian/config/hppa/defines +++ b/debian/config/hppa/defines @@ -9,22 +9,26 @@ kernel-arch: parisc [image] suggests: palo -[parisc_base] -class: 32-bit PA-RISC +[parisc_description] +hardware: 32-bit PA-RISC -[parisc-smp_base] -class: multiprocessor 32-bit PA-RISC +[parisc-smp_description] +hardware: multiprocessor 32-bit PA-RISC [parisc64_base] cflags: -fno-cse-follow-jumps -class: 64-bit PA-RISC override-host-type: hppa64-linux-gnu +[parisc64_description] +hardware: 64-bit PA-RISC + [parisc64-smp_base] cflags: -fno-cse-follow-jumps -class: multiprocessor 64-bit PA-RISC override-host-type: hppa64-linux-gnu +[parisc64-smp_description] +hardware: multiprocessor 64-bit PA-RISC + [relations] gcc-4.3: gcc-4.3, binutils-hppa64, gcc-4.3-hppa64 diff --git a/debian/config/i386/defines b/debian/config/i386/defines index dc418576f..5b09c6123 100644 --- a/debian/config/i386/defines +++ b/debian/config/i386/defines @@ -16,42 +16,42 @@ configs: i386/config suggests: grub | lilo -[486_base] -class: old PCs -longclass: PCs with a 486, Pentium or compatible processor +[486_description] +hardware: old PCs +hardware-long: PCs with a 486, Pentium or compatible processor [486_image] configs: kernelarch-x86/config-arch-32 -[686_base] -class: modern PCs -longclass: PCs with Intel Pentium Pro/II/III/4/4M/D/M, Xeon, Celeron, Core or Atom; AMD K6, Athlon (K7), Duron, Opteron, Sempron, Turion or Phenom; Transmeta Efficeon; VIA C3 "Nehemiah" or C7 processors +[686_description] +hardware: modern PCs +hardware-long: PCs with Intel Pentium Pro/II/III/4/4M/D/M, Xeon, Celeron, Core or Atom; AMD K6, Athlon (K7), Duron, Opteron, Sempron, Turion or Phenom; Transmeta Efficeon; VIA C3 "Nehemiah" or C7 processors [686_image] configs: kernelarch-x86/config-arch-32 recommends: libc6-i686 -[686-bigmem_base] -class: PCs with 4GB+ RAM -longclass: PCs with 4-64GB RAM, using PAE (Physical Address Extension) +[686-bigmem_description] +hardware: PCs with 4GB+ RAM +hardware-long: PCs with 4-64GB RAM, using PAE (Physical Address Extension) +parts: xen [686-bigmem_image] configs: kernelarch-x86/config-arch-32 -desc-parts: xen recommends: libc6-i686 -[amd64_base] -class: 64-bit PCs -longclass: PCs with AMD64 or Intel 64 processors +[amd64_description] +hardware: 64-bit PCs +hardware-long: PCs with AMD64 or Intel 64 processors +parts: xen [amd64_image] configs: kernelarch-x86/config-arch-64 amd64/config amd64/config.amd64 -desc-parts: xen recommends: libc6-i686 diff --git a/debian/config/i386/openvz/defines b/debian/config/i386/openvz/defines index fc159f646..7101e3258 100644 --- a/debian/config/i386/openvz/defines +++ b/debian/config/i386/openvz/defines @@ -2,8 +2,10 @@ flavours: 686 +[686_description] +parts: xen + [686_image] configs: i386/config.686-bigmem -desc-parts: xen diff --git a/debian/config/i386/xen/defines b/debian/config/i386/xen/defines index 090486877..d7101bb21 100644 --- a/debian/config/i386/xen/defines +++ b/debian/config/i386/xen/defines @@ -12,9 +12,9 @@ flavours: i386 amd64 -[686_base] -class: modern PCs -longclass: PCs with Intel Pentium Pro/II/III/4/4M/D/M, Xeon, Celeron, Core, Atom; AMD K6, Athlon, Duron, Opteron, Sempron, Turion, Phenom; Transmeta Efficeon; VIA C3 "Nehemiah" or C7 processors +[686_description] +hardware: modern PCs +hardware-long: PCs with Intel Pentium Pro/II/III/4/4M/D/M, Xeon, Celeron, Core, Atom; AMD K6, Athlon, Duron, Opteron, Sempron, Turion, Phenom; Transmeta Efficeon; VIA C3 "Nehemiah" or C7 processors [686_image] configs: diff --git a/debian/config/ia64/defines b/debian/config/ia64/defines index 217e2647f..6bf211e8d 100644 --- a/debian/config/ia64/defines +++ b/debian/config/ia64/defines @@ -9,8 +9,8 @@ kernel-arch: ia64 [image] suggests: elilo, fdutils -[itanium_base] -class: Itanium +[itanium_description] +hardware: Itanium -[mckinley_base] -class: Itanium II +[mckinley_description] +hardware: Itanium II diff --git a/debian/config/m68k/defines b/debian/config/m68k/defines index fa4d477cd..55a520d89 100644 --- a/debian/config/m68k/defines +++ b/debian/config/m68k/defines @@ -16,30 +16,30 @@ kernel-arch: m68k initramfs: false suggests: vmelilo, fdutils -[amiga_base] -class: Amiga +[amiga_description] +hardware: Amiga -[atari_base] -class: Atari +[atari_description] +hardware: Atari -[bvme6000_base] -class: BVM BVME4000 and BVME6000 +[bvme6000_description] +hardware: BVM BVME4000 and BVME6000 -[hp_base] -class: HP +[hp_description] +hardware: HP -[mac_base] -class: Macintosh +[mac_description] +hardware: Macintosh -[mvme147_base] -class: Motorola MVME147 +[mvme147_description] +hardware: Motorola MVME147 -[mvme16x_base] -class: Motorola MVME162/6/7, MVME172/7 +[mvme16x_description] +hardware: Motorola MVME162/6/7, MVME172/7 -[q40_base] -class: Q40 and Q60 +[q40_description] +hardware: Q40 and Q60 -[sun3_base] -class: sun3 +[sun3_description] +hardware: sun3 diff --git a/debian/config/mips/defines b/debian/config/mips/defines index a2c7962b9..194a50119 100644 --- a/debian/config/mips/defines +++ b/debian/config/mips/defines @@ -11,26 +11,26 @@ kernel-arch: mips [image] initramfs: false -[r4k-ip22_base] -class: SGI IP22 -longclass: SGI IP22 systems (Indy, Indigo2) +[r4k-ip22_description] +hardware: SGI IP22 +hardware-long: SGI IP22 systems (Indy, Indigo2) -[r5k-ip32_base] -class: SGI IP32 -longclass: SGI IP32 systems (O2) +[r5k-ip32_description] +hardware: SGI IP32 +hardware-long: SGI IP32 systems (O2) -[sb1-bcm91250a_base] -class: BCM91250A -longclass: Broadcom BCM91250A systems (aka SWARM) +[sb1-bcm91250a_description] +hardware: BCM91250A +hardware-long: Broadcom BCM91250A systems (aka SWARM) -[sb1a-bcm91480b_base] -class: BCM91480B -longclass: Broadcom BCM91480B systems (aka BigSur) +[sb1a-bcm91480b_description] +hardware: BCM91480B +hardware-long: Broadcom BCM91480B systems (aka BigSur) -[4kc-malta_base] -class: MIPS Malta -longclass: MIPS Malta boards +[4kc-malta_description] +hardware: MIPS Malta +hardware-long: MIPS Malta boards -[5kc-malta_base] -class: MIPS Malta (64-bit) -longclass: MIPS Malta boards (64-bit) +[5kc-malta_description] +hardware: MIPS Malta (64-bit) +hardware-long: MIPS Malta boards (64-bit) diff --git a/debian/config/mipsel/defines b/debian/config/mipsel/defines index 99ba0c23a..45876c033 100644 --- a/debian/config/mipsel/defines +++ b/debian/config/mipsel/defines @@ -10,22 +10,22 @@ kernel-arch: mips [image] initramfs: false -[r5k-cobalt_base] -class: Cobalt -longclass: Cobalt systems (Qube, RaQ, Qube2, RaQ2) +[r5k-cobalt_description] +hardware: Cobalt +hardware-long: Cobalt systems (Qube, RaQ, Qube2, RaQ2) -[sb1-bcm91250a_base] -class: BCM91250A -longclass: Broadcom BCM91250A systems (aka SWARM) +[sb1-bcm91250a_description] +hardware: BCM91250A +hardware-long: Broadcom BCM91250A systems (aka SWARM) -[sb1a-bcm91480b_base] -class: BCM91480B -longclass: Broadcom BCM91480B systems (aka BigSur) +[sb1a-bcm91480b_description] +hardware: BCM91480B +hardware-long: Broadcom BCM91480B systems (aka BigSur) -[4kc-malta_base] -class: MIPS Malta -longclass: MIPS Malta boards +[4kc-malta_description] +hardware: MIPS Malta +hardware-long: MIPS Malta boards -[5kc-malta_base] -class: MIPS Malta (64-bit) -longclass: MIPS Malta boards (64-bit) +[5kc-malta_description] +hardware: MIPS Malta (64-bit) +hardware-long: MIPS Malta boards (64-bit) diff --git a/debian/config/powerpc/defines b/debian/config/powerpc/defines index 26611238e..103229c6e 100644 --- a/debian/config/powerpc/defines +++ b/debian/config/powerpc/defines @@ -10,14 +10,14 @@ kernel-arch: powerpc [image] suggests: mkvmlinuz -[powerpc_base] -class: uniprocessor 32-bit PowerPC +[powerpc_description] +hardware: uniprocessor 32-bit PowerPC -[powerpc-smp_base] -class: multiprocessor 32-bit PowerPC +[powerpc-smp_description] +hardware: multiprocessor 32-bit PowerPC [powerpc-smp_image] configs: powerpc/config.powerpc powerpc/config.powerpc-smp -[powerpc64_base] -class: 64-bit PowerPC +[powerpc64_description] +hardware: 64-bit PowerPC diff --git a/debian/config/s390/defines b/debian/config/s390/defines index b56e757c3..8f583996a 100644 --- a/debian/config/s390/defines +++ b/debian/config/s390/defines @@ -6,41 +6,43 @@ flavours: s390x-tape kernel-arch: s390 +[description] +part-long-reader: This kernel has support to IPL (boot) from a VM reader or DASD device. +part-long-tape: This kernel has support to IPL (boot) from a tape. +part-short-tape: IPL from tape + [image] -desc-long-part-reader: This kernel has support to IPL (boot) from a VM reader or DASD device. -desc-long-part-tape: This kernel has support to IPL (boot) from a tape. -desc-short-part-tape: IPL from tape suggests: s390-tools -[s390_base] -class: IBM S/390 - -[s390_image] -desc-parts: reader +[s390_description] +hardware: IBM S/390 +parts: reader [s390-tape_base] -class: IBM S/390 modules: false +[s390-tape_description] +hardware: IBM S/390 +parts: tape + [s390-tape_image] initramfs: false -desc-parts: tape override-localversion: s390 type: plain-s390-tape -[s390x_base] -class: IBM zSeries - -[s390x_image] -desc-parts: reader +[s390x_description] +hardware: IBM zSeries +parts: reader [s390x-tape_base] -class: IBM zSeries modules: false +[s390x-tape_description] +hardware: IBM zSeries +parts: tape + [s390x-tape_image] initramfs: false -desc-parts: tape override-localversion: s390x type: plain-s390-tape diff --git a/debian/config/sparc/defines b/debian/config/sparc/defines index c3a44cb5f..b90fd6c81 100644 --- a/debian/config/sparc/defines +++ b/debian/config/sparc/defines @@ -9,15 +9,15 @@ kernel-arch: sparc [image] suggests: silo, fdutils -[sparc32_base] -class: uniprocessor sparc32 (sun4m) +[sparc32_description] +hardware: uniprocessor sparc32 (sun4m) [sparc32_image] image-postproc: sparc32-image-postproc -[sparc64_base] -class: uniprocessor 64-bit UltraSPARC +[sparc64_description] +hardware: uniprocessor 64-bit UltraSPARC -[sparc64-smp_base] -class: multiprocessor 64-bit UltraSPARC +[sparc64-smp_description] +hardware: multiprocessor 64-bit UltraSPARC diff --git a/debian/lib/python/debian_linux/config.py b/debian/lib/python/debian_linux/config.py index e2561906e..478c310db 100644 --- a/debian/lib/python/debian_linux/config.py +++ b/debian/lib/python/debian_linux/config.py @@ -113,9 +113,11 @@ class ConfigCoreHierarchy(ConfigCore): 'modules': SchemaItemBoolean(), }, 'build': {}, + 'description': { + 'parts': SchemaItemList(), + }, 'image': { 'configs': SchemaItemList(), - 'desc-parts': SchemaItemList(), 'initramfs': SchemaItemBoolean(), 'initramfs-generators': SchemaItemList(), }, diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py index 60dfb4b27..6a85753d5 100644 --- a/debian/lib/python/debian_linux/gencontrol.py +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -207,9 +207,6 @@ class Gencontrol(object): def do_flavour(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra): config_base = self.config.merge('base', arch, featureset, flavour) - vars['class'] = config_base['class'] - vars['longclass'] = config_base.get('longclass') or vars['class'] - vars['localversion'] += '-' + flavour self.do_flavour_setup(vars, makeflags, arch, featureset, flavour, extra)