summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/bins.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/morphlib/bins.py b/morphlib/bins.py
index fd0f28d4..05a18b97 100644
--- a/morphlib/bins.py
+++ b/morphlib/bins.py
@@ -101,6 +101,18 @@ def create_stratum(rootdir, f, ex):
tar.close()
+def unpack_binary_from_file(f, dirname, ex): # pragma: no cover
+ '''Unpack a binary into a directory.
+
+ The directory must exist already.
+
+ '''
+
+ tf = tarfile.open(fileobj=f)
+ tf.extractall(path=dirname)
+ tf.close()
+
+
def unpack_binary(filename, dirname, ex):
'''Unpack a binary into a directory.