Package: kernel-package Version: 8.119 Severity: important
Something really strange showed up while i was experimenting with the kernel-package script hooks. It works fine for postinst/postrm : my $version = "2.6.10-power4"; my $link_in_boot = ""; # Should be empty, mostly my $no_symlink = ""; # Should be empty, mostly my $reverse_symlink = ""; # Should be empty, mostly my $do_symlink = "Yes"; # target machine defined my $do_boot_enable = "Yes"; # target machine defined my $do_bootfloppy = "Yes"; # target machine defined my $do_bootloader = "Yes"; # target machine defined my $move_image = ''; # target machine defined my $kimage = "vmlinux"; # Should be empty, mostly my $loader = "quik"; # lilo, silo, quik, palo, vmelilo, nettrom, arcboot or delo my $image_dir = "/boot"; # where the image is located my $clobber_modules = ''; # target machine defined my $relative_links = ""; # target machine defined my $initrd = "Yes"; # initrd kernel my $mkimage = ""; # command to generate the initrd image my $do_initrd = ''; # Normally we do not my $warn_initrd = 'YES'; # Normally we do my $use_hard_links = ''; # hardlinks do not work across fs boundaries my $postinst_hook = ''; #Normally we do not my $postrm_hook = ''; #Normally we do not my $preinst_hook = ''; #Normally we do not my $prerm_hook = ''; #Normally we do not my $minimal_swap = ''; # Do not swap symlinks my $ignore_depmod_err = ''; # normally we do not my $relink_src_link = 'YES'; # There is no harm in checking the link my $relink_build_link = 'YES'; # There is no harm in checking the link my $force_build_link = ''; # There is no harm in checking the link my $official_image = "YES"; # only true for official images my $arch = "powerpc"; # should be same as dpkg --print-installation-architecture But fails on preinst/prerm : # Predefined values: my $version = "2.6.10-power4"; my $link_in_boot = "=B"; # Should be empty, mostly my $no_symlink = "=S"; # Should be empty, mostly my $reverse_symlink = "=R"; # Should be empty, mostly my $do_symlinks = "Yes"; # target machine defined my $do_boot_enable = "Yes"; # target machine defined my $do_bootfloppy = "Yes"; # target machine defined my $do_bootloader = "Yes"; # target machine defined my $move_image = ''; # target machine defined my $kimage = "=K"; # Should be empty, mostly my $loader = "quik"; # lilo, silo, quik, palo, vmelilo, or nettrom my $image_dir = "=D"; # where the image is located my $clobber_modules = ''; # target machine defined my $mkimage = ""; # command to generate the initrd image my $initrd = "=I"; # initrd kernel my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries my $postinst_hook = ''; #Normally we do not my $postrm_hook = ''; #Normally we do not my $preinst_hook = ''; #Normally we do not my $prerm_hook = ''; #Normally we do not my $minimal_swap = ''; # Do not swap symlinks my $ignore_depmod_err = ''; # normally we do not my $relink_build_link = 'YES'; # There is no harm in checking the link my $force_build_link = ''; # There is no harm in checking the link my $official_image = "YES"; # only true for official images Since i wanted to use the $1/$2 provided option to the prerm script, which resulted in a /=D/vmlinux-2.6.10-power4 path, it obviously failed. After looking at : /usr/share/kernel-package/rules, it is obvious why this happens, since preinst/prerm only get a subset of the = variables substituted. I am not sure if this is a mistake or intentional though. The current kernel-package/rules code is : sed -e 's/=V/$(version)/g' -e 's/=B/$(link_in_boot)/g' \ -e 's/=S/$(no_symlink)/g' -e 's/=R/$(reverse_symlink)/g' \ -e 's/=K/$(kimage)/g' -e 's/=L/$(loader)/g' \ -e 's/=I/$(INITRD)/g' -e 's,=D,$(IMAGEDIR),g' \ -e '[EMAIL PROTECTED]@$(MKIMAGE)@g' -e 's/=OF/$(AM_OFFICIAL)/g' \ -e '[EMAIL PROTECTED]@$(DEB_HOST_ARCH)@g' \ -e 's/=ST/$(INT_STEM)/g' \ $(DEBDIR)/image.postinst > $(IMAGE_TOP)/DEBIAN/postinst chmod 755 $(IMAGE_TOP)/DEBIAN/postinst sed -e 's/=V/$(version)/g' -e 's/=B/$(link_in_boot)/g' \ -e 's/=S/$(no_symlink)/g' -e 's/=R/$(reverse_symlink)/g' \ -e 's/=K/$(kimage)/g' -e 's/=L/$(loader)/g' \ -e 's/=I/$(INITRD)/g' -e 's,=D,$(IMAGEDIR),g' \ -e '[EMAIL PROTECTED]@$(MKIMAGE)@g' -e 's/=OF/$(AM_OFFICIAL)/g' \ $(DEBDIR)/image.postrm > $(IMAGE_TOP)/DEBIAN/postrm chmod 755 $(IMAGE_TOP)/DEBIAN/postrm sed -e 's/=V/$(version)/g' -e 's/=L/$(loader)/g' \ -e 's/=I/$(INITRD)/g' -e 's/=OF/$(AM_OFFICIAL)/g' \ -e '[EMAIL PROTECTED]@$(MKIMAGE)@g' -e '[EMAIL PROTECTED]@$(DEB_HOST_ARCH)@g' \ -e 's/=ST/$(INT_STEM)/g' \ $(DEBDIR)/image.preinst > $(IMAGE_TOP)/DEBIAN/preinst chmod 755 $(IMAGE_TOP)/DEBIAN/preinst sed -e 's/=V/$(version)/g' -e 's/=L/$(loader)/g' \ -e '[EMAIL PROTECTED]@$(MKIMAGE)@g' -e 's/=OF/$(AM_OFFICIAL)/g' \ -e 's/=ST/$(INT_STEM)/g' \ $(DEBDIR)/image.prerm > $(IMAGE_TOP)/DEBIAN/prerm chmod 755 $(IMAGE_TOP)/DEBIAN/prerm So, if the current behavior is indeed wanted, i would greatly appreciate an explanation of it, and a recomended workaround to my problem (well, i could simply use postrm probably). And thanks again for your 8.120 upload. Friendly, Sven Luther -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.8-powerpc Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages kernel-package depends on: ii dpkg 1.10.26 Package maintenance system for Deb ii dpkg-dev 1.10.26 Package building tools for Debian ii gcc [c-compiler] 4:3.3.5-1 The GNU C compiler ii gcc-2.95 [c-compiler] 1:2.95.4-22 The GNU C compiler ii gcc-3.3 [c-compiler] 1:3.3.5-8 The GNU C compiler ii make 3.80-9 The GNU version of the "make" util ii perl 5.8.4-6 Larry Wall's Practical Extraction -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]