summaryrefslogtreecommitdiff
path: root/test/integration/test-sourceslist-target-plusminus-options
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-05-08 18:03:48 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-05-08 18:15:28 +0200
commit39c724b4848ef8d85c8c425f982dda85f0df1277 (patch)
tree613d716bad39d93e47c058e49db07e1af3087570 /test/integration/test-sourceslist-target-plusminus-options
parent7f2d1eef183dbebaaabe07a296d9a97e9cfd0f4a (diff)
implement Identifier field for IndexTargets
A frontend like apt-file is only interested in a specific set of files and selects those easily via "Created-By". If it supports two locations for those files through it would need to select both and a user would need to know that implementation detail for sources.list configuration. The "Identifier" field is hence introduced which by default has the same value as "Created-By", but can be freely configured – especially it can be used to give two indexes the same identifier.
Diffstat (limited to 'test/integration/test-sourceslist-target-plusminus-options')
-rwxr-xr-xtest/integration/test-sourceslist-target-plusminus-options50
1 files changed, 31 insertions, 19 deletions
diff --git a/test/integration/test-sourceslist-target-plusminus-options b/test/integration/test-sourceslist-target-plusminus-options
index 8197f068d..e4ce8e282 100755
--- a/test/integration/test-sourceslist-target-plusminus-options
+++ b/test/integration/test-sourceslist-target-plusminus-options
@@ -27,10 +27,17 @@ Acquire::IndexTargets::deb::Contents {
ShortDescription "Contents";
Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents";
};
+Acquire::IndexTargets::deb::Contents2 {
+ MetaKey "Contents-\$(ARCHITECTURE)";
+ ShortDescription "Contents2";
+ Description "\$(RELEASE) \$(ARCHITECTURE) Contents2";
+ Fallback-Of "Contents";
+ Identifier "Contents";
+};
EOF
echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'default + Contents' 'Packages' 'Translations' 'Contents'
+testtargets 'default + Contents' 'Packages' 'Translations' 'Contents' 'Contents2'
echo 'deb [target=Packages] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
testtargets 'force Packages target' 'Packages'
@@ -42,38 +49,40 @@ echo 'deb [target=Translations,Contents] http://example.org/debian stable rocks'
testtargets 'force two targets' 'Contents' 'Translations'
echo 'deb [target+=Translations,Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'add existing' 'Packages' 'Contents' 'Translations'
+testtargets 'add existing' 'Packages' 'Contents' 'Translations' 'Contents2'
echo 'deb [target+=AppStream] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'add non-existing' 'Packages' 'Contents' 'Translations'
+testtargets 'add non-existing' 'Packages' 'Contents' 'Translations' 'Contents2'
echo 'deb [target-=Translations,Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'remove existing' 'Packages'
+testtargets 'remove existing' 'Packages' 'Contents2'
echo 'deb [target-=AppStream] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'remove non-existing' 'Packages' 'Contents' 'Translations'
+testtargets 'remove non-existing' 'Packages' 'Contents' 'Translations' 'Contents2'
echo 'deb [AppStream=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'activate non-existing' 'Packages' 'Contents' 'Translations'
+testtargets 'activate non-existing' 'Packages' 'Contents' 'Translations' 'Contents2'
echo 'deb [AppStream=no] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'deactivate non-existing' 'Packages' 'Contents' 'Translations'
+testtargets 'deactivate non-existing' 'Packages' 'Contents' 'Translations' 'Contents2'
echo 'deb [Contents=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'activate existing' 'Packages' 'Contents' 'Translations'
+testtargets 'activate existing' 'Packages' 'Contents' 'Contents2' 'Translations'
echo 'deb [Contents=no] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
testtargets 'deactivate existing' 'Packages' 'Translations'
echo 'deb [target=Packages Contents=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'explicit + activate' 'Packages' 'Contents'
+testtargets 'explicit + activate' 'Packages' 'Contents' 'Contents2'
+echo 'deb [Contents=yes,target+=Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testtargets 'duplications are okay' 'Packages' 'Translations' 'Contents' 'Contents2'
-msgmsg 'Contents NOT as a default target'
+msgmsg 'Contents NOT as a default target (but Contents2)'
echo 'Acquire::IndexTargets::deb::Contents::DefaultEnabled "no";' > rootdir/etc/apt/apt.conf.d/content-target-notdefault.conf
echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'default + Contents' 'Packages' 'Translations'
+testtargets 'default + Contents' 'Packages' 'Translations' 'Contents2'
echo 'deb [target=Packages] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
testtargets 'force Packages target' 'Packages'
@@ -85,28 +94,31 @@ echo 'deb [target=Translations,Contents] http://example.org/debian stable rocks'
testtargets 'force two targets' 'Contents' 'Translations'
echo 'deb [target+=Translations,Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'add existing' 'Packages' 'Contents' 'Translations'
+testtargets 'add existing' 'Packages' 'Contents' 'Translations' 'Contents2'
echo 'deb [target+=AppStream] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'add non-existing' 'Packages' 'Translations'
+testtargets 'add non-existing' 'Packages' 'Translations' 'Contents2'
echo 'deb [target-=Translations,Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'remove existing' 'Packages'
+testtargets 'remove existing' 'Packages' 'Contents2'
echo 'deb [target-=AppStream] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'remove non-existing' 'Packages' 'Translations'
+testtargets 'remove non-existing' 'Packages' 'Translations' 'Contents2'
echo 'deb [AppStream=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'activate non-existing' 'Packages' 'Translations'
+testtargets 'activate non-existing' 'Packages' 'Translations' 'Contents2'
echo 'deb [AppStream=no] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'deactivate non-existing' 'Packages' 'Translations'
+testtargets 'deactivate non-existing' 'Packages' 'Translations' 'Contents2'
echo 'deb [Contents=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'activate existing' 'Packages' 'Contents' 'Translations'
+testtargets 'activate existing' 'Packages' 'Contents' 'Contents2' 'Translations'
echo 'deb [Contents=no] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
testtargets 'deactivate existing' 'Packages' 'Translations'
echo 'deb [target=Packages Contents=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testtargets 'explicit + activate' 'Packages' 'Contents'
+testtargets 'explicit + activate' 'Packages' 'Contents' 'Contents2'
+
+echo 'deb [Contents=yes,target+=Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testtargets 'duplications are okay' 'Packages' 'Translations' 'Contents' 'Contents2'