4 import opk, cfg, opkgcl
9 o.add(Package="a", Version="1.0", Architecture="all", Recommends="b")
10 o.add(Package="b", Version="2.0", Architecture="all")
14 # prime the status file so 'b' is not installed as a recommendation
15 status_filename = "{}/usr/lib/opkg/status".format(cfg.offline_root)
16 f = open(status_filename, "w")
17 f.write("Package: b\n")
18 f.write("Version: 1.0\n")
19 f.write("Architecture: all\n")
20 f.write("Status: deinstall hold not-installed\n")
26 if opkgcl.is_installed("b"):
27 print(__file__, ": Package 'b' installed despite "
28 "deinstall/hold status.")
33 if opkgcl.is_installed("b"):
34 print(__file__, ": Package 'b' installed - deinstall/hold status "
39 open(status_filename, "w").close()