aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-03 17:16:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-03 17:16:50 +0000
commit63c8baae4819e82d0c03e5524b032d228dbb3487 (patch)
treeb362f6ea349ebbb2d12ea13b50c2d8f2b1932989 /src
parent76dc8b38fcf2ff3619098b383ebacee3d7b5a35f (diff)
downloadpaludis-63c8baae4819e82d0c03e5524b032d228dbb3487.tar.gz
paludis-63c8baae4819e82d0c03e5524b032d228dbb3487.tar.xz
Split up VDBRepository. Add a new experimental Exndbam repository, which can replace VDB on systems that don't need EAPI 0/1 support.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/clients/paludis/install_TEST61
-rwxr-xr-xsrc/clients/paludis/install_TEST_setup.sh37
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST49
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST_setup.sh38
4 files changed, 123 insertions, 62 deletions
diff --git a/src/clients/paludis/install_TEST b/src/clients/paludis/install_TEST
index aa9293830..94e6428b5 100755
--- a/src/clients/paludis/install_TEST
+++ b/src/clients/paludis/install_TEST
@@ -1,32 +1,39 @@
#!/bin/bash
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --list-packages || exit 12
-
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --query test-category/target || exit 13
-
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --has-version test-category/target && exit 1
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --install target --resume-command-template `pwd`/install_TEST_dir/resume \
- --checks always && exit 2
-( echo -n './paludis ' ; cut -d ' ' -f2- < install_TEST_dir/resume ) > install_TEST_dir/fixedresume
-cat install_TEST_dir/fixedresume
-PALUDIS_HOME=./install_TEST_dir/config/ bash `pwd`/install_TEST_dir/fixedresume --checks none || exit 3
-./install_TEST_dir/root/usr/bin/testbin | grep success >/dev/null || exit 4
-grep target install_TEST_dir/root/var/db/pkg/world >/dev/null || exit 5
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --has-version test-category/target || exit 6
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --uninstall target || exit 7
-[[ -f ./install_TEST_dir/root/usr/bin/testbin ]] && exit 8
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- --has-version test-category/target && exit 9
-grep target install_TEST_dir/root/var/db/pkg/world >/dev/null && exit 10
-
-PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test \
- -qMD test-category/target || exit 11
+for c in vdb_config exndbam_config ; do
+
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --list-packages || exit 12
+
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --query test-category/target || exit 13
+
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --has-version test-category/target && exit 1
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --install target --resume-command-template `pwd`/install_TEST_dir/resume \
+ --checks always && exit 2
+ ( echo -n './paludis ' ; cut -d ' ' -f2- < install_TEST_dir/resume ) > install_TEST_dir/fixedresume
+ cat install_TEST_dir/fixedresume
+ PALUDIS_HOME=./install_TEST_dir/config/ bash `pwd`/install_TEST_dir/fixedresume --checks none || exit 3
+ ./install_TEST_dir/root/usr/bin/testbin | grep success >/dev/null || exit 4
+ grep target install_TEST_dir/root/var/db/$([[ $c == vdb_config ]] && echo pkg || echo exndbam )/world >/dev/null || exit 5
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --has-version test-category/target || exit 6
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --contents test-category/target || exit 12
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --uninstall target || exit 7
+ [[ -f ./install_TEST_dir/root/usr/bin/testbin ]] && exit 8
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ --has-version test-category/target && exit 9
+ grep target install_TEST_dir/root/var/db/$([[ $c == vdb_config ]] && echo pkg || echo exndbam )/world >/dev/null && exit 10
+
+ PALUDIS_HOME=./install_TEST_dir/config/ ./paludis --environment :install-test-$c \
+ -qMD test-category/target || exit 11
+
+ rm -fr install_TEST_dir/root/usr
+done
true
diff --git a/src/clients/paludis/install_TEST_setup.sh b/src/clients/paludis/install_TEST_setup.sh
index 650e88b6d..057bf2d21 100755
--- a/src/clients/paludis/install_TEST_setup.sh
+++ b/src/clients/paludis/install_TEST_setup.sh
@@ -5,31 +5,39 @@ mkdir install_TEST_dir || exit 1
cd install_TEST_dir || exit 1
mkdir -p build
-mkdir -p config/.paludis-install-test
-cat <<END > config/.paludis-install-test/specpath.conf
+mkdir -p config/.paludis-install-test-vdb_config
+cat <<END > config/.paludis-install-test-vdb_config/specpath.conf
root = `pwd`/root
-config-suffix =
+config-suffix = vdb
END
-mkdir -p root/${SYSCONFDIR}/paludis/repositories
-cat <<END > root/${SYSCONFDIR}/paludis/use.conf
+mkdir -p config/.paludis-install-test-exndbam_config
+cat <<END > config/.paludis-install-test-exndbam_config/specpath.conf
+root = `pwd`/root
+config-suffix = exndbam
+END
+
+for c in vdb exndbam ; do
+
+ mkdir -p root/${SYSCONFDIR}/paludis${c}/repositories
+ cat <<END > root/${SYSCONFDIR}/paludis${c}/use.conf
*/* foo
END
-cat <<END > root/${SYSCONFDIR}/paludis/licenses.conf
+ cat <<END > root/${SYSCONFDIR}/paludis${c}/licenses.conf
*/* *
END
-cat <<END > root/${SYSCONFDIR}/paludis/keywords.conf
+ cat <<END > root/${SYSCONFDIR}/paludis${c}/keywords.conf
*/* test
END
-cat <<END > root/${SYSCONFDIR}/paludis/bashrc
+ cat <<END > root/${SYSCONFDIR}/paludis${c}/bashrc
export CHOST="my-chost"
export USER_BASHRC_WAS_USED=yes
END
-cat <<END > root/${SYSCONFDIR}/paludis/repositories/repo1.conf
+ cat <<END > root/${SYSCONFDIR}/paludis${c}/repositories/repo1.conf
location = `pwd`/repo1
cache = /var/empty
format = ebuild
@@ -38,7 +46,9 @@ profiles = \${location}/profiles/testprofile \${location}/profiles/anothertestpr
buildroot = `pwd`/build
END
-cat <<END > root/${SYSCONFDIR}/paludis/repositories/installed.conf
+done
+
+cat <<END > root/${SYSCONFDIR}/paludisvdb/repositories/installed.conf
location = `pwd`/root/var/db/pkg
format = vdb
names_cache = /var/empty
@@ -46,8 +56,15 @@ provides_cache = /var/empty
buildroot = `pwd`/build
END
+cat <<END > root/${SYSCONFDIR}/paludisexndbam/repositories/installed.conf
+location = `pwd`/root/var/db/exndbam
+format = exndbam
+buildroot = `pwd`/build
+END
+
mkdir -p root/tmp
mkdir -p root/var/db/pkg
+mkdir -p root/var/db/exndbam
touch root/${SYSCONFDIR}/ld.so.conf
mkdir -p repo1/{eclass,distfiles,profiles/{testprofile,anothertestprofile},test-category/target/files} || exit 1
diff --git a/src/clients/paludis/upgrade_TEST b/src/clients/paludis/upgrade_TEST
index 3de7ff840..30fd89fdf 100755
--- a/src/clients/paludis/upgrade_TEST
+++ b/src/clients/paludis/upgrade_TEST
@@ -1,23 +1,42 @@
#!/bin/bash
-PALUDIS_HOME=./upgrade_TEST_dir/config/ REPEAT= \
- ./paludis --config-suffix upgrade-test --install =test-category/target-1 || exit 1
+for c in vdb_config exndbam_config ; do
-./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-1 >/dev/null || exit 2
-./upgrade_TEST_dir/root/usr/bin/testbin1 | grep testbin1 >/dev/null || exit 3
-./upgrade_TEST_dir/root/usr/bin/testbin2 && exit 4
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ REPEAT= \
+ ./paludis -E :upgrade-test --query -M =test-category/target-1 || exit 13
-PALUDIS_HOME=./upgrade_TEST_dir/config/ REPEAT=yes \
- ./paludis --config-suffix upgrade-test --install =test-category/target-1 || exit 5
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ REPEAT= \
+ ./paludis -E :upgrade-test --install =test-category/target-1 || exit 1
-./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-1 >/dev/null || exit 6
-./upgrade_TEST_dir/root/usr/bin/testbin1 | grep repeatbin1 >/dev/null || exit 7
-./upgrade_TEST_dir/root/usr/bin/testbin2 && exit 8
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ REPEAT= \
+ ./paludis -E :upgrade-test --query -M =test-category/target-1 || exit 14
-PALUDIS_HOME=./upgrade_TEST_dir/config/ \
- ./paludis --config-suffix upgrade-test --install target || exit 9
+ ./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-1 >/dev/null || exit 2
+ ./upgrade_TEST_dir/root/usr/bin/testbin1 | grep testbin1 >/dev/null || exit 3
+ ./upgrade_TEST_dir/root/usr/bin/testbin2 && exit 4
-./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-2 >/dev/null || exit 10
-./upgrade_TEST_dir/root/usr/bin/testbin1 2>/dev/null && exit 11
-./upgrade_TEST_dir/root/usr/bin/testbin2 | grep testbin2 >/dev/null || exit 12
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ REPEAT=yes \
+ ./paludis -E :upgrade-test --install =test-category/target-1 || exit 5
+
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ REPEAT= \
+ ./paludis -E :upgrade-test --query -M =test-category/target-1 || exit 15
+
+ ./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-1 >/dev/null || exit 6
+ ./upgrade_TEST_dir/root/usr/bin/testbin1 | grep repeatbin1 >/dev/null || exit 7
+ ./upgrade_TEST_dir/root/usr/bin/testbin2 && exit 8
+
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ \
+ ./paludis -E :upgrade-test --install target || exit 9
+
+
+ PALUDIS_HOME=./upgrade_TEST_dir/$c/ REPEAT= \
+ ./paludis -E :upgrade-test --query -M target || exit 16
+
+ ./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-2 >/dev/null || exit 10
+ ./upgrade_TEST_dir/root/usr/bin/testbin1 2>/dev/null && exit 11
+ ./upgrade_TEST_dir/root/usr/bin/testbin2 | grep testbin2 >/dev/null || exit 12
+
+ rm -fr upgrade_TEST_dir/root/usr
+
+done
diff --git a/src/clients/paludis/upgrade_TEST_setup.sh b/src/clients/paludis/upgrade_TEST_setup.sh
index f4c3405fa..fb1a73928 100755
--- a/src/clients/paludis/upgrade_TEST_setup.sh
+++ b/src/clients/paludis/upgrade_TEST_setup.sh
@@ -5,31 +5,39 @@ mkdir upgrade_TEST_dir || exit 1
cd upgrade_TEST_dir || exit 1
mkdir -p build
-mkdir -p config/.paludis-upgrade-test
-cat <<END > config/.paludis-upgrade-test/specpath.conf
+mkdir -p vdb_config/.paludis-upgrade-test
+cat <<END > vdb_config/.paludis-upgrade-test/specpath.conf
root = `pwd`/root
-config-suffix =
+config-suffix = vdb
END
-mkdir -p root/${SYSCONFDIR}/paludis/repositories
-cat <<END > root/${SYSCONFDIR}/paludis/use.conf
+mkdir -p exndbam_config/.paludis-upgrade-test
+cat <<END > exndbam_config/.paludis-upgrade-test/specpath.conf
+root = `pwd`/root
+config-suffix = exndbam
+END
+
+for a in vdb exndbam ; do
+
+ mkdir -p root/${SYSCONFDIR}/paludis${a}/repositories
+ cat <<END > root/${SYSCONFDIR}/paludis${a}/use.conf
*/* foo
END
-cat <<END > root/${SYSCONFDIR}/paludis/licenses.conf
+ cat <<END > root/${SYSCONFDIR}/paludis${a}/licenses.conf
*/* *
END
-cat <<END > root/${SYSCONFDIR}/paludis/keywords.conf
+ cat <<END > root/${SYSCONFDIR}/paludis${a}/keywords.conf
*/* test
END
-cat <<END > root/${SYSCONFDIR}/paludis/bashrc
+ cat <<END > root/${SYSCONFDIR}/paludis${a}/bashrc
export CHOST="my-chost"
export USER_BASHRC_WAS_USED=yes
END
-cat <<END > root/${SYSCONFDIR}/paludis/repositories/repo1.conf
+ cat <<END > root/${SYSCONFDIR}/paludis${a}/repositories/repo1.conf
location = `pwd`/repo1
cache = /var/empty
format = ebuild
@@ -38,7 +46,9 @@ profiles = \${location}/profiles/testprofile
buildroot = `pwd`/build
END
-cat <<END > root/${SYSCONFDIR}/paludis/repositories/installed.conf
+done
+
+cat <<END > root/${SYSCONFDIR}/paludisvdb/repositories/installed.conf
location = \${ROOT}/var/db/pkg
format = vdb
names_cache = /var/empty
@@ -46,10 +56,18 @@ provides_cache = /var/empty
buildroot = `pwd`/build
END
+cat <<END > root/${SYSCONFDIR}/paludisexndbam/repositories/installed.conf
+location = \${ROOT}/var/db/exndbam
+format = exndbam
+buildroot = `pwd`/build
+END
+
mkdir -p root/tmp
touch root/${SYSCONFDIR}/ld.so.conf
mkdir -p root/var/db/pkg
+mkdir -p root/var/db/exndbam
+
mkdir -p repo1/{eclass,distfiles,profiles/testprofile,test-category/target/files} || exit 1
mkdir -p src/target-1