summaryrefslogtreecommitdiffstats
path: root/tests/regress/issue79.py
blob: 1d427f6ce999db3c3d70bb02c4b492050a49f481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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)