1 AT_TESTED([dpkg-split])
3 AT_SETUP([dpkg-split options])
4 AT_KEYWORDS([dpkg-split command-line])
5 AT_CHECK([dpkg-split --help], [], [ignore])
8 AT_SETUP([dpkg-split .deb format])
9 AT_KEYWORDS([dpkg-split deb-split])
11 DPKG_GEN_CONTROL([pkg-split])
12 DPKG_MOD_CONTROL([pkg-split],
13 [s/^Description:.*$/& - normal package to be split/])
15 # Initialize the template package
16 chmod -R u+w pkg-split
17 # XXX: Some environments set SIGPIPE to ignore which we cannot reset, and yes
18 # does check print error conditions, so we ignore its error message here.
19 yes 2>/dev/null | dd of=pkg-split/data-file bs=1024 count=1024 status=none
20 find pkg-split | xargs touch -t 197001010100.00
21 $ASROOT dpkg-deb -b -Znone pkg-split >/dev/null
25 # Test splitting a package (in 3 parts: 400 KiB + 400 KiB + 224 KiB)
26 dpkg-split -S 400 -s pkg-split.deb pkg-split-part
27 test -f pkg-split-part.1of3.deb
28 test -f pkg-split-part.2of3.deb
29 test -f pkg-split-part.3of3.deb
30 ], [], [Splitting package pkg-split into 3 parts: 1 2 3 done
33 DEB_SPLIT_MD5SUM=a4042d88f6da3da8ab2ab191a290ab66
36 # Test getting information about the split parts (parsing verification)
37 dpkg-split -I pkg-split-part.1of3.deb
38 dpkg-split -I pkg-split-part.2of3.deb
39 dpkg-split -I pkg-split-part.3of3.deb
40 ], [], [pkg-split-part.1of3.deb:
41 Part format version: 2.1
42 Part of package: pkg-split
45 ... MD5 checksum: $DEB_SPLIT_MD5SUM
46 ... length: 1055178 bytes
47 ... split every: 408576 bytes
49 Part length: 408576 bytes
51 Part file size (used portion): 408780 bytes
53 pkg-split-part.2of3.deb:
54 Part format version: 2.1
55 Part of package: pkg-split
58 ... MD5 checksum: $DEB_SPLIT_MD5SUM
59 ... length: 1055178 bytes
60 ... split every: 408576 bytes
62 Part length: 408576 bytes
63 Part offset: 408576 bytes
64 Part file size (used portion): 408780 bytes
66 pkg-split-part.3of3.deb:
67 Part format version: 2.1
68 Part of package: pkg-split
71 ... MD5 checksum: $DEB_SPLIT_MD5SUM
72 ... length: 1055178 bytes
73 ... split every: 408576 bytes
75 Part length: 238026 bytes
76 Part offset: 817152 bytes
77 Part file size (used portion): 238230 bytes
82 # Test joining the split parts back together
83 dpkg-split -o pkg-joined.deb -j pkg-split-part.*.deb
84 cmp pkg-split.deb pkg-joined.deb
85 ], [], [Putting package pkg-split together from 3 parts: 1 2 3 done