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

Re: using perl in preinst script



On Mon, 27 Dec 2010 16:53:11 +0530
Rahul Amaram <amaramrahul@users.sourceforge.net> wrote:

> As the upgrade code has to parse .plist files, writing shell script
> would be a very difficult task. So I would like to know what are my
> other options? Could I write it in perl?

$ file /var/lib/dpkg/info/*.preinst|grep -v "shell script text"

Yes preinst scripts can be in perl - the other alternative is a
compiled executable but that is only really an option if the package
itself is already Arch:any. So, your packge is left with perl if shell
isn't practical.

I don't know the package but sometimes it is only necessary to identify
that the upgrade needs to be run in the preinst and then actually
handle the workload in the postinst (when you could use python), maybe
via a dpkg trigger. What portion of the *results* of the parsing is
actually required for the configuration of calendarserver itself? It is
worth investigating whether a preinst is actually required or whether
the work can be postponed.

> Also is there any estimate date on the release of squeeze?

When the RC bugs are fixed. 

It seems unlikely that this particular package would affect the
release as the new version won't migrate into testing now anyway - the
broken preinst / Pre-Depends-not-discussed-previously-on-devel issue
only exists in unstable and that can be fixed without affecting the
release of Squeeze. (It does need to be fixed though.)

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpr2LH8sH1sS.pgp
Description: PGP signature


Reply to: