1#!/usr/bin/python3
2
3import os
4import opk, cfg, opkgcl
5
6opk.regress_init()
7
8long_filename = 110*"a"
9
10os.symlink(long_filename, "linky")
11a = opk.Opk(Package="a", Version="1.0", Architecture="all")
12a.write(data_files=["linky"])
13os.unlink("linky")
14opkgcl.install("a_1.0_all.opk")
15
16if not opkgcl.is_installed("a"):
17	print(__file__, ": Package 'a' not installed.")
18	exit(False)
19
20if not os.path.lexists("{}/linky".format(cfg.offline_root)):
21	print(__file__, ": symlink to file with a name longer than 100 "
22					"characters not created.")
23	exit(False)
24
25opkgcl.remove("a")
26