4 import opk
, cfg
, opkgcl
10 long_filename
= long_dir
+ "/"+ long_b
11 long_filename2
= long_dir
+ "/" + 110*"c"
14 open(long_filename
, "w").close()
15 os
.symlink(long_b
, long_filename2
)
16 a
= opk
.Opk(Package
="a", Version
="1.0", Architecture
="all")
17 a
.write(data_files
=[long_dir
, long_filename
, long_filename2
])
18 os
.unlink(long_filename
)
19 os
.unlink(long_filename2
)
21 opkgcl
.install("a_1.0_all.opk")
23 if not opkgcl
.is_installed("a"):
24 print(__file__
, ": Package 'a' not installed.")
27 if not os
.path
.exists("{}/{}".format(cfg
.offline_root
, long_dir
)):
28 print(__file__
, ": dir with name longer than 100 "
29 "characters not created.")
32 if not os
.path
.exists("{}/{}".format(cfg
.offline_root
, long_filename
)):
33 print(__file__
, ": file with a name longer than 100 characters, "
34 "in dir with name longer than 100 characters, "
38 if not os
.path
.lexists("{}/{}".format(cfg
.offline_root
, long_filename2
)):
39 print(__file__
, ": symlink with a name longer than 100 characters, "
40 "pointing at a file with a name longer than "
42 "in dir with name longer than 100 characters, "
46 linky
= os
.path
.realpath("{}/{}".format(cfg
.offline_root
, long_filename2
))
47 linky_dst
= "{}/{}".format(cfg
.offline_root
, long_filename
)
48 if linky
!= linky_dst
:
49 print(__file__
, ": symlink path truncated.")