summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-06-14 10:31:12 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-06-14 11:32:57 +0000
commit7bd0212869917b0aa32455764b9b763f8e0d64e1 (patch)
treecff4183f748e3d10c39ffac0225bc2c2698e69f5
parent4dfa4af0e796e1e0a66c4e171f1124d4eee3476b (diff)
downloadmorph-7bd0212869917b0aa32455764b9b763f8e0d64e1.tar.gz
morphlib.bins: remove create_stratum
create_stratum is no longer used, since strata are now chunk lists
-rw-r--r--morphlib/bins.py8
-rw-r--r--morphlib/bins_tests.py27
2 files changed, 0 insertions, 35 deletions
diff --git a/morphlib/bins.py b/morphlib/bins.py
index 93aa7b15..0c9ecadf 100644
--- a/morphlib/bins.py
+++ b/morphlib/bins.py
@@ -95,14 +95,6 @@ def create_chunk(rootdir, f, regexps, dump_memory_profile=None):
dump_memory_profile('after removing in create_chunks')
-def create_stratum(rootdir, f):
- '''Create a stratum from the contents of a directory.'''
- logging.debug('Creating stratum file %s from %s' % (f.name, rootdir))
- tar = tarfile.open(fileobj=f, mode='w:gz')
- tar.add(rootdir, arcname='.')
- tar.close()
-
-
def unpack_binary_from_file(f, dirname): # pragma: no cover
'''Unpack a binary into a directory.
diff --git a/morphlib/bins_tests.py b/morphlib/bins_tests.py
index 2da5d047..544e9013 100644
--- a/morphlib/bins_tests.py
+++ b/morphlib/bins_tests.py
@@ -132,30 +132,3 @@ class ChunkTests(BinsTest):
self.assertEqual([x for x,y in self.recursive_lstat(self.instdir)],
['.', 'lib', 'lib/libfoo.so'])
-
-class StratumTests(BinsTest):
-
- def setUp(self):
- self.tempdir = tempfile.mkdtemp()
- self.instdir = os.path.join(self.tempdir, 'inst')
- self.stratum_file = os.path.join(self.tempdir, 'stratum')
- self.stratum_f = open(self.stratum_file, 'wb')
- self.unpacked = os.path.join(self.tempdir, 'unpacked')
-
- def tearDown(self):
- self.stratum_f.close()
- shutil.rmtree(self.tempdir)
-
- def populate_instdir(self):
- os.mkdir(self.instdir)
- os.mkdir(os.path.join(self.instdir, 'bin'))
-
- def test_creates_and_unpacks_stratum_exactly(self):
- self.populate_instdir()
- morphlib.bins.create_stratum(self.instdir, self.stratum_f)
- self.stratum_f.flush()
- os.mkdir(self.unpacked)
- morphlib.bins.unpack_binary(self.stratum_file, self.unpacked)
- self.assertEqual(self.recursive_lstat(self.instdir),
- self.recursive_lstat(self.unpacked))
-