Permalink
Browse files

Log successful creation for any package target.

Remove now-duplicate "Created ..." log messages in rpm & deb outputs.
  • Loading branch information...
jordansissel committed Feb 10, 2014
1 parent 7c19d6a commit a40eaec12025191169d0e4695bef1341bed8547e
Showing with 3 additions and 4 deletions.
  1. +3 −1 lib/fpm/command.rb
  2. +0 −1 lib/fpm/package/deb.rb
  3. +0 −2 lib/fpm/package/rpm.rb
View
@@ -385,8 +385,9 @@ def execute
# Write the output somewhere, package can be nil if no --package is specified,
# and that's OK.
+ package_file = output.to_s(package)
begin
- output.output(output.to_s(package))
+ output.output(package_file)
rescue FPM::Package::FileAlreadyExists => e
@logger.fatal(e.message)
return 1
@@ -395,6 +396,7 @@ def execute
return 1
end
+ @logger.log("Created package", :path => package_file)
return 0
rescue FPM::Util::ExecutableNotFound => e
@logger.error("Need executable '#{e}' to convert #{input_type} to #{output_type}")
View
@@ -406,7 +406,6 @@ def output(output_path)
safesystem("ar", "-qc", output_path, "debian-binary", "control.tar.gz", datatar)
end
end
- @logger.log("Created deb package", :path => output_path)
end # def output
def converted_from(origin)
View
@@ -383,8 +383,6 @@ def output(output_path)
# This should only output one rpm, should we verify this?
FileUtils.cp(rpmpath, output_path)
end
-
- @logger.log("Created rpm", :path => output_path)
end # def output
def prefix

0 comments on commit a40eaec

Please sign in to comment.