Hello,

On Sun, Jun 23, 2013 at 01:05:43PM -0400, Joey Hess wrote:
> Hannes von Haugwitz wrote:
> > +postinst_ucf() {
> > +    if [ "$1" = "configure" ]; then
> > +        ucf #UCFOPTIONS# "$2" "$3"
> > +        ucfr #PACKAGE# "$3"
> > +    fi
> > +}
> 
> I don't think any debhelper autoscripts define shell functions, and so I
> am wary of adding that here. A for loop would have the same effect.

What is wrong with shell functions? A for loop wouldn't help here, but
one could hack a while loop analogous to the dh_usrlocal script. However
I think shell functions are the cleaner approach.

> I am also somewhat doubtful of the utility of optimising the space used
> by the maintainer script snippets. How many files are being registered
> with ucf to make this matter?

The aide package currently registers 157 configuration files with ucf.

The current dh_ucf script would generate 936 postinst lines and 2198
postrm lines. My approach only generates 479 postinst lines and 486
postrm lines.

Please let me know which approach do you prefer (shell functions, while
loops or the current one).

> Does ucf scale to that many files? What if
> they all got changed, does the admin have to wade through hundreds of
> ucf prompts?

Yes, but the same would apply if the files would have been managed by
dpkg itself.

> > -B<dh_ucf> [S<I<debhelper options>>] [B<-n>]
> > +B<dh_ucf> [S<I<debhelper options>>] [B<-n>] [B<--debconf-ok>] 
> > [B<--three-way>]
> 
> It does not seem appropriate to add individual ucf options to dh_ucf.
> One way that would work better would be to take all options after -- as
> options for ucf.
> 
> I also wonder if there's any reason not to make --three-way the default,
> either in ucf itself, or in dh_ucf.

Both points make sense. I'll update the script to enable '--three-way'
by default and change the synopsis to 'dh_ucf [debhelperĀ options] [-n]
[-- params]'.

Best regards

Hannes


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to