]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-bug-841874-warning-for-mismatching-distribution
show distribution mismatch for changed codenames
[apt.git] / test / integration / test-bug-841874-warning-for-mismatching-distribution
index 7502eefc38e959c55bf21f51cc32f35aecdbdcf3..6cc8e317341c9a80a7bcc805badce8b8347a1a01 100755 (executable)
@@ -47,3 +47,15 @@ testfailure apt show foo
 ln -s "${APTARCHIVE}/dists/testing" "${APTARCHIVE}/dists/buster"
 testsuccess apt update
 testsuccess apt show foo
+
+# changing codenames gets a warning, too
+rm -rf rootdir/var/lib/apt/lists
+sed -i -e 's#buster#testing#g' rootdir/etc/apt/sources.list.d/*
+testsuccess apt update
+testsuccess apt show foo
+sed -i -e 's#^Codename: buster#Codename: zurg#g' $(find ./aptarchive -name 'Release')
+signreleasefiles
+testwarningmsg "W: Conflicting distribution: file:$APTARCHIVE testing/updates InRelease (expected buster/updates but got zurg/updates)" apt update
+testsuccess apt show foo
+testsuccess apt update
+testsuccess apt show foo