aboutsummaryrefslogtreecommitdiff
path: root/0.8.0/ruby/package_database_TEST_setup.sh
diff options
context:
space:
mode:
Diffstat (limited to '0.8.0/ruby/package_database_TEST_setup.sh')
-rwxr-xr-x0.8.0/ruby/package_database_TEST_setup.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/0.8.0/ruby/package_database_TEST_setup.sh b/0.8.0/ruby/package_database_TEST_setup.sh
new file mode 100755
index 0000000..7ca1693
--- /dev/null
+++ b/0.8.0/ruby/package_database_TEST_setup.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+# vim: set ft=sh sw=4 sts=4 et :
+
+mkdir package_database_TEST_dir || exit 1
+cd package_database_TEST_dir || exit 1
+
+mkdir -p home/.paludis/repositories
+
+cat <<END > home/.paludis/repositories/testrepo.conf
+location = `pwd`/testrepo
+format = portage
+cache = /var/empty
+profiles = \${location}/profiles/testprofile
+END
+
+cat <<END > home/.paludis/keywords.conf
+* test
+~foo/bar-1 ~test
+END
+
+cat <<END > home/.paludis/use.conf
+* enabled
+~foo/bar-1 sometimes_enabled
+END
+
+cat <<END > home/.paludis/licenses.conf
+* *
+END
+
+mkdir -p testrepo/{eclass,distfiles,profiles/testprofile,foo/bar/files} || exit 1
+cd testrepo || exit 1
+echo "testrepo" > profiles/repo_name || exit 1
+cat <<END > profiles/categories || exit 1
+foo
+END
+cat <<END > profiles/testprofile/make.defaults
+ARCH=test
+USERLAND=test
+KERNEL=test
+END
+
+cat <<"END" > foo/bar/bar-1.0.ebuild || exit 1
+DESCRIPTION="Test package"
+HOMEPAGE="http://paludis.berlios.de/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+END
+
+cat <<"END" > foo/bar/bar-2.0.ebuild || exit 1
+DESCRIPTION="Test package"
+HOMEPAGE="http://paludis.berlios.de/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="~test"
+END
+cd ..
+
+