summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/sourceresolver.py15
-rwxr-xr-xtests.build/only-build-systems.script28
-rw-r--r--tests.build/only-build-systems.stderr2
-rwxr-xr-xtests.build/setup3
-rwxr-xr-xtests/show-dependencies.setup26
-rw-r--r--yarns/implementations.yarn2
6 files changed, 13 insertions, 63 deletions
diff --git a/morphlib/sourceresolver.py b/morphlib/sourceresolver.py
index 47d9502e..af704945 100644
--- a/morphlib/sourceresolver.py
+++ b/morphlib/sourceresolver.py
@@ -33,7 +33,7 @@ tree_cache_filename = 'trees.cache.pickle'
buildsystem_cache_size = 10000
buildsystem_cache_filename = 'detected-chunk-buildsystems.cache.pickle'
-supported_versions = [0, 1, 2, 3, 4, 5]
+supported_versions = [3, 4, 5]
class PickleCacheManager(object): # pragma: no cover
'''Cache manager for PyLRU that reads and writes to Pickle files.
@@ -320,7 +320,7 @@ class SourceResolver(object):
definitions_checkout_dir, 'VERSION')
if version_file == None:
- return 0 # Assume version 0 if no version file
+ raise InvalidVersionFileError()
version = self._parse_version_file(version_file)
@@ -421,15 +421,8 @@ class SourceResolver(object):
definitions_absref,
path)
if morphology is None:
- if definitions_version > 1:
- raise MorphologyReferenceNotFoundError(
- path, filename)
- else:
- self.status(
- msg="Warning! `%(path)s' referenced in "
- "`%(stratum)s' does not exist",
- path=path,
- stratum=filename)
+ raise MorphologyReferenceNotFoundError(
+ path, filename)
chunk_queue.add((c['repo'], c['ref'], path))
diff --git a/tests.build/only-build-systems.script b/tests.build/only-build-systems.script
deleted file mode 100755
index ae664f7e..00000000
--- a/tests.build/only-build-systems.script
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013,2015 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program 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, see <http://www.gnu.org/licenses/>.
-
-
-## Morph should refuse build a chunk out of the context. Only
-## system and stratum morphologies can be built.
-
-set -eu
-
-! "$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs-repo master hello-stratum
-
-! "$SRCDIR/scripts/test-morph" build-morphology \
- test:chunk-repo farrokh hello
-
diff --git a/tests.build/only-build-systems.stderr b/tests.build/only-build-systems.stderr
deleted file mode 100644
index ac24ab25..00000000
--- a/tests.build/only-build-systems.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-ERROR: In order to build this stratum directly, please give the filename of the system which contains it, and the name of the stratum. See `morph build --help` for more information.
-ERROR: In order to build this chunk directly, please give the filename of the system which contains it, and the name of the chunk. See `morph build --help` for more information.
diff --git a/tests.build/setup b/tests.build/setup
index 4663ff1d..b7dc5074 100755
--- a/tests.build/setup
+++ b/tests.build/setup
@@ -81,6 +81,9 @@ mkdir "$morphsrepo"
cd "$morphsrepo"
git init --quiet
+echo 'version: 5' > VERSION
+git add VERSION
+
cat <<EOF > hello-stratum.morph
name: hello-stratum
kind: stratum
diff --git a/tests/show-dependencies.setup b/tests/show-dependencies.setup
index 38a76722..366da8ad 100755
--- a/tests/show-dependencies.setup
+++ b/tests/show-dependencies.setup
@@ -24,16 +24,9 @@ mkdir "$repo"
cd "$repo"
git init --quiet
-# Add a single source file to simulate compiling
-cat <<EOF > hello.c
-#include <stdio.h>
-int main(void)
-{
- puts("hello, world");
- return 0;
-}
-EOF
-git add hello.c
+echo 'version: 5' > VERSION
+git add VERSION
+git commit --quiet -m "add VERSION file"
# Define a couple of chunk morphologies for the GTK stack
gtkcomponents=(freetype fontconfig cairo pango glib gdk-pixbuf gtk
@@ -52,7 +45,7 @@ install-commands:
EOF
git add $component.morph
done
-git commit --quiet -m "add .c source file and GTK chunk morphologies"
+git commit --quiet -m "add GTK chunk morphologies"
# Define a stratum for the GTK stack
cat <<EOF > gtk-stack.morph
@@ -114,17 +107,6 @@ EOF
git add gtk-stack.morph
git commit --quiet -m "add gtk-stack.morph stratum"
-# Add a single source file to simulate compiling
-cat <<EOF > hello.c
-#include <stdio.h>
-int main(void)
-{
- puts("hello, world");
- return 0;
-}
-EOF
-git add hello.c
-
# Define a couple of chunk morphologies for the GTK stack
xfcecomponents=(xfce4-dev-tools libxfce4util libxfce4ui exo xfconf garcon
thunar tumbler xfce4-panel xfce4-settings xfce4-session
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index a57884ab..52fbd0bb 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -238,6 +238,8 @@ another to hold a chunk.
mkdir "$DATADIR/gits/morphs"
cd "$DATADIR/gits/morphs"
git init .
+ echo 'version: 5' > VERSION
+
arch=$(run_morph print-architecture)
install -m644 -D /dev/stdin << EOF "systems/test-system.morph"
name: test-system