Skip to content

Commit

Permalink
option to add a extra packages from a directory into the staging dire…
Browse files Browse the repository at this point in the history
…ctory (for the yum repository)
  • Loading branch information
erikogan committed Nov 27, 2010
1 parent 044be49 commit 0329e14
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rpm/release/build.rb
Expand Up @@ -117,6 +117,11 @@ def noisy_system(*args)
stage_dir = v
end

opts.on('-e', '--extra-packages DIR', "Directory for extra packages to install.") do |v|
#mock_repo_dir = v
options[:extra_packages] = v
end

opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
Expand Down Expand Up @@ -208,6 +213,9 @@ def noisy_system(*args)
FileUtils.mkdir_p(idir, :verbose => @verbosity > 0)
FileUtils.cp(Dir["#{mock_base_dir}/#{pcfg}/result/*.rpm"],
idir, :verbose => @verbosity > 0)
if options.key?(:extra_packages)
FileUtils.cp(Dir["#{options[:extra_packages]}/*.rpm"], idir, :verbose => @verbosity > 0)
end
FileUtils.rm_f(Dir["#{idir}/*.src.rpm"], :verbose => @verbosity > 1) unless options.key?(:single)
end

Expand Down

0 comments on commit 0329e14

Please sign in to comment.