opkgcl.install("a_with_foo.opk") # ---- opkgcl.install("a_with_foo.opk") open("bar", "w").close() o = opk.OpkGroup() a2 = opk.Opk(Package="a") a2.write(data_files=["foo", "bar"]) o.opk_list.append(a2) o.write_list() os.unlink("foo") os.unlink("bar") opkgcl.update() opkgcl.install("a", "--force-reinstall") foo_fullpath = "{}/foo".format(cfg.offline_root) bar_fullpath = "{}/bar".format(cfg.offline_root) if not os.path.exists(foo_fullpath) or not os.path.exists(bar_fullpath): opk.fail("Files foo and/or bar are missing.") a_files = opkgcl.files("a") if not foo_fullpath in a_files or not bar_fullpath in a_files: opk.fail("Package 'a' does not own foo and/or bar.") opkgcl.remove("a") if os.path.exists(foo_fullpath) or os.path.exists(bar_fullpath):
# Collected errors: * ERROR: The following packages conflict with C: * # # Status: Accepted # import os import opk, cfg, opkgcl opk.regress_init() o = opk.OpkGroup() o.add(Package="a", Version="1.0", Depends="b") o.add(Package="b") o.write_opk() o.write_list() opkgcl.update() opkgcl.install("a") o = opk.OpkGroup() o.add(Package="a", Version="2.0", Depends="c") o.add(Package="c", Conflicts="b") o.write_opk() o.write_list() opkgcl.update() status = opkgcl.upgrade("a", "--autoremove") if not opkgcl.is_installed("a", "2.0"): opk.xfail( "[internalsolv] New version of package 'a' available during upgrade but was not installed" )