mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Added '.xz' reader in HTTP download. This fixed issue when you try to mirror a distribution with only Packages.xz (example 'debian/experimental').
This commit is contained in:
committed by
Andrey Smirnov
parent
ce0001f94c
commit
db8595711b
@@ -3,6 +3,7 @@ package http
|
|||||||
import (
|
import (
|
||||||
"compress/bzip2"
|
"compress/bzip2"
|
||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
|
"github.com/smira/go-xz"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/mxk/go-flowrate/flowrate"
|
"github.com/mxk/go-flowrate/flowrate"
|
||||||
"github.com/smira/aptly/aptly"
|
"github.com/smira/aptly/aptly"
|
||||||
@@ -322,6 +323,10 @@ var compressionMethods = []struct {
|
|||||||
extenstion: ".gz",
|
extenstion: ".gz",
|
||||||
transformation: func(r io.Reader) (io.Reader, error) { return gzip.NewReader(r) },
|
transformation: func(r io.Reader) (io.Reader, error) { return gzip.NewReader(r) },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
extenstion: ".xz",
|
||||||
|
transformation: func(r io.Reader) (io.Reader, error) { return xz.NewReader(r) },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
extenstion: "",
|
extenstion: "",
|
||||||
transformation: func(r io.Reader) (io.Reader, error) { return r, nil },
|
transformation: func(r io.Reader) (io.Reader, error) { return r, nil },
|
||||||
|
|||||||
Reference in New Issue
Block a user