4 import opk, cfg, opkgcl
8 open("foo", "w").close()
9 a1 = opk.Opk(Package="a", Version="1.0", Architecture="all")
10 a1.write(data_files=["foo"])
13 opkgcl.install("a_1.0_all.opk")
16 a2 = opk.Opk(Package="a", Version="2.0", Architecture="all", Depends="b")
18 b1 = opk.Opk(Package="b", Version="1.0", Architecture="all")
19 b1.write(data_files=["foo"])
29 if not opkgcl.is_installed("a", "2.0"):
30 print(__file__, ": Package 'a_2.0' not installed.")
33 foo_fullpath = "{}/foo".format(cfg.offline_root)
35 if not os.path.exists(foo_fullpath):
36 print(__file__, ": File 'foo' incorrectly orphaned.")
39 if not foo_fullpath in opkgcl.files("b"):
40 print(__file__, ": Package 'b' does not own file 'foo'.")