summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:14:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:14:41 +0000
commit549a391d6438e828001eeeaf235b080c054a7bf3 (patch)
tree1bb6b1ea5987fa167a1d13abe82209cc882dd94b /test/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative
parentInitial commit. (diff)
downloadapt-549a391d6438e828001eeeaf235b080c054a7bf3.tar.xz
apt-549a391d6438e828001eeeaf235b080c054a7bf3.zip
Adding upstream version 2.2.4.upstream/2.2.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative')
-rwxr-xr-xtest/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative b/test/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative
new file mode 100755
index 0000000..7f8e4ad
--- /dev/null
+++ b/test/integration/test-bug-lp1694697-build-dep-architecture-limited-alternative
@@ -0,0 +1,58 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+
+setupenvironment
+configarchitecture 'i386'
+
+
+insertpackage 'stable' 'build-depends' 'i386' '1'
+insertpackage 'stable' 'foo' 'i386' '1'
+insertinstalledpackage 'build-essential' 'i386' '1'
+
+setupaptarchive
+
+# This used to be interpreted as build-depends | foo
+cat > foobar.dsc <<EOF
+Format: 3.0 (native)
+Source: foobar
+Binary: foobar
+Architecture: all
+Version: 1
+Maintainer: Joe Sixpack <joe@example.org>
+Build-Depends: build-depends [i386] | build-depends [amd64], foo
+Standards-Version: 3.9.8
+EOF
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ build-depends foo
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst build-depends (1 stable [i386])
+Inst foo (1 stable [i386])
+Conf build-depends (1 stable [i386])
+Conf foo (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc
+
+
+# This caused a segmentation fault
+cat > foobar.dsc <<EOF
+Format: 3.0 (native)
+Source: foobar
+Binary: foobar
+Architecture: all
+Version: 1
+Maintainer: Joe Sixpack <joe@example.org>
+Build-Depends: build-depends [i386] | build-depends [amd64]
+Standards-Version: 3.9.8
+EOF
+testsuccessequal "Note, using file './foobar.dsc' to get the build dependencies
+Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ build-depends
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst build-depends (1 stable [i386])
+Conf build-depends (1 stable [i386])" aptget build-dep --simulate ./foobar.dsc