From bcf8074f316fddc513dc796bc1a3f31f7cc7be0c Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 10 Apr 2015 22:24:45 +0300 Subject: [PATCH] Revert "Use Go native lzma implementation, so that there are no external dependencies. #142" This reverts commit 709e14ecc1433da755e6d7be5cc98d493258c8e3. --- Gomfile | 2 +- deb/deb.go | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Gomfile b/Gomfile index 6656d2a0..6de98ab3 100644 --- a/Gomfile +++ b/Gomfile @@ -15,7 +15,7 @@ gom 'github.com/smira/commander', :commit => 'f408b00e68d5d6e21b9f18bd310978dafc gom 'github.com/smira/flag', :commit => '357ed3e599ffcbd4aeaa828e1d10da2df3ea5107' gom 'github.com/smira/go-ftp-protocol/protocol', :commit => '066b75c2b70dca7ae10b1b88b47534a3c31ccfaa' gom 'github.com/smira/go-uuid/uuid', :commit => 'ed3ca8a15a931b141440a7e98e4f716eec255f7d' -gom 'github.com/uli-go/xz/lzma', :commit => 'e29b1fc5cb69750cf19ab6049d2238b274a2e39f' +gom 'github.com/smira/lzma', :commit => '2a7c55cad4a2d02ab972a03357db5760833a49bc' gom 'github.com/syndtr/gosnappy/snappy', :commit => 'ce8acff4829e0c2458a67ead32390ac0a381c862' gom 'github.com/syndtr/goleveldb/leveldb', :commit => '97e257099d2ab9578151ba85e2641e2cd14d3ca8' gom 'github.com/ugorji/go/codec', :commit => '71c2886f5a673a35f909803f38ece5810165097b' diff --git a/deb/deb.go b/deb/deb.go index 58bc12e8..f452cb50 100644 --- a/deb/deb.go +++ b/deb/deb.go @@ -8,7 +8,7 @@ import ( "github.com/mkrautz/goar" "github.com/remyoudompheng/go-liblzma" "github.com/smira/aptly/utils" - "github.com/uli-go/xz/lzma" + "github.com/smira/lzma" "io" "os" "strings" @@ -141,10 +141,8 @@ func GetContentsFromDeb(packageFile string) ([]string, error) { defer unxz.Close() tarInput = unxz case "data.tar.lzma": - unlzma, err := lzma.NewReader(library) - if err != nil { - return nil, fmt.Errorf("unable to unlzma: %s", err) - } + unlzma := lzma.NewReader(library) + defer unlzma.Close() tarInput = unlzma default: return nil, fmt.Errorf("unsupported tar compression: %s", header.Name)