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] |
2011/5/14 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>: > Bart, All, > > On Saturday 14 May 2011 16:01:33 Bart vdr. Meulen wrote: >> # HG changeset patch >> # User Bart vdr. Meulen <bartvdrmeulen@gmail.com> >> # Date 1305381590 -7200 >> # Node ID 96c4998fad3b0a6a3f3f445cc5d54676174d3039 >> # Parent ?29bc634855fcd7ea543b5ff972fb4382f0620ea8 >> Add support for tar.lzma files > > lzma has never been really maintstream in distros, and now xzutils are > set to replace it. xzutils also supports lzma, of course. > I'd rather have we use xz (the program!) instead of lzma (ditto). > At the same time, could you also add support for .xz tarballs? Cheers! > >> Some packages have switch too the lzma format, add support to download >> package with tar.lzma format and extract them. >> The extract is done in two stages, because I was unable to get the >> command "lzma -c -d <file> | tar x" working > > man tar > ?--> --use-compress-program Thanks, I didn't know about that command and take a look at it, and try to update the patch, > >> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> >> --- >> ?scripts/functions | ? 10 +++++++--- >> ?1 files changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/scripts/functions b/scripts/functions >> --- a/scripts/functions >> +++ b/scripts/functions >> @@ -410,7 +410,7 @@ >> ? ? ?# we need to also check for an empty extension for those very >> ? ? ?# peculiar components that don't have one (such as sstrip from >> ? ? ?# buildroot). >> - ? ?for ext in ${first_ext} .tar.gz .tar.bz2 .tgz .tar /.git ''; do >> + ? ?for ext in ${first_ext} .tar.gz .tar.bz2 .tgz .tar.lzma .tar /.git ''; do > > As lzma/xz generate more compact archives, that's what we should try to > download first, no? > > Which also points to an error above, .tar.bz2 should be before .tar.gz > (my fault!). > >> ? ? ? ? ?if [ -e "${CT_TARBALLS_DIR}/${file}${ext}" ]; then >> ? ? ? ? ? ? ?echo "${ext}" >> ? ? ? ? ? ? ?exit 0 >> @@ -479,7 +479,7 @@ >> ? ? ? ? ?CT_DoLog DEBUG "Trying to retrieve an already downloaded copy of '${basename}'" >> ? ? ? ? ?# We'd rather have a bzip2'ed tarball, then gzipped tarball, plain tarball, >> ? ? ? ? ?# or, as a failover, a file without extension. >> - ? ? ? ?for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do >> + ? ? ? ?for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar.lzma .tar ''; do > > Order: ditto. > >> ? ? ? ? ? ? ?CT_DoLog DEBUG "Trying '${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}'" >> ? ? ? ? ? ? ?if [ -r "${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}" -a \ >> ? ? ? ? ? ? ? ? ? "${CT_FORCE_DOWNLOAD}" != "y" ]; then >> @@ -553,7 +553,7 @@ >> ? ? ?# Scan all URLs in turn, and try to grab a tarball from there >> ? ? ?# Do *not* try git trees (ext=/.git), this is handled in a specific >> ? ? ?# wrapper, below >> - ? ?for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do >> + ? ?for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar.lzma .tar ''; do > > Order: ditto. > >> ? ? ? ? ?# Try all urls in turn >> ? ? ? ? ?for url in ${URLS}; do >> ? ? ? ? ? ? ?CT_DoLog DEBUG "Trying '${url}/${file}${ext}'" >> @@ -725,6 +725,10 @@ >> ? ? ?case "${ext}" in >> ? ? ? ? ?.tar.bz2) ? ? CT_DoExecLog FILE tar xvjf "${full_file}";; >> ? ? ? ? ?.tar.gz|.tgz) CT_DoExecLog FILE tar xvzf "${full_file}";; >> + ? ? .tar.lzma) ? ?CT_DoExecLog FILE lzma -d "${full_file}" >> + ? ? ? ? ? ? ? ? ? CT_DoExecLog FILE tar xf "${CT_TARBALLS_DIR}/${basename}.tar" >> + ? ? ? ? ? ? ? ? ? CT_DoExecLog FILE rm "${CT_TARBALLS_DIR}/${basename}.tar" >> + ? ? ? ? ? ? ? ? ? ;; > > Use --use-compress-program. > Use spaces, not tabs. > >> ? ? ? ? ?.tar) ? ? ? ? CT_DoExecLog FILE tar xvf ?"${full_file}";; >> ? ? ? ? ?/.git) ? ? ? ?CT_ExtractGit "${basename}" "${@}";; >> ? ? ? ? ?*) ? ? ? ? ? ?CT_Abort "Don't know how to handle '${basename}${ext}': unknown extension";; >> > > Otherwise, good. :-) > > Regards, > Yann E. MORIN. > > -- > .-----------------.--------------------.------------------.--------------------. > | ?Yann E. MORIN ?| Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | > | +33 662 376 056 | Software ?Designer | \ / CAMPAIGN ? ? | ?___ ? ? ? ? ? ? ? | > | +33 223 225 172 `------------.-------: ?X ?AGAINST ? ? ?| ?\e/ ?There is no ?| > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL ? ?| ? v ? conspiracy. ?| > '------------------------------^-------^------------------^--------------------' > -- 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] |