Skip to content
New issue

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

Don't fart if an internal API user doesn't specify a compression type for Debian packages. #242

Merged
merged 2 commits into from
Jul 30, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/fpm/package/deb.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def extract_files(package)
datatar = "data.tar.xz" datatar = "data.tar.xz"
compression = "-J" compression = "-J"
else else
raise InvalidPackageConfiguration, raise FPM::InvalidPackageConfiguration,
"Unknown compression type '#{self.attributes[:deb_compression]}' " "Unknown compression type '#{self.attributes[:deb_compression]}' "
"in deb source package #{package}" "in deb source package #{package}"
end end
Expand All @@ -230,7 +230,7 @@ def output(output_path)


# Tar up the staging_path into data.tar.{compression type} # Tar up the staging_path into data.tar.{compression type}
case self.attributes[:deb_compression] case self.attributes[:deb_compression]
when "gzip" when "gzip", nil
datatar = build_path("data.tar.gz") datatar = build_path("data.tar.gz")
compression = "-z" compression = "-z"
when "bzip2" when "bzip2"
Expand All @@ -240,7 +240,7 @@ def output(output_path)
datatar = build_path("data.tar.xz") datatar = build_path("data.tar.xz")
compression = "-J" compression = "-J"
else else
raise InvalidPackageConfiguration, raise FPM::InvalidPackageConfiguration,
"Unknown compression type '#{self.attributes[:deb_compression]}'" "Unknown compression type '#{self.attributes[:deb_compression]}'"
end end
safesystem(tar_cmd, "-C", staging_path, compression, "-cf", datatar, ".") safesystem(tar_cmd, "-C", staging_path, compression, "-cf", datatar, ".")
Expand Down