From be92d2cef3897c5b550f6b4d4da769f798b1d0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org> Date: Sun, 12 Jun 2011 22:22:51 +0200 Subject: [PATCH] add test case for absolute and relative symlink in dist-packages --- tests/t1/Makefile | 3 +++ tests/t1/debian/rules | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tests/t1/Makefile b/tests/t1/Makefile index 1364941..f3e1403 100644 --- a/tests/t1/Makefile +++ b/tests/t1/Makefile @@ -2,6 +2,7 @@ all: run check +DPY=$(shell PYTHONPATH=../../ python -c 'import debpython.version as v; print(v.vrepr(v.DEFAULT))') run: clean dpkg-buildpackage -b -us -uc @@ -11,6 +12,8 @@ check: test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo/__init__.py test ! -f debian/python-foo/usr/lib/python2.6/dist-packages/foo/spam.py grep -q "Depends: .*python (<<" debian/python-foo/DEBIAN/control + [ `readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/absolute_link_to_tmp` = /tmp ] + [ `readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/link_to_parent_dir` = .. ] clean: ./debian/rules clean diff --git a/tests/t1/debian/rules b/tests/t1/debian/rules index c8aea4a..9372870 100755 --- a/tests/t1/debian/rules +++ b/tests/t1/debian/rules @@ -5,6 +5,10 @@ override_dh_pysupport: find debian/ -name jquery.js -exec \ ln -fs /usr/share/javascript/jquery/jquery.js '{}' \; + find debian/ -name foo -type d -exec \ + ln -s /tmp/ '{}/absolute_link_to_tmp' \; + find debian/ -name foo -type d -exec \ + ln -s .. '{}/link_to_parent_dir' \; DH_VERBOSE=1 ../../dh_python2\ --depends 'SQLAlchemy >= 0.6.1'\ --recommends Mako\ -- GitLab