Bug#700350: dovecot-core: fails to upgrade from squeeze to bpo: Can't locate feature.pm in @INC

Niko Tyni ntyni at debian.org
Tue Feb 12 18:22:56 UTC 2013


On Tue, Feb 12, 2013 at 06:20:04PM +0100, gregor herrmann wrote:
> On Mon, 11 Feb 2013 23:40:38 +0100, Andreas Beckmann wrote:
> 
> > during a test with piuparts I noticed your package fails to upgrade from
> > 'squeeze'.
> > It installed fine in 'squeeze', then the upgrade to 'squeeze-backports' fails.
> 
> >   Can't locate feature.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .).
> 
> Interesting.
> feature is in perl-modules (5.10.1) or perl-base (5.14 and 5.16):

In the squeeze -> squeeze-backports upgrade context, I assume the perl
packages just stay at 5.10.1.

It looks like the postinst of dovecot-core uses perl -E, which
implicitly needs feature.pm, without depending on perl-modules.

This works in sid/wheezy because feature.pm has since moved into
perl-base, as Gregor noted.

Untested patch follows; using 'perl -lne' should also work
if you like that better.

diff --git a/debian/dovecot-core.postinst b/debian/dovecot-core.postinst
index 95a9477..3a3eb53 100644
--- a/debian/dovecot-core.postinst
+++ b/debian/dovecot-core.postinst
@@ -134,12 +134,12 @@ if [ "$1" = "configure" ]; then
       echo "and into /etc/dovecot and update the configuration"
       echo "in /etc/dovecot/conf.d/10-ssl.conf accordingly."
       echo "See /usr/share/doc/dovecot-core/NEWS.Debian.gz for details."
-        perl -i -nE "
+        perl -i -ne "
         if (/^\w*?ssl_cert/) {
-            say 'ssl_cert = <$OLD_SSL_CERT'
+            print 'ssl_cert = <$OLD_SSL_CERT' . qq(\n)
         }
         elsif (/^\w*?ssl_key/) {
-            say 'ssl_key = <$OLD_SSL_KEY'
+            print 'ssl_key = <$OLD_SSL_KEY' . qq(\n)
         } else {
             print;
         }" /etc/dovecot/conf.d/10-ssl.conf

Hope this helps,
-- 
Niko Tyni   ntyni at debian.org




More information about the Perl-maintainers mailing list