5 system("rm -rf debian/debhelper debian/tmp");
7 # #537140: debian/tmp is explcitly specified despite being searched by
9 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
10 system("./dh_install", "debian/tmp/usr/bin/foo");
11 ok(-e "debian/debhelper/usr/bin/foo");
12 ok(! -e "debian/debhelper/usr/bin/bar");
13 system("rm -rf debian/debhelper debian/tmp");
15 # debian/tmp explicitly specified in filenames in older compat level
16 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
17 system("DH_COMPAT=6 ./dh_install debian/tmp/usr/bin/foo");
18 ok(-e "debian/debhelper/usr/bin/foo");
19 ok(! -e "debian/debhelper/usr/bin/bar");
20 system("rm -rf debian/debhelper debian/tmp");
22 # --sourcedir=debian/tmp in older compat level
23 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
24 system("DH_COMPAT=6 ./dh_install --sourcedir=debian/tmp usr/bin/foo");
25 ok(-e "debian/debhelper/usr/bin/foo");
26 ok(! -e "debian/debhelper/usr/bin/bar");
27 system("rm -rf debian/debhelper debian/tmp");
29 # redundant --sourcedir=debian/tmp in v7+
30 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
31 system("./dh_install --sourcedir=debian/tmp usr/bin/foo");
32 ok(-e "debian/debhelper/usr/bin/foo");
33 ok(! -e "debian/debhelper/usr/bin/bar");
34 system("rm -rf debian/debhelper debian/tmp");
36 # #537017: --sourcedir=debian/tmp/foo is used
37 system("mkdir -p debian/tmp/foo/usr/bin; touch debian/tmp/foo/usr/bin/foo; touch debian/tmp/foo/usr/bin/bar");
38 system("./dh_install", "--sourcedir=debian/tmp/foo", "usr/bin/bar");
39 ok(-e "debian/debhelper/usr/bin/bar");
40 ok(! -e "debian/debhelper/usr/bin/foo");
41 system("rm -rf debian/debhelper debian/tmp");
43 # #535367: installation of entire top-level directory from debian/tmp
44 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
45 system("./dh_install", "usr");
46 ok(-e "debian/debhelper/usr/bin/foo");
47 ok(-e "debian/debhelper/usr/bin/bar");
48 system("rm -rf debian/debhelper debian/tmp");
50 # #534565: fallback use of debian/tmp in v7+
51 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
52 system("./dh_install", "usr/bin");
53 ok(-e "debian/debhelper/usr/bin/foo");
54 ok(-e "debian/debhelper/usr/bin/bar");
55 system("rm -rf debian/debhelper debian/tmp");
57 # no fallback to debian/tmp before v7
58 system("mkdir -p debian/tmp/usr/bin; touch debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
59 system("DH_COMPAT=6 ./dh_install usr/bin 2>/dev/null");
60 ok(! -e "debian/debhelper/usr/bin/foo");
61 ok(! -e "debian/debhelper/usr/bin/bar");
62 system("rm -rf debian/debhelper debian/tmp");
64 # #534565: glob expands to dangling symlink -> should install the dangling link
65 system("mkdir -p debian/tmp/usr/bin; ln -s broken debian/tmp/usr/bin/foo; touch debian/tmp/usr/bin/bar");
66 system("./dh_install", "usr/bin/*");
67 ok(-l "debian/debhelper/usr/bin/foo");
68 ok(! -e "debian/debhelper/usr/bin/foo");
69 ok(-e "debian/debhelper/usr/bin/bar");
70 ok(! -l "debian/debhelper/usr/bin/bar");
71 system("rm -rf debian/debhelper debian/tmp");
73 # regular specification of file not in debian/tmp
74 system("./dh_install", "dh_install", "usr/bin");
75 ok(-e "debian/debhelper/usr/bin/dh_install");
76 system("rm -rf debian/debhelper debian/tmp");
78 # specification of file in source directory not in debian/tmp
79 system("mkdir -p bar/usr/bin; touch bar/usr/bin/foo");
80 system("./dh_install", "--sourcedir=bar", "usr/bin/foo");
81 ok(-e "debian/debhelper/usr/bin/foo");
82 system("rm -rf debian/debhelper bar");
84 # specification of file in subdir, not in debian/tmp
85 system("mkdir -p bar/usr/bin; touch bar/usr/bin/foo");
86 system("./dh_install", "bar/usr/bin/foo");
87 ok(-e "debian/debhelper/bar/usr/bin/foo");
88 system("rm -rf debian/debhelper bar");