4 import opk
, cfg
, opkgcl
9 o
.add(Package
="a", Version
="2.0", Architecture
="all")
13 # older version, not in Packages list
14 a1
= opk
.Opk(Package
="a", Version
="1.0", Architecture
="all")
19 # install v2 from repository
21 if not opkgcl
.is_installed("a", "2.0"):
22 print(__file__
, ": Package 'a_2.0' not installed.")
25 opkgcl
.install("a_1.0_all.opk", "--force-downgrade")
26 if not opkgcl
.is_installed("a", "1.0"):
27 print(__file__
, ": Package 'a_1.0' not installed (1).")
30 opkgcl
.install("a_1.0_all.opk", "--force-downgrade")
31 if not opkgcl
.is_installed("a", "1.0"):
32 print(__file__
, ": Package 'a_1.0' not installed (2).")