diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-08-29 13:50:22 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-08-29 18:59:40 +0200 |
commit | 9adb9778d11db138d645e037e092db1fb64b5d4a (patch) | |
tree | 038d0c46a0b6326d57aa4c6ba85fa059aae1d4eb /test | |
parent | 8dd562a894c2472e3705fe13c212f665b55744a9 (diff) |
implement indextargets option 'DefaultEnabled'
Some targets like Contents-udeb are special-needs targets. Shipping the
configuration snippet for them is okay, but they shouldn't be downloaded
by default. Forcing the user to enable targets by uncommenting targets
is wrong and this would still not really solve the problem completely as
even if you want to download some -udebs it will probably not be for all
sources you have enabled, so having the possibility of disabling a
target by default, but giving the user the option to enable it on a
per-source entry basis is better.
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-sourceslist-target-plusminus-options | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/integration/test-sourceslist-target-plusminus-options b/test/integration/test-sourceslist-target-plusminus-options index 00d9085a0..6f8d05560 100755 --- a/test/integration/test-sourceslist-target-plusminus-options +++ b/test/integration/test-sourceslist-target-plusminus-options @@ -20,6 +20,7 @@ testtargets() { echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list testtargets 'default' 'Packages' 'Translations' +msgmsg 'Contents as a default target' cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF Acquire::IndexTargets::deb::Contents { MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)"; @@ -27,6 +28,8 @@ Acquire::IndexTargets::deb::Contents { Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents"; }; EOF + +echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list testtargets 'default + Contents' 'Packages' 'Translations' 'Contents' echo 'deb [target=Packages] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list @@ -64,3 +67,46 @@ 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' + + +msgmsg 'Contents NOT as a default target' +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' + +echo 'deb [target=Packages] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'force Packages target' 'Packages' + +echo 'deb [target=Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'force Contents target' 'Contents' + +echo 'deb [target=Translations,Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +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' + +echo 'deb [target+=AppStream] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'add non-existing' 'Packages' 'Translations' + +echo 'deb [target-=Translations,Contents] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'remove existing' 'Packages' + +echo 'deb [target-=AppStream] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'remove non-existing' 'Packages' 'Translations' + +echo 'deb [AppStream=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'activate non-existing' 'Packages' 'Translations' + +echo 'deb [AppStream=no] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'deactivate non-existing' 'Packages' 'Translations' + +echo 'deb [Contents=yes] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testtargets 'activate existing' 'Packages' 'Contents' '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' |