[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel-package, fix version 2 ...



On Sun, Oct 23, 2005 at 08:08:50AM +0200, Sven Luther wrote:
> On Sun, Oct 23, 2005 at 03:00:12AM +0200, Jonas Smedegaard wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > On Sat, 22 Oct 2005 23:50:10 +0200
> > Sven Luther <sven.luther@wanadoo.fr> wrote:
[...]
> > > The second issue is not really related to this plan, but we really
> > > want to debconfify the kernel-package kernel scripts, this would mean
> > > replacing all die and printing to stdout with proper debconf
> > > messages, and inputs in the same way, and maybe redesigning some. I
> > > can do this in shell, but never tried the perl solution previously.
> > 
> > Please do not bloat the postinst code! Separate it into a helper tool
> > instead!
> 
> No way, i think you are misunderstanding here. The current code does :
> 
>   print STDERR <<"EOINFOMSG";
> Using $ramdisk to build the ramdisk.
> Other suitable ramdisk generating tools : @ramdisklist.
> Full list of probed ramdisk generating tools : $ramdiskorig.
> EOINFOMSG
>   ;
> 
> And we will replace it with (shell version given) :
> 
> db_subst kernel-package/postinst_ramdisk $ramdisk
> db_subst kernel-package/postinst_ramdisklist $ramdisklist
> db_subst kernel-package/postinst_ramdiskorig $ramdiskorig
> db_input high kernel-package/postinst_ramdisk_verbose_output || true

/me looking at Debconf::Client::ConfModule

the above seems as easy as doing (untested):

use Debconf::Client::ConfModule ':all';
subst('kernel-package/postinst_ramdisk', 'key_ramdisk', $ramdisk);
...
input('high', 'kernel-package/postinst_ramdisk_verbose_output');
my @ret = go();
my $answer = get('kernel-package/postinst_ramdisk_verbose_output');
if ($answer =~ /^yes$/i) {
	...	
}

I'll look at it further, now.
-- 
mattia
:wq!



Reply to: