This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] scripts: support fetching and extracting .deb files


# HG changeset patch
# User Michael Hope <michael.hope@linaro.org>
# Date 1321238248 -46800
# Branch prebuilt-sysroot
# Node ID 20bc56e72ca1559279b3c9c9b191d41061757653
# Parent  3cd375ecdd7213104577bbd70863fa35f387bb93
scripts: support fetching and extracting .deb files

Debian .deb files are 'ar' style archives containing data and control
tarballs.  Extract using ar itself instead of dpkg-deb to be more
portable.

I couldn't figure out how to log the output without creating a
temporary file.  Skip the log to make the script cleaner.

Signed-off-by: Michael Hope <michael.hope@linaro.org>

diff -r 3cd375ecdd72 -r 20bc56e72ca1 scripts/functions
--- a/scripts/functions	Sun Nov 13 18:24:36 2011 +0100
+++ b/scripts/functions	Mon Nov 14 15:37:28 2011 +1300
@@ -410,6 +410,7 @@
     printf ".tar.bz2\n"
     printf ".tar.gz\n.tgz\n"
     printf ".tar\n"
+    printf ".deb\n"
 }
 
 # Get the file name extension of a component
@@ -772,6 +773,7 @@
         .tar.gz|.tgz) CT_DoExecLog FILE tar "${tar_opts[@]}" -z -f "${full_file}";;
         .tar)         CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;
         /.git)        CT_ExtractGit "${basename}" "${@}";;
+        .deb)         ar p "${full_file}" data.tar.gz | tar -xv -z -C "${basename}" -f -;;
         *)            CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
                       return 1
                       ;;

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]