FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-03-2009, 05:37 AM
Stefano Zacchiroli
 
Default conffile renaming and other sh snippets for maintainer scripts

On Mon, Mar 02, 2009 at 08:01:42PM -0800, Steve Langasek wrote:
> It would of course have to be in an Essential: yes package, since conffile
> renaming has to be handled in the package preinst and we wouldn't want
> conffile handling to involve lots of extra Pre-Depends. dpkg itself is the
> most likely package to carry this - wishlist bug on dpkg warranted?

Instead of dpkg itself, I would prefer a new, tiny teeny package,
meant to become a small lib of shell script snippets on which
maintainer scripts can rely: a sort of debhelper for maintainer
scripts. Of course it should better be maintained by the dpkg team,
but I guess having a separate source package can ease maintenance.

Cheers.

--
Stefano Zacchiroli -o- PhD in Computer Science PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'่ ..| . |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu เ tous ceux que j'aime
 
Old 03-03-2009, 05:47 AM
Russ Allbery
 
Default conffile renaming and other sh snippets for maintainer scripts

Stefano Zacchiroli <zack@debian.org> writes:
> On Mon, Mar 02, 2009 at 08:01:42PM -0800, Steve Langasek wrote:

>> It would of course have to be in an Essential: yes package, since
>> conffile renaming has to be handled in the package preinst and we
>> wouldn't want conffile handling to involve lots of extra Pre-Depends.
>> dpkg itself is the most likely package to carry this - wishlist bug on
>> dpkg warranted?

> Instead of dpkg itself, I would prefer a new, tiny teeny package, meant
> to become a small lib of shell script snippets on which maintainer
> scripts can rely: a sort of debhelper for maintainer scripts. Of course
> it should better be maintained by the dpkg team, but I guess having a
> separate source package can ease maintenance.

I'm not sure anyone else thinks this is a good idea except me, but I still
think there's a lot of merit in writing a custom interpreter designed
specifically for Debian maintainer scripts, with built-in functionality to
handle the top 20-50 things that we have to do. I suspect that we could
replace 90-95% of our maintainer scripts with ones written in such a
stripped down mini-language, which would then be far easier to analyze,
fix, and check for consistency. We could still use shell or Perl for the
really difficult cases when full generality is needed.

The advantage of such an interpreter over a shell library is that, for
those maintainer scripts that could use it, they *can't* do anything weird
because the language has no way of expressing it. So there's no
temptation to hack around the shell library and turn a simple expression
into one that can't be automatically verified as correct. The interpreter
can also then be responsible for the difficult work of figuring out when
to call programs in all the various edge-case error-handling cases.

(The obvious disadvantage is that a bunch of maintainer scripts really do
need shell, and the ones that could use such an interpreter are already
rather simple.)

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 11:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ฉ2007 - 2008, www.linux-archive.org