summaryrefslogtreecommitdiffstats
path: root/test/integration/test-apt-update-disappeared-component
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 09:59:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 09:59:37 +0000
commit76e2632459410dec81337edb6a9fee33c9a660f3 (patch)
treea73345df208eede4a4daad340515c9328f34625c /test/integration/test-apt-update-disappeared-component
parentInitial commit. (diff)
downloadapt-76e2632459410dec81337edb6a9fee33c9a660f3.tar.xz
apt-76e2632459410dec81337edb6a9fee33c9a660f3.zip
Adding upstream version 2.7.12.upstream/2.7.12
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/test-apt-update-disappeared-component')
-rwxr-xr-xtest/integration/test-apt-update-disappeared-component45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/integration/test-apt-update-disappeared-component b/test/integration/test-apt-update-disappeared-component
new file mode 100755
index 0000000..7c7dd77
--- /dev/null
+++ b/test/integration/test-apt-update-disappeared-component
@@ -0,0 +1,45 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'amd64'
+
+insertpackage 'unstable' 'foobar' 'all' '1'
+
+APTARCHIVE="file:$(readlink -f ./aptarchive) unstable InRelease"
+setupaptarchive --no-update
+sed -i -e 's#main\s*$#main contrib non-free sub/component#' rootdir/etc/apt/sources.list.d/*
+
+# if no Component info is available we assume all are supported, which means
+# that non-existent Packages files are assumed to be missing because they are
+# empty (as the repository is declaring support for them via Architectures)
+testwarningmsg "W: Skipping acquire of configured file 'contrib/source/Sources' as repository '${APTARCHIVE}' does not seem to provide it (sources.list entry misspelt?)
+W: Skipping acquire of configured file 'non-free/source/Sources' as repository '${APTARCHIVE}' does not seem to provide it (sources.list entry misspelt?)
+W: Skipping acquire of configured file 'sub/component/source/Sources' as repository '${APTARCHIVE}' does not seem to provide it (sources.list entry misspelt?)" apt update
+
+sed -i -e '/^Codename: / a\
+Components: main contrib' $(find ./aptarchive -name 'Release')
+signreleasefiles
+
+testwarningmsg "W: Skipping acquire of configured file 'contrib/source/Sources' as repository '${APTARCHIVE}' does not seem to provide it (sources.list entry misspelt?)
+W: Skipping acquire of configured file 'non-free/source/Sources' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'sub/component/source/Sources' as repository '${APTARCHIVE}' doesn't have the component 'sub/component' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'non-free/binary-amd64/Packages' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'non-free/binary-all/Packages' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'non-free/i18n/Translation-en' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'sub/component/binary-amd64/Packages' as repository '${APTARCHIVE}' doesn't have the component 'sub/component' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'sub/component/binary-all/Packages' as repository '${APTARCHIVE}' doesn't have the component 'sub/component' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'sub/component/i18n/Translation-en' as repository '${APTARCHIVE}' doesn't have the component 'sub/component' (component misspelt in sources.list?)" apt update
+
+# the field looks like this e.g. for security.debian.org sources
+sed -i -e 's#^Components:.*$#Components: updates/main updates/contrib sub/component#' $(find ./aptarchive -name 'Release')
+signreleasefiles
+
+testwarningmsg "W: Skipping acquire of configured file 'contrib/source/Sources' as repository '${APTARCHIVE}' does not seem to provide it (sources.list entry misspelt?)
+W: Skipping acquire of configured file 'non-free/source/Sources' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'sub/component/source/Sources' as repository '${APTARCHIVE}' does not seem to provide it (sources.list entry misspelt?)
+W: Skipping acquire of configured file 'non-free/binary-amd64/Packages' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'non-free/binary-all/Packages' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)
+W: Skipping acquire of configured file 'non-free/i18n/Translation-en' as repository '${APTARCHIVE}' doesn't have the component 'non-free' (component misspelt in sources.list?)" apt update