pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/rubygems Fix bug in the interaction between --bui...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/69e1f68e0259
branches:  trunk
changeset: 539739:69e1f68e0259
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Mar 12 15:07:47 2008 +0000

description:
Fix bug in the interaction between --build-root and --remote noted in:

http://rubyforge.org/pipermail/rubygems-developers/2006-June/002010.html

If --build-root is specified, then any remote gems are now downloaded
into the "cache" directory under the buildroot.

Bump PKGREVISION to 2.

diffstat:

 misc/rubygems/Makefile         |   4 ++--
 misc/rubygems/distinfo         |   4 ++--
 misc/rubygems/patches/patch-ab |  23 +++++++++++++++++++++--
 3 files changed, 25 insertions(+), 6 deletions(-)

diffs (68 lines):

diff -r 2535ab524a62 -r 69e1f68e0259 misc/rubygems/Makefile
--- a/misc/rubygems/Makefile    Wed Mar 12 14:26:33 2008 +0000
+++ b/misc/rubygems/Makefile    Wed Mar 12 15:07:47 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2008/03/08 03:37:55 jlam Exp $
+# $NetBSD: Makefile,v 1.16 2008/03/12 15:07:47 jlam Exp $
 
 DISTNAME=      rubygems-1.0.1
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    misc ruby
 MASTER_SITES=  http://rubyforge.org/frs/download.php/29548/
 EXTRACT_SUFX=  .tgz
diff -r 2535ab524a62 -r 69e1f68e0259 misc/rubygems/distinfo
--- a/misc/rubygems/distinfo    Wed Mar 12 14:26:33 2008 +0000
+++ b/misc/rubygems/distinfo    Wed Mar 12 15:07:47 2008 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.13 2008/03/08 00:43:55 jlam Exp $
+$NetBSD: distinfo,v 1.14 2008/03/12 15:07:47 jlam Exp $
 
 SHA1 (rubygems-1.0.1.tgz) = 232750fa59917ea9baf03797fdb10a22d29ebad9
 RMD160 (rubygems-1.0.1.tgz) = b75fdf2aa252f84972495502b4b91f9e6d4c7e7c
 Size (rubygems-1.0.1.tgz) = 246165 bytes
 SHA1 (patch-aa) = 10cd33875708ec59e0a2c4a7f644de999860e810
-SHA1 (patch-ab) = d2200897be3646448005d2c8dfd1d1a0cfdaa202
+SHA1 (patch-ab) = bb20e3613e59ccc5b83c18e865eb5d7fc043c45c
 SHA1 (patch-ac) = 28f9792eda2a8e9c9fd80f0de551c5228c623432
 SHA1 (patch-ad) = 46718895573a6d6e82a1df6eb38aa93a22aeaa87
 SHA1 (patch-ae) = e33e4ffa7fba3e73f62cc234d0aebe38f7cb242d
diff -r 2535ab524a62 -r 69e1f68e0259 misc/rubygems/patches/patch-ab
--- a/misc/rubygems/patches/patch-ab    Wed Mar 12 14:26:33 2008 +0000
+++ b/misc/rubygems/patches/patch-ab    Wed Mar 12 15:07:47 2008 +0000
@@ -1,6 +1,8 @@
-$NetBSD: patch-ab,v 1.4 2008/03/08 00:43:55 jlam Exp $
+$NetBSD: patch-ab,v 1.5 2008/03/12 15:07:47 jlam Exp $
 
 Patch by Marcus Rueckert for staged installation of gems.
+Additional changes by Johnny C. Lam to download remote gems
+into the cache directory in @build_root if specified.
 
 --- lib/rubygems/dependency_installer.rb.orig  2007-12-17 22:45:04.000000000 -0500
 +++ lib/rubygems/dependency_installer.rb
@@ -12,7 +14,24 @@
      @security_policy = options[:security_policy]
      @wrappers = options[:wrappers]
  
-@@ -230,6 +231,7 @@ class Gem::DependencyInstaller
+@@ -121,9 +122,14 @@ class Gem::DependencyInstaller
+   # always replaced.
+   def download(spec, source_uri)
+     gem_file_name = "#{spec.full_name}.gem"
+-    local_gem_path = File.join @install_dir, 'cache', gem_file_name
++    installdir = @install_dir
++    unless @build_root.nil? or @build_root == ""
++      installdir = File.join(@build_root, @install_dir)
++    end
++
++    local_gem_path = File.join installdir, 'cache', gem_file_name
+ 
+-    Gem.ensure_gem_subdirectories @install_dir
++    Gem.ensure_gem_subdirectories installdir
+ 
+     source_uri = URI.parse source_uri unless URI::Generic === source_uri
+     scheme = source_uri.scheme
+@@ -230,6 +236,7 @@ class Gem::DependencyInstaller
                                  :format_executable => @format_executable,
                                  :ignore_dependencies => @ignore_dependencies,
                                  :install_dir => @install_dir,



Home | Main Index | Thread Index | Old Index