Exemple #1
0
# 7. Create package 'g' (2.0), which PROVIDES 'e'
# 8. Upgrade
#
# What is the expected output? What do you see instead?
########################################
# Packages 'a' (2.0), 'b' (1.0),  'c' (1.0), f (2.0) and g (2.0) should be installed.
#
# Instead, opkg only packages 'a' (2.0) and c (1.0) are installed
#

import os
import opk, cfg, opkgcl

opk.regress_init()

_, version = opkgcl.opkgcl("--version")
libsolv = True if 'libsolv' in version else False

o = opk.OpkGroup()
o.add(Package='a', Version='1.0', Depends='b')
o.add(Package='b', Version='1.0', Depends='c', Provides='d')
o.add(Package='c', Version='1.0', Provides='e')
o.write_opk()
o.write_list()
opkgcl.update()

opkgcl.install('a')

if not opkgcl.is_installed('a', '1.0'):
    opk.fail("Package 'a' (1.0)  installed but does not report as installed.")
if not opkgcl.is_installed('b', '1.0'):
Exemple #2
0
import os
import opk, cfg, opkgcl

opk.regress_init()

o = opk.OpkGroup()
o.add(Package="a", Depends="b")
o.add(Package="b", Depends="d")
o.add(Package="c", Provides="d", Conflicts="e")
o.add(Package="e", Provides="d", Conflicts="c")
o.write_opk()
o.write_list()

opkgcl.update()

status, stdout = opkgcl.opkgcl(" --force-postinstall install a")
if status != 0:
    opk.fail("Return value was different than 0")
if "Collected errors" in stdout:
    opk.fail("Command returned an error")
if not opkgcl.is_installed("a"):
    opk.fail("Package 'a' installed but does not report as installed.")
if not opkgcl.is_installed("b"):
    opk.fail(
        "Package 'b' should be installed as a dependency of 'a' but does not report as installed."
    )
if not opkgcl.is_installed("c") and not opkgcl.is_installed("e"):
    opk.fail(
        "Package 'c' or 'e' should be installed as a dependency of 'b' but does not report as installed."
    )
if opkgcl.is_installed("c") and opkgcl.is_installed("e"):
Exemple #3
0
#!/usr/bin/python3

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.write_opk()
o.write_list()

opkgcl.update()

(status, output) = opkgcl.opkgcl("install a")
ln_a = output.find("Configuring a")
ln_b = output.find("Configuring b")

if ln_a == -1:
    print(__file__, ": Didn't see package 'a' get configured.")
    exit(False)

if ln_b == -1:
    print(__file__, ": Didn't see package 'b' get configured.")
    exit(False)

if ln_a < ln_b:
    print(__file__, ": Packages 'a' and 'b' configured in wrong order.")
    exit(False)
Exemple #4
0
#!/usr/bin/python3

import os
import opk, cfg, opkgcl

opk.regress_init()

o = opk.OpkGroup()
o.add(Package="a", Depends="b")
o.add(Package="b")
o.write_opk()
o.write_list()

opkgcl.update()

(status, output) = opkgcl.opkgcl("install --force-postinstall a")
ln_a = output.find("Configuring a")
ln_b = output.find("Configuring b")

if ln_a == -1:
	print(__file__, ": Didn't see package 'a' get configured.")
	exit(False)

if ln_b == -1:
	print(__file__, ": Didn't see package 'b' get configured.")
	exit(False)

if ln_a < ln_b:
	print(__file__, ": Packages 'a' and 'b' configured in wrong order.")
	exit(False)
Exemple #5
0
# > Resolved in r521

import os
import opk, cfg, opkgcl

opk.regress_init()

o = opk.OpkGroup()
o.add(Package="a", Depends="b")
o.add(Package="b")
o.write_opk()
o.write_list()

opkgcl.update()

(status, output) = opkgcl.opkgcl("install --force-postinstall a")
ln_a = output.find("Configuring a")
ln_b = output.find("Configuring b")

if ln_a == -1:
    opk.fail("Didn't see package 'a' get configured.")

if ln_b == -1:
    opk.fail("Didn't see package 'b' get configured.")

if ln_a < ln_b:
    opk.fail("Packages 'a' and 'b' configured in wrong order.")

opkgcl.remove("a")
opkgcl.remove("b")
Exemple #6
0
#!/usr/bin/python3

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.write_opk()
o.write_list()

opkgcl.update()

(status, output) = opkgcl.opkgcl("install a")
ln_a = output.find("Configuring a")
ln_b = output.find("Configuring b")

if ln_a == -1:
	print(__file__, ": Didn't see package 'a' get configured.")
	exit(False)

if ln_b == -1:
	print(__file__, ": Didn't see package 'b' get configured.")
	exit(False)

if ln_a < ln_b:
	print(__file__, ": Packages 'a' and 'b' configured in wrong order.")
	exit(False)