4 import opk
, cfg
, opkgcl
8 open("asdf", "w").close()
9 a
= opk
.Opk(Package
="a", Version
="1.0", Architecture
="all")
10 a
.write(data_files
=["asdf"])
11 b
= opk
.Opk(Package
="b", Version
="1.0", Architecture
="all")
12 b
.write(data_files
=["asdf"])
14 opkgcl
.install("a_1.0_all.opk")
16 if not opkgcl
.is_installed("a"):
17 print(__file__
, ": Package 'a' not installed.")
20 if not os
.path
.exists("{}/asdf".format(cfg
.offline_root
)):
21 print(__file__
, ": asdf not created.")
24 opkgcl
.install("b_1.0_all.opk", "--force-overwrite")
26 if "{}/asdf".format(cfg
.offline_root
) not in opkgcl
.files("b"):
27 print(__file__
, ": asdf not claimed by ``b''.")
30 if "{}/asdf".format(cfg
.offline_root
) in opkgcl
.files("a"):
31 print(__file__
, ": asdf is still claimed by ``a''.")