]> git.pld-linux.org Git - packages/rpm.git/blame - gem_helper-spec-arg.patch
- use DSA for package signatures for temporary compatibility with antique crap
[packages/rpm.git] / gem_helper-spec-arg.patch
CommitLineData
7fba62de
ER
1--- rpm-5.4.10/scripts/gem_helper.rb 2013-06-21 09:45:34.619165559 +0300
2+++ rpm-5.4.14/scripts/gem_helper.rb 2013-12-21 19:05:33.801507110 +0200
b53b1f84
ER
3@@ -6,8 +6,9 @@
4 #++
5
6 require 'optparse'
7+require 'rubygems'
8
9-if ARGV[0] == "build" or ARGV[0] == "install"
10+if ARGV[0] == "build" or ARGV[0] == "install" or ARGV[0] == "spec"
11 require 'yaml'
12 require 'zlib'
13
7fba62de 14@@ -65,9 +66,18 @@
b53b1f84
ER
15 body[iv.to_s.gsub(/^@/,'')] = header.instance_variable_get(iv)
16 end
17
18- require 'rubygems'
19 spec = Gem::Specification.from_yaml(YAML.dump(header))
20
21+ if ARGV[0] == "spec"
22+ # Write the .gemspec specification (in Ruby)
23+ file_name = spec.full_name.untaint + '.gemspec'
24+ File.open(file_name, "w") do |file|
25+ file.puts spec.to_ruby_for_cache
26+ end
27+ print "Wrote: %s\n" % file_name
7fba62de 28+ exit(0)
b53b1f84
ER
29+ end
30+
31 if ARGV[0] == "install"
32 system("gem %s %s.gem" % [ARGV.join(' '), spec.full_name])
33 if !keepcache
This page took 0.034801 seconds and 4 git commands to generate.