Skip to content
Snippets Groups Projects
Commit bb457825 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

dh_python2: remove even more \.so.* dangling symlinks, thanks to Stefano...

dh_python2: remove even more \.so.* dangling symlinks, thanks to Stefano Rivera for providing a test case
parent 35f7ef03
No related branches found
No related tags found
No related merge requests found
python-defaults (2.7.3~rc2-2) unstable; urgency=low
* dh_python2: remove even more \.so.* dangling symlinks, thanks to Stefano
Rivera for providing a test case
-- Piotr Ożarowski <piotr@debian.org> Sun, 10 Jun 2012 13:52:38 +0200
python-defaults (2.7.3~rc2-1) unstable; urgency=low
[ Scott Kitterman ]
......
......@@ -380,6 +380,11 @@ def scan(package, dname=None, clean_dbg_pkg=True):
fpath = join(root, fn)
if not exists(fpath):
# could be removed while handling .so symlinks
if islink(fpath) and '.so.' in split(fpath)[-1]:
# dangling symlink to (now removed/renamed) .so file
# which wasn't removed yet (see test3's quux.so.0)
log.info('removing symlink: %s', fpath)
os.remove(fpath)
continue
fext = fn.rsplit('.', 1)[-1]
if fext in ('pyc', 'pyo'):
......
......@@ -17,6 +17,10 @@ check:
test -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so
test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1
test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1.2
test -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so
test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
test ! -L debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0
clean:
./debian/rules clean
......
......@@ -19,4 +19,12 @@ override_dh_pysupport:
/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1
dh_link /usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1 \
/usr/lib/python${DPY}/dist-packages/foo/baz.so
# ... second style of multiple symlinks
cp debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/bar.so \
debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0
dh_link /usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0 \
/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
dh_link /usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0 \
/usr/lib/python${DPY}/dist-packages/foo/quux.so
# ... and complex multiple symlinks
DH_VERBOSE=1 ../../dh_python2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment