Bug#692948: preinst which fixes the issue

2013-03-18 Thread Sebastian Ramacher
Hi Damyan,

On 2013-03-10 20:45:28, Damyan Ivanov wrote:
 -=| Sebastian Ramacher, 10.03.2013 17:42:49 +0100 |=-
   Thanks. I have pushed a fix[1] in Git, but haven't tagged the 
   bugreport accordingly. Sorry about that.
   
[1] 
   http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=commitdiff;h=4b23b85
  
  I checked if the version in the git repo fixes the issue, but sadly it
  doesn't for the Multi-Arch: same packages. migrateDocSymlink computes
  the wrong /usr/share/doc location for these packages. For libfbclient2
  PKG is libfbclient2:arch, so the postinst script checks
  /usr/share/doc/libfbclient2:arch instead of /usr/share/doc/libfbclient2.
  Please see the attached output produced with DEBIAN_FIREBIRD_DEBUG set.
  …
  + migrateDocSymlink
  + basename /var/lib/dpkg/info/libfbclient2:amd64.postinst
  + local PKG=libfbclient2:amd64.postinst
  + PKG=libfbclient2:amd64
  + local TARGET=firebird2.5-common-doc
  + local D=/usr/share/doc/libfbclient2:amd64
  + [ ! -L /usr/share/doc/libfbclient2:amd64 -a -d 
  /usr/share/doc/libfbclient2:amd64 ]
 
 Excellent catch!
 
 This seems to be a defect in the code which determines the package 
 name from the output of 'basename'. Perhaps it wouldn't be too hard to 
 strip optional :arch from the end, for example via some sed script.
 
 Unfortunately I am not sure about when I'd be able to try to fix this, 
 so if you feel like it, please go ahead. Thanks!

There is DPKG_MAINTSCRIPT_PACKAGE since dpkg 1.15.7. That should give
you the package name. Otherwise adding PKG=${PKG%:*} after removing
.postinst might be enough.

Regards
-- 
Sebastian Ramacher


signature.asc
Description: Digital signature


Bug#692948: preinst which fixes the issue

2013-03-10 Thread Sebastian Ramacher
Hi Damyan,

On 2012-11-24 15:02:59, Damyan Ivanov wrote:
 Control: tag -1 pending
 
 -=| Julian Taylor, 23.11.2012 21:20:47 +0100 |=-
  tags 692948 + patch
  thanks
  
  attached preinst should solve the issue
 
 Thanks. I have pushed a fix[1] in Git, but haven't tagged the 
 bugreport accordingly. Sorry about that.
 
  [1] 
 http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=commitdiff;h=4b23b85

I checked if the version in the git repo fixes the issue, but sadly it
doesn't for the Multi-Arch: same packages. migrateDocSymlink computes
the wrong /usr/share/doc location for these packages. For libfbclient2
PKG is libfbclient2:arch, so the postinst script checks
/usr/share/doc/libfbclient2:arch instead of /usr/share/doc/libfbclient2.
Please see the attached output produced with DEBIAN_FIREBIRD_DEBUG set.

Regards
-- 
Sebastian Ramacher
+ FB_VER=2.5
+ FB_FLAVOUR=classic
+ . /usr/share/firebird2.5-common/functions.sh
+ [ -z 2.5 ]
+ [ -z classic ]
+ export FB_VER
+ echo 2.5
+ sed -e s/\.//g
+ FB_VER_no_dots=25
+ FB=/usr/lib/firebird/2.5
+ VAR=/var/lib/firebird/2.5
+ ETC=/etc/firebird/2.5
+ LOG=/var/log/firebird2.5.log
+ RUN=/var/run/firebird/2.5
+ DEFAULT=/etc/default/firebird2.5
+ DBAPasswordFile=/etc/firebird/2.5/SYSDBA.password
+ migrateDocSymlink
+ basename /var/lib/dpkg/info/libfbclient2:amd64.postinst
+ local PKG=libfbclient2:amd64.postinst
+ PKG=libfbclient2:amd64
+ local TARGET=firebird2.5-common-doc
+ local D=/usr/share/doc/libfbclient2:amd64
+ [ ! -L /usr/share/doc/libfbclient2:amd64 -a -d 
/usr/share/doc/libfbclient2:amd64 ]
+ [ configure = configure ]
+ ldconfig
+ exit 0


signature.asc
Description: Digital signature


Bug#692948: preinst which fixes the issue

2013-03-10 Thread Damyan Ivanov
-=| Sebastian Ramacher, 10.03.2013 17:42:49 +0100 |=-
  Thanks. I have pushed a fix[1] in Git, but haven't tagged the 
  bugreport accordingly. Sorry about that.
  
   [1] 
  http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=commitdiff;h=4b23b85
 
 I checked if the version in the git repo fixes the issue, but sadly it
 doesn't for the Multi-Arch: same packages. migrateDocSymlink computes
 the wrong /usr/share/doc location for these packages. For libfbclient2
 PKG is libfbclient2:arch, so the postinst script checks
 /usr/share/doc/libfbclient2:arch instead of /usr/share/doc/libfbclient2.
 Please see the attached output produced with DEBIAN_FIREBIRD_DEBUG set.
 …
 + migrateDocSymlink
 + basename /var/lib/dpkg/info/libfbclient2:amd64.postinst
 + local PKG=libfbclient2:amd64.postinst
 + PKG=libfbclient2:amd64
 + local TARGET=firebird2.5-common-doc
 + local D=/usr/share/doc/libfbclient2:amd64
 + [ ! -L /usr/share/doc/libfbclient2:amd64 -a -d 
 /usr/share/doc/libfbclient2:amd64 ]

Excellent catch!

This seems to be a defect in the code which determines the package 
name from the output of 'basename'. Perhaps it wouldn't be too hard to 
strip optional :arch from the end, for example via some sed script.

Unfortunately I am not sure about when I'd be able to try to fix this, 
so if you feel like it, please go ahead. Thanks!


-- dam


signature.asc
Description: Digital signature


Bug#692948: preinst which fixes the issue

2012-11-24 Thread Damyan Ivanov
Control: tag -1 pending

-=| Julian Taylor, 23.11.2012 21:20:47 +0100 |=-
 tags 692948 + patch
 thanks
 
 attached preinst should solve the issue

Thanks. I have pushed a fix[1] in Git, but haven't tagged the 
bugreport accordingly. Sorry about that.

 [1] 
http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=commitdiff;h=4b23b85



signature.asc
Description: Digital signature


Bug#692948: preinst which fixes the issue

2012-11-23 Thread Julian Taylor
tags 692948 + patch
thanks

attached preinst should solve the issue


libfbclient2.preinst
Description: Binary data