[pkg-php-pear] Bug#774868: php-pager: unhandled symlink to directory conversion: /usr/share/php/tests/Pager/tests

Andreas Beckmann anbe at debian.org
Thu Jan 8 14:55:07 UTC 2015


Package: php-pager
Version: 2.4.8-2
Severity: serious
User: debian-qa at lists.debian.org
Usertags: piuparts

Hi,

an upgrade test with piuparts revealed that your package installs files
over existing symlinks and possibly overwrites files owned by other
packages. This usually means an old version of the package shipped a
symlink but that was later replaced by a real (and non-empty)
directory. This kind of overwriting another package's files cannot be
detected by dpkg.

This was observed on the following upgrade paths:

  squeeze -> wheezy -> jessie

For /usr/share/doc/PACKAGE this may not be problematic as long as both
packages are installed, ship byte-for-byte identical files and are
upgraded in lockstep. But once one of the involved packages gets
removed, the other one will lose its documentation files, too,
including the copyright file, which is a violation of Policy 12.5:
https://www.debian.org/doc/debian-policy/ch-docs.html#s-copyrightfile

For other overwritten locations anything interesting may happen.

Note that dpkg intentionally does not replace directories with symlinks
and vice versa, you need the maintainer scripts to do this.
See in particular the end of point 4 in
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-unpackphase

It is recommended to use the dpkg-maintscript-helper commands
'dir_to_symlink' and 'symlink_to_dir' (available since dpkg 1.17.14)
to perform the conversion, ideally using d/$PACKAGE.mainstscript.
Do not forget to add 'Pre-Depends: ${misc:Pre-Depends}' in d/control.
See dpkg-maintscript-helper(1) and dh_installdeb(1) for details.


>From the attached log (usually somewhere in the middle...):

3m38.1s INFO: dirname part contains a symlink:
  /usr/share/php/tests/Pager/tests/README (php-pager) != /usr/share/doc/php-pager/tests/README (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/all_tests.php (php-pager) != /usr/share/doc/php-pager/tests/all_tests.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/multibyte_post.php (php-pager) != /usr/share/doc/php-pager/tests/multibyte_post.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_include.php (php-pager) != /usr/share/doc/php-pager/tests/pager_include.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_jumping_noData_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_jumping_noData_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_jumping_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_jumping_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_jumping_tests.php (php-pager) != /usr/share/doc/php-pager/tests/pager_jumping_tests.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_noData_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_noData_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_post_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_post_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_post_test_simple.php (php-pager) != /usr/share/doc/php-pager/tests/pager_post_test_simple.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_post_tests.php (php-pager) != /usr/share/doc/php-pager/tests/pager_post_tests.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_sliding_noData_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_sliding_noData_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_sliding_notExpanded_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_sliding_notExpanded_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_sliding_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_sliding_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_sliding_tests.php (php-pager) != /usr/share/doc/php-pager/tests/pager_sliding_tests.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_test_xss.php (php-pager) != /usr/share/doc/php-pager/tests/pager_test_xss.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_tests.php (php-pager) != /usr/share/doc/php-pager/tests/pager_tests.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_wrapper_include.php (php-pager) != /usr/share/doc/php-pager/tests/pager_wrapper_include.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/pager_wrapper_test.php (php-pager) != /usr/share/doc/php-pager/tests/pager_wrapper_test.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests
  /usr/share/php/tests/Pager/tests/simple_include.php (php-pager) != /usr/share/doc/php-pager/tests/simple_include.php (?)
    /usr/share/php/tests/Pager/tests -> ../../../doc/php-pager/tests


cheers,

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: php-pager_2.4.8-2.log.gz
Type: application/gzip
Size: 40629 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-pear/attachments/20150108/71d22e4d/attachment-0001.bin>


More information about the pkg-php-pear mailing list