aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-29 00:04:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-29 00:04:40 +0000
commit1ae8b5711de5eb1b50731758ecb575c71ba7b0c0 (patch)
tree0e2df3986dc9465aeb22fdff4a242f781f6f07b9
parentdc03e3e07e966f2bb5927293a180a446b7dff823 (diff)
downloadpaludis-1ae8b5711de5eb1b50731758ecb575c71ba7b0c0.tar.gz
paludis-1ae8b5711de5eb1b50731758ecb575c71ba7b0c0.tar.xz
Declare various variables read only
-rw-r--r--ebuild/builtin_init.bash4
-rw-r--r--paludis/vdb_repository.cc21
-rw-r--r--paludis/vdb_repository.hh37
3 files changed, 62 insertions, 0 deletions
diff --git a/ebuild/builtin_init.bash b/ebuild/builtin_init.bash
index fc4aa04..e735796 100644
--- a/ebuild/builtin_init.bash
+++ b/ebuild/builtin_init.bash
@@ -24,6 +24,7 @@ builtin_init()
DISTDIR KV PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
USERLAND KERNEL ARCH CHOST ; do
[[ -z "${!a}" ]] && die "\$${a} unset or empty"
+ declare -r ${a}="${!a}"
done
for a in FILESDIR ECLASSDIR PORTDIR DISTDIR ; do
@@ -36,12 +37,15 @@ builtin_init()
export WORKDIR="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/work"
mkdir -p "${WORKDIR}" || die "Couldn't create \$WORKDIR (\"${WORKDIR}\")"
+ declare -r WORKDIR="${WORKDIR}"
export T="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/temp/"
mkdir -p "${T}" || die "Couldn't create \$T (\"${T}\")"
+ declare -r T="${T}"
export D="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/image/"
mkdir -p "${D}" || die "Couldn't create \$D (\"${D}\")"
+ declare -r D="${D}"
export S="${WORKDIR}/${P}"
diff --git a/paludis/vdb_repository.cc b/paludis/vdb_repository.cc
new file mode 100644
index 0000000..92b2935
--- /dev/null
+++ b/paludis/vdb_repository.cc
@@ -0,0 +1,21 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006 Ciaran McCreesh <ciaranm@gentoo.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "vdb_repository.hh"
+
diff --git a/paludis/vdb_repository.hh b/paludis/vdb_repository.hh
new file mode 100644
index 0000000..f2590fe
--- /dev/null
+++ b/paludis/vdb_repository.hh
@@ -0,0 +1,37 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006 Ciaran McCreesh <ciaranm@gentoo.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_VDB_REPOSITORY_HH
+#define PALUDIS_GUARD_PALUDIS_VDB_REPOSITORY_HH 1
+
+#include <paludis/repository.hh>
+#include <paludis/util/fs_entry.hh>
+#include <paludis/util/private_implementation_pattern.hh>
+
+namespace paludis
+{
+ class VDBRepository :
+ public Repository,
+ private PrivateImplementationPattern<PortageRepository>
+ {
+
+ };
+}
+
+#endif