[packages/rpm: 2/4] apply gem_helper-spec-arg.patch to gem_helper.rb

glen glen at pld-linux.org
Thu Dec 18 20:17:31 CET 2014


commit b56af183f570ba9c2b055c65318818ce061a37cb
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Dec 18 20:31:53 2014 +0200

    apply gem_helper-spec-arg.patch to gem_helper.rb

 gem_helper-spec-arg.patch | 33 ---------------------------------
 gem_helper.rb             | 14 ++++++++++++--
 rpm.spec                  |  2 --
 3 files changed, 12 insertions(+), 37 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index e2c401f..dcba258 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -160,7 +160,6 @@ Patch67:	%{name}-repackage-dont-force-max-compression.patch
 Patch70:	python-%{name}sense-missingok.patch
 Patch71:	%{name}-changelog-encoding.patch
 Patch72:	%{name}-preserve-tag-type.patch
-Patch73:	gem_helper-spec-arg.patch
 Patch74:	%{name}-fix-internal-lua-build.patch
 Patch75:	%{name}-double_check_file_deps.patch
 Patch77:	%{name}-lua-expat.patch
@@ -917,7 +916,6 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch70 -p1
 %patch71 -p1
 %patch72 -p1
-%patch73 -p1
 %patch74 -p1
 %patch75 -p1
 %patch77 -p0
diff --git a/gem_helper-spec-arg.patch b/gem_helper-spec-arg.patch
deleted file mode 100644
index 7ddb32f..0000000
--- a/gem_helper-spec-arg.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- rpm-5.4.10/scripts/gem_helper.rb	2013-06-21 09:45:34.619165559 +0300
-+++ rpm-5.4.14/scripts/gem_helper.rb	2013-12-21 19:05:33.801507110 +0200
-@@ -6,8 +6,9 @@
- #++
- 
- require 'optparse'
-+require 'rubygems'
- 
--if ARGV[0] == "build" or ARGV[0] == "install"
-+if ARGV[0] == "build" or ARGV[0] == "install" or ARGV[0] == "spec"
-   require 'yaml'
-   require 'zlib'
- 
-@@ -65,9 +66,18 @@
- 	  body[iv.to_s.gsub(/^@/,'')] = header.instance_variable_get(iv)
-   end
- 
--  require 'rubygems'
-   spec = Gem::Specification.from_yaml(YAML.dump(header))
- 
-+  if ARGV[0] == "spec"
-+    # Write the .gemspec specification (in Ruby)
-+    file_name = spec.full_name.untaint + '.gemspec'
-+    File.open(file_name, "w") do |file|
-+      file.puts spec.to_ruby_for_cache
-+    end
-+    print "Wrote: %s\n" % file_name
-+    exit(0)
-+  end
-+
-   if ARGV[0] == "install"
-     system("gem %s %s.gem" % [ARGV.join(' '), spec.full_name])
-     if !keepcache
diff --git a/gem_helper.rb b/gem_helper.rb
index 6661575..65f45e4 100755
--- a/gem_helper.rb
+++ b/gem_helper.rb
@@ -6,8 +6,9 @@
 #++
 
 require 'optparse'
+require 'rubygems'
 
-if ARGV[0] == "build" or ARGV[0] == "install"
+if ARGV[0] == "build" or ARGV[0] == "install" or ARGV[0] == "spec"
   require 'yaml'
   require 'zlib'
 
@@ -62,9 +63,18 @@ if ARGV[0] == "build" or ARGV[0] == "install"
   file_data.close()
   body = header.instance_variable_get :@ivars
 
-  require 'rubygems'
   spec = Gem::Specification.from_yaml(YAML.dump(header))
 
+  if ARGV[0] == "spec"
+    # Write the .gemspec specification (in Ruby)
+    file_name = spec.full_name.untaint + '.gemspec'
+    File.open(file_name, "w") do |file|
+      file.puts spec.to_ruby_for_cache
+    end
+    print "Wrote: %s\n" % file_name
+    exit(0)
+  end
+
   if ARGV[0] == "install"
     system("gem %s %s.gem" % [ARGV.join(' '), spec.full_name])
     if !keepcache
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/cffc13fad6e80c8609fe8a53e372acacaef98d41



More information about the pld-cvs-commit mailing list