Bug#405789: rubygems: rubygems is too dumb to recognize debian packages

2009-12-02 Thread Julian Mehnle
I have read

  http://pkg-ruby-extras.alioth.debian.org/rubygems.html

However it isn't clear to me, after a period of almost three years, what 
the current situation is.  Are there any plans for doing something about 
this, however remote?

-Julian


signature.asc
Description: This is a digitally signed message part.


Bug#405789: rubygems: rubygems is too dumb to recognize debian packages

2007-09-05 Thread Lucas Nussbaum
severity 405789 wishlist
tags 405789 - patch
tags 405789 + wontfix
thanks

On 27/05/07 at 17:57 +0900, Daigo Moriwaki wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi, Jürgen
 
 Sorry for the late reply.
 
 Jürgen Strobel wrote:
  Example: 
  
  aptitude install rake rails
  gem install mongrel
  
  gem will insist on installing dependencies, including rake. A really
  nicely patched up rubygems could autodetect the rake package.
 
 Your request is ideal. However, we, Debian developers, have no good solution
 yet. To support integration of rubygems and dpkg for a long time, more
 consideration (not just patch rubygems.rb) is required.

Also, we would probably need to talk with upstream again. Debian isn't
the only distro facing those issues.

Anyway, tagging the bug accordingly.
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#405789: rubygems: rubygems is too dumb to recognize debian packages

2007-05-27 Thread Daigo Moriwaki
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, Jürgen

Sorry for the late reply.

Jürgen Strobel wrote:
 Example: 
 
 aptitude install rake rails
 gem install mongrel
 
 gem will insist on installing dependencies, including rake. A really
 nicely patched up rubygems could autodetect the rake package.

Your request is ideal. However, we, Debian developers, have no good solution
yet. To support integration of rubygems and dpkg for a long time, more
consideration (not just patch rubygems.rb) is required.

Thanks,
Daigo

- --
Daigo Moriwaki
daigo at debian dot org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGWUgCNcPj+ukc0lARAo8gAKDBqY7Tc7cpjsNtdZ5SsijZw0JT4wCgwNp8
Yx1rCHUBacrP0faqxod4h1o=
=H9gX
-END PGP SIGNATURE-




Bug#405789: rubygems: rubygems is too dumb to recognize debian packages

2007-01-06 Thread Jürgen Strobel
Package: rubygems
Version: 0.9.0-5
Severity: normal
Tags: patch

First, it is nice to have rubygems, thank you.

I think since Debian provides rubygems now, it should patch it to be a
bit smarter about installed debian packages which provide the same
functionality as gems.

Example: 

aptitude install rake rails
gem install mongrel

gem will insist on installing dependencies, including rake. A really
nicely patched up rubygems could autodetect the rake package.

I accept, go on, and force gem uninstall rake right afterwards. Now
mongrel doesn't want to start, because it *thinks* there is no rake
available, without even trying.

As a quick and dirty hack, I dropped the attached rubygems.rb in my
$HOME/ruby/lib, added that path to $RUBYLIB, and everything seems to
work just fine. My rubygems.rb wraps the original, and, on
Gem::LoadError, tries to continue nevertheless, which just works if
there are aequivalent files installed by debian packages. If not, it
will fail later with a less descriptive error message.

A second attached version tries to query dpkg to determine if it may
continue or not, but I am not sure this is actually an improvement. 

Now this is a very ugly solution, and I am sure this could be done
better by the rubygems package itself. As a quick fix, you could just
append my file to rubygem's rubygems.rb.

A comprehensive solution would be to have all ruby library packages
install fake geminfo metadata, and rubygems to query that additionally
when resolving dependencies. (Note: I do not want rubygems to
add/remove deb packages, just recognize them!)

Severity set to normal, as the current version of rubygems makes a
mixed Debian-packages + gems system (for libraries) impossible, if any
installed gems depend on installed debs, which is very likely.

regards,
Jürgen Strobel

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (850, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-zerberos-2
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
-- no debconf information

-- 
 The box said it requires Windows 95 or better so I installed Linux
# -*- ruby -*-

#--
# Copyright 2007 by Jürgen Strobel
# Free to use without any restrictions.
#++

# This wraps rubygems.rb.
# The mission is to patch up Gem.activate, so it doesn't complain
# over non existing gems if an aequivalent debian package is installed.
# If gems are installed, they are still used in preference over debs.
# This is crude and pollutes $stderr. YMMV.


require /usr/lib/ruby/1.8/rubygems.rb

module Gem   
  class  self
alias activate_orig_debian activate
def activate(gem, autorequire, *version_requirements)
  activate_orig_debian(gem, autorequire, *version_requirements)
rescue Gem::LoadError = e
  $stderr  Debug: Gem #{gem} not found, trying to continue\n
  return true
end
  end
end
# -*- ruby -*-

#--
# Copyright 2007 by Jürgen Strobel
# Free to use without any restrictions.
#++

# This wraps rubygems.rb.
# The mission is to patch up Gem.activate, so it doesn't complain
# over non existing gems if an aequivalent debian package is installed.
# If gems are installed, they are still used in preference over debs.
# This is crude and pollutes $stderr. YMMV.


require /usr/lib/ruby/1.8/rubygems.rb

module Gem   
  class  self
alias activate_orig_debian activate
def activate(gem, autorequire, *version_requirements)
  activate_orig_debian(gem, autorequire, *version_requirements)
rescue Gem::LoadError = e
  $stderr  Debug: Gem #{gem} not found, maybe we can continue?\n
  `dpkg -l #{gem.name} 2/dev/null | grep '^ii'`
  if $?.success?
$stderr  Debug: #{gem.name}.deb is installed, trying to continue.\n
return true
  end
  f = `dpkg -l lib#{gem.name}*-ruby* 2/dev/null | grep '^ii'`
  if $?.success?
$stderr  Debug: #{f.split[1]}.deb is installed, trying to 
continue.\n
return true
  end
  raise e
end

  end
end


signature.asc
Description: Digital signature