Hello Martin,

Am Dienstag, den 20.12.2011, 18:14 +0100 schrieb Martin Pitt:
> Hello Jens,
> 
> Jens Lody [2011-11-21 10:13 +0100]:
> > diff -Nru postgresql-common-125.orig/debian/postgresql-common.postinst 
> > postgresql-common-125/debian/postgresql-common.postinst
> > --- postgresql-common-125.orig/debian/postgresql-common.postinst    
> > 2011-08-08 10:21:40.000000000 +0200
> > +++ postgresql-common-125/debian/postgresql-common.postinst 2011-11-21 
> > 08:48:42.000000000 +0100
> > @@ -6,6 +6,24 @@
> >  
> >  SSL_ROOT=/etc/postgresql-common/root.crt
> >  
> > +fix_logrotate()
> > +{
> > +    # logrotate 3.8+ requires an additional "su" command which is not
> > +    # backportable, see #640493
> > +    lrv=`dpkg -s logrotate 2> /dev/null | grep ^Version | cut -f2- -d' '`
> > +    if [ "x$lrv" = x ] ; then \
> > +        lrv=0; \
> > +    fi
> > +
> > +    sed -i '/su root root/d' /etc/logrotate.d/postgresql-common; \
> > +    
> > +    if dpkg --compare-versions $lrv ge 3.8; then \
> > +       echo "Fixing logrotate configuration for logrotate >= 3.8..."; \
> > +       sed -i '/^}/ i\       su root root' 
> > /etc/logrotate.d/postgresql-common; \
> 
> That's precisely what we cannot do, as
> /etc/logrotate.d/postgresql-common is a dpkg managed conffile.
> 
> But I guess this is all moot now that logrotate 3.8 is in testing as
> well.
> 
> Martin

I know, that it works now.

But I still do not understand, why it can not be done this way.

I also added a trigger on "/usr/sbin/logrotate", so that the postinst
script will be called (with the paramezer "triggered"), if dpkg changes
this file.

I thought that this is exactly (one of) the purpose(s) triggers have
been implemented for.

Or do I misunderstand something ?

Jens

-- 

Jens Lody

Code::Blocks core developer
http://www.codeblocks.org/

(Un-)official debian-repository for Code::Blocks:
http://apt.jenslody.de/


      |\      _,,,---,,_
      /,`.-'`'    -.  ;-;;,_
    <|,4-  ) )-,_..;\ (  `'-'
      '---''(_/--'  `-'\_)

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to