b9455818eb
fixed boo#1044087; removed wdm dependency; prevent 'have choice' for rubygem-addressable OBS-URL: https://build.opensuse.org/request/show/519591 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vagrant?expand=0&rev=3
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 3597147739d63a6ed9006ab461bcb92afc8f834f Mon Sep 17 00:00:00 2001
|
|
From: Antonio Terceiro <terceiro@debian.org>
|
|
Date: Sat, 11 Oct 2014 16:55:21 -0300
|
|
Subject: [PATCH] Read data from /usr/share/vagrant
|
|
|
|
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
|
---
|
|
lib/vagrant/shared_helpers.rb | 12 +++++++++++-
|
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/vagrant/shared_helpers.rb b/lib/vagrant/shared_helpers.rb
|
|
index 5522272d3..305d73db1 100644
|
|
--- a/lib/vagrant/shared_helpers.rb
|
|
+++ b/lib/vagrant/shared_helpers.rb
|
|
@@ -85,7 +85,17 @@ module Vagrant
|
|
#
|
|
# @return [Pathname]
|
|
def self.source_root
|
|
- @source_root ||= Pathname.new(File.expand_path('../../../', __FILE__))
|
|
+ @source_root ||=
|
|
+ begin
|
|
+ source = Pathname.new(File.expand_path('../../../', __FILE__))
|
|
+ if source.join('debian/control').exist?
|
|
+ # working inside source package
|
|
+ source
|
|
+ else
|
|
+ # installed
|
|
+ Pathname.new('/usr/share/vagrant')
|
|
+ end
|
|
+ end
|
|
end
|
|
|
|
# This returns the path to the ~/.vagrant.d folder where Vagrant's
|
|
--
|
|
2.13.0
|
|
|