summaryrefslogtreecommitdiffstats
path: root/tests/regress/issue79.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regress/issue79.py')
-rwxr-xr-xtests/regress/issue79.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/regress/issue79.py b/tests/regress/issue79.py
new file mode 100755
index 0000000..1d427f6
--- /dev/null
+++ b/tests/regress/issue79.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+import os
+import opk, cfg, opkgcl
+
+opk.regress_init()
+
+o = opk.OpkGroup()
+o.add(Package="a", Version="1.0", Architecture="all", Depends="b", )
+o.add(Package="b", Version="1.0", Architecture="all")
+o.add(Package="c", Version="1.0", Architecture="all", Depends="b")
+o.write_opk()
+o.write_list()
+
+opkgcl.update()
+opkgcl.install("a")
+opkgcl.install("c")
+
+opkgcl.flag_unpacked("a")
+
+o = opk.OpkGroup()
+o.add(Package="a", Version="1.0", Architecture="all", Depends="b", )
+o.add(Package="b", Version="1.0", Architecture="all")
+o.add(Package="c", Version="2.0", Architecture="all")
+o.write_opk()
+o.write_list()
+
+opkgcl.update()
+opkgcl.upgrade("--autoremove")
+
+if not opkgcl.is_installed("b", "1.0"):
+ print("b has been removed even though a still depends on it")
+ exit(False)