|
@@ -4,102 +4,106 @@ set -e
|
|
|
TESTDIR=$(readlink -f $(dirname $0))
|
|
TESTDIR=$(readlink -f $(dirname $0))
|
|
|
. $TESTDIR/framework
|
|
. $TESTDIR/framework
|
|
|
setupenvironment
|
|
setupenvironment
|
|
|
-configarchitecture 'amd64' 'armel'
|
|
|
|
|
|
|
|
|
|
-buildsimplenativepackage 'pkg-arch-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !amd64]
|
|
|
|
|
-Depends: foo [amd64 !amd64]'
|
|
|
|
|
-buildsimplenativepackage 'pkg-arch-no-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!amd64 amd64]
|
|
|
|
|
-Depends: foo [!amd64 amd64]'
|
|
|
|
|
-buildsimplenativepackage 'pkg-arch-foo-unrelated-no' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!kfreebsd-any amd64]
|
|
|
|
|
-Depends: foo [!kfreebsd-any amd64]'
|
|
|
|
|
-buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !kfreebsd-any]
|
|
|
|
|
-Depends: foo [amd64 !kfreebsd-any]'
|
|
|
|
|
-buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armhf], bar [arm]
|
|
|
|
|
-Depends: foo [armhf], bar [arm]'
|
|
|
|
|
|
|
+# we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
|
|
|
|
|
+NATIVE="$(command dpkg --print-architecture)"
|
|
|
|
|
+configarchitecture "${NATIVE}" 'armel'
|
|
|
|
|
+
|
|
|
|
|
+buildsimplenativepackage 'pkg-arch-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !${NATIVE}]
|
|
|
|
|
+Depends: foo [${NATIVE} !${NATIVE}]"
|
|
|
|
|
+buildsimplenativepackage 'pkg-arch-no-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!${NATIVE} ${NATIVE}]
|
|
|
|
|
+Depends: foo [!${NATIVE} ${NATIVE}]"
|
|
|
|
|
+buildsimplenativepackage 'pkg-arch-foo-unrelated-no' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!kfreebsd-any ${NATIVE}]
|
|
|
|
|
+Depends: foo [!kfreebsd-any ${NATIVE}]"
|
|
|
|
|
+buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !kfreebsd-any]
|
|
|
|
|
+Depends: foo [${NATIVE} !kfreebsd-any]"
|
|
|
|
|
+buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armeb], bar [arm]
|
|
|
|
|
+Depends: foo [armeb], bar [arm]'
|
|
|
|
|
|
|
|
-buildsimplenativepackage 'foo' 'amd64' '1.0' 'stable'
|
|
|
|
|
|
|
+buildsimplenativepackage 'foo' "$NATIVE" '1.0' 'stable'
|
|
|
|
|
|
|
|
insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
|
|
insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
|
|
|
|
|
|
|
|
setupaptarchive
|
|
setupaptarchive
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following extra packages will be installed:
|
|
The following extra packages will be installed:
|
|
|
foo
|
|
foo
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
foo pkg-arch-foo
|
|
foo pkg-arch-foo
|
|
|
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst foo (1.0 stable [amd64])
|
|
|
|
|
-Inst pkg-arch-foo (1.0 stable [amd64])
|
|
|
|
|
-Conf foo (1.0 stable [amd64])
|
|
|
|
|
-Conf pkg-arch-foo (1.0 stable [amd64])' aptget install pkg-arch-foo -s
|
|
|
|
|
|
|
+Inst foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Inst pkg-arch-foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf pkg-arch-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo -s
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
pkg-arch-no-foo
|
|
pkg-arch-no-foo
|
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst pkg-arch-no-foo (1.0 stable [amd64])
|
|
|
|
|
-Conf pkg-arch-no-foo (1.0 stable [amd64])' aptget install pkg-arch-no-foo -s
|
|
|
|
|
|
|
+Inst pkg-arch-no-foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following extra packages will be installed:
|
|
The following extra packages will be installed:
|
|
|
foo
|
|
foo
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
foo pkg-arch-foo-unrelated-no
|
|
foo pkg-arch-foo-unrelated-no
|
|
|
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst foo (1.0 stable [amd64])
|
|
|
|
|
-Inst pkg-arch-foo-unrelated-no (1.0 stable [amd64])
|
|
|
|
|
-Conf foo (1.0 stable [amd64])
|
|
|
|
|
-Conf pkg-arch-foo-unrelated-no (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no -s
|
|
|
|
|
|
|
+Inst foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Inst pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no -s
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following extra packages will be installed:
|
|
The following extra packages will be installed:
|
|
|
foo
|
|
foo
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
foo pkg-arch-foo-unrelated-no2
|
|
foo pkg-arch-foo-unrelated-no2
|
|
|
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst foo (1.0 stable [amd64])
|
|
|
|
|
-Inst pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])
|
|
|
|
|
-Conf foo (1.0 stable [amd64])
|
|
|
|
|
-Conf pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no2 -s
|
|
|
|
|
|
|
+Inst foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Inst pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no2 -s
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
foo
|
|
foo
|
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst foo (1.0 stable [amd64])
|
|
|
|
|
-Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo -s
|
|
|
|
|
|
|
+Inst foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s
|
|
|
|
|
|
|
|
testequal 'Reading package lists...
|
|
testequal 'Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
|
|
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
foo
|
|
foo
|
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst foo (1.0 stable [amd64])
|
|
|
|
|
-Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no -s
|
|
|
|
|
|
|
+Inst foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s
|
|
|
|
|
|
|
|
-testequal 'Reading package lists...
|
|
|
|
|
|
|
+testequal "Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|
|
|
foo
|
|
foo
|
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
|
|
|
-Inst foo (1.0 stable [amd64])
|
|
|
|
|
-Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no2 -s
|
|
|
|
|
|
|
+Inst foo (1.0 stable [${NATIVE}])
|
|
|
|
|
+Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s
|
|
|
|
|
|
|
|
testequal 'Reading package lists...
|
|
testequal 'Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s
|
|
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s
|
|
|
|
|
|
|
|
# this is not really testing APT - more that dpkg is in line with us
|
|
# this is not really testing APT - more that dpkg is in line with us
|
|
|
|
|
+configarchitecture 'amd64' 'armel'
|
|
|
testequal 'Reading package lists...
|
|
testequal 'Reading package lists...
|
|
|
Building dependency tree...
|
|
Building dependency tree...
|
|
|
The following NEW packages will be installed:
|
|
The following NEW packages will be installed:
|