From 7c61729a8cff53f3ae2cb3cc1a76bf89dc2f41f3 Mon Sep 17 00:00:00 2001 From: gfxmonk Date: Sun, 27 Mar 2011 21:30:15 +1100 Subject: [PATCH] Use XML-specified type and start-offset attributes when extracting an archive as part of a recipe --- tests/Recipe.xml | 4 ++-- zeroinstall/injector/fetch.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Recipe.xml b/tests/Recipe.xml index 0a403a5..b172ccf 100644 --- a/tests/Recipe.xml +++ b/tests/Recipe.xml @@ -5,8 +5,8 @@ Recipe - - + + diff --git a/zeroinstall/injector/fetch.py b/zeroinstall/injector/fetch.py index 6ed5f5c..ee249dd 100644 --- a/zeroinstall/injector/fetch.py +++ b/zeroinstall/injector/fetch.py @@ -129,7 +129,10 @@ class Fetcher(object): for step in recipe.steps: stream = streams[step] stream.seek(0) - unpack.unpack_archive_over(step.url, stream, tmpdir, step.extract) + unpack.unpack_archive_over(step.url, stream, tmpdir, + extract = step.extract, + type = step.type, + start_offset = step.start_offset or 0) # Check that the result is correct and store it in the cache store.check_manifest_and_rename(required_digest, tmpdir) tmpdir = None -- 2.11.4.GIT