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"])
12 opkgcl.install("a_1.0_all.opk")
15 a2 = opk.Opk(Package="a", Version="2.0", Architecture="all", Depends="b")
17 b1 = opk.Opk(Package="b", Version="1.0", Architecture="all")
18 b1.write(data_files=["foo"])
28 if not opkgcl.is_installed("a", "2.0"):
29 print(__file__, ": Package 'a_2.0' not installed.")
32 foo_fullpath = "{}/foo".format(cfg.offline_root)
34 if not os.path.exists(foo_fullpath):
35 print(__file__, ": File 'foo' incorrectly orphaned.")
38 if not foo_fullpath in opkgcl.files("b"):
39 print(__file__, ": Package 'b' does not own file 'foo'.")