- Fix the links in /etc/alternatives not to point to themselves

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby-common?expand=0&rev=112
This commit is contained in:
Stephan Kulow 2021-07-08 12:10:56 +00:00 committed by Git OBS Bridge
parent e5361093c1
commit abbc00ff16
2 changed files with 9 additions and 3 deletions

View File

@ -246,13 +246,14 @@ if options.symlinkbinaries && File.exists?(bindir)
unversioned = map_executable(options, unversioned)
File.rename(default_path, full_versioned)
patchfile(full_versioned, />= 0(\.a)?/, "= #{options.gemversion}")
link_target = File.join(Gem.bindir, full_versioned)
# unversioned
[unversioned, ruby_versioned, gem_versioned].each do |linkname|
full_path = File.join(br_ua_dir, linkname)
ua_path = File.join(options.ua_dir, linkname)
GILogger.info "Linking '#{linkname}' to '#{full_path}'"
File.symlink(linkname, full_path) unless File.symlink? full_path
GILogger.info "Linking '#{ua_path}' to '#{linkname}'"
GILogger.info "Symlinking '#{full_path} -> '#{linkname}'"
File.symlink(link_target, full_path) unless File.symlink? full_path
GILogger.info "Symlinking '#{linkname}' -> '#{ua_path}'"
File.symlink(ua_path, linkname) unless File.symlink? linkname
end
end

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 8 12:10:25 UTC 2021 - Stephan Kulow <coolo@suse.com>
- Fix the links in /etc/alternatives not to point to themselves
-------------------------------------------------------------------
Tue Jan 26 01:46:30 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>