str_list_prev: remove unused function
[oweals/opkg-lede.git] / tests / regress / issue58.py
1 #!/usr/bin/python3
2
3 import os
4 import opk, cfg, opkgcl
5
6 opk.regress_init()
7
8 o = opk.OpkGroup()
9 o.add(Package="a", Version="1.0", Architecture="all", Recommends="b")
10 o.add(Package="b", Version="1.0", Architecture="all")
11 o.add(Package="c", Version="1.0", Architecture="all", Recommends="b")
12 o.write_opk()
13 o.write_list()
14
15 opkgcl.update()
16
17 opkgcl.install("a")
18 opkgcl.install("c")
19
20 opkgcl.remove("a", "--autoremove")
21 if not opkgcl.is_installed("b"):
22         print(__file__, ": Pacakge 'b' orphaned despite remaining "
23                         "recommending package 'c'.")
24         exit(False)
25
26 opkgcl.remove("c", "--autoremove")
27 if opkgcl.is_installed("b"):
28         print(__file__, ": Recommended package 'b' not autoremoved.")
29         exit(False)
30
31