We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aptly cannot handle packages which have control.tar control files instead of control.tar.gz.
control.tar
control.tar.gz
Most gzip implementations are non-deterministic. Since control.tar is supported buy dpkg it should also be supported by aptly.
diff --git a/deb/deb.go b/deb/deb.go index 26db3a1..f5f0c40 100644 --- a/deb/deb.go +++ b/deb/deb.go @@ -44,12 +44,16 @@ func GetControlFileFromDeb(packageFile string) (Stanza, error) { return nil, fmt.Errorf("unable to read .deb archive %s: %s", packageFile, err) } - if header.Name == "control.tar.gz" { - ungzip, err := gzip.NewReader(library) - if err != nil { - return nil, fmt.Errorf("unable to ungzip control file from %s. Error: %s", packageFile, err) + if strings.HasPrefix(header.Name, "control.tar") { + if strings.HasSuffix(header.Name, ".gz") { + ungzip, err := gzip.NewReader(library) + if err != nil { + return nil, fmt.Errorf("unable to ungzip control file from %s. Error: %s", packageFile, err) + } + defer ungzip.Close() + } else { + ungzip := library } - defer ungzip.Close() untar := tar.NewReader(ungzip) for {
The text was updated successfully, but these errors were encountered:
Add deb support for control.tar files
99f70a2
Add support for control archives with no compression. Resolves aptly-dev#632
a76e027
Should be fixed with #658 (already in nightly builds)
Sorry, something went wrong.
No branches or pull requests
Detailed Description
Aptly cannot handle packages which have
control.tar
control files instead ofcontrol.tar.gz
.Context
Most gzip implementations are non-deterministic. Since control.tar is supported buy dpkg it should also be supported by aptly.
Possible Implementation
The text was updated successfully, but these errors were encountered: