[DRE-maint] Bug#955405: Problem is with ruby-bundler package

Andy Allan andy at gravitystorm.co.uk
Thu Jan 21 11:08:04 GMT 2021


This isn't a problem in the ruby-thor package (although it could do with
an update). This is a problem with the ruby-bundler package.

Specifically, the upstream bundler codebase vendors Thor under a
separate namespace (Bundler::Thor) to avoid this specific issue. Bundler
itself needs Thor, but many projects do too. So to make something like
"bundle exec (whatever)" work, without version clashes, bundler uses a
different namespace for its internal copy of Thor.

The Debian/Ubuntu ruby-bundler package is broken though, since it rips
out the carefully vendored code in a specific namespace, and uses
ruby-thor in the Thor namespace instead.

Here is the patch that causes the issue:

From: Christian Hofstaedtler <zeha at debian.org>
Date: Thu, 15 Mar 2018 14:51:43 +0100
Subject: Replace bundled libraries with system versions
Forwarded: not-needed

--- a/lib/bundler/vendored_molinillo.rb
+++ b/lib/bundler/vendored_molinillo.rb
@@ -1,4 +1,4 @@
 # frozen_string_literal: true

 module Bundler; end
-require_relative "vendor/molinillo/lib/molinillo"
+require "molinillo"
--- a/lib/bundler/vendored_thor.rb
+++ b/lib/bundler/vendored_thor.rb
@@ -2,7 +2,7 @@

 module Bundler
   def self.require_thor_actions
-    require_relative "vendor/thor/lib/thor/actions"
+    require "thor/actions"
   end
 end
-require_relative "vendor/thor/lib/thor"
+require "thor"



More information about the Pkg-ruby-extras-maintainers mailing list