[DRE-commits] [gem2deb] 01/01: dh-make-ruby: support concurrent dh-make-ruby processes
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri May 19 13:34:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository gem2deb.
commit b810e146312a21cb4b6dc1240e363d5395844222
Author: Dominic Cleal <dominic at cleal.org>
Date: Fri May 19 10:32:33 2017 -0300
dh-make-ruby: support concurrent dh-make-ruby processes
Signed-off-by: Dominic Cleal <dominic at cleal.org>
Signed-off-by: Antonio Terceiro <terceiro at debian.org>
---
debian/changelog | 8 ++++++++
lib/gem2deb/dh_make_ruby.rb | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4b0a4e0..09489d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+gem2deb (0.33.2) UNRELEASED; urgency=medium
+
+ [ Dominic Cleal ]
+ * dh-make-ruby: support concurrent dh-make-ruby processes without one of
+ them botching "gem to package" mapping cache (Closes: #862409)
+
+ -- Antonio Terceiro <terceiro at debian.org> Fri, 19 May 2017 10:28:28 -0300
+
gem2deb (0.33.1) unstable; urgency=medium
* Gem2Deb::GemInstaller:
diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb
index b20d3e3..d0c83a2 100644
--- a/lib/gem2deb/dh_make_ruby.rb
+++ b/lib/gem2deb/dh_make_ruby.rb
@@ -144,11 +144,11 @@ module Gem2Deb
end
if update
- new_cache = cache + '.new'
+ new_cache = cache + ".new.#{$$}"
if system('apt-file search /usr/share/rubygems-integration/ > ' + new_cache)
if File.stat(new_cache).size > 0
system('sed', '-i', '-e', 's#/.*/##; s/-[0-9.]\+.gemspec//', new_cache)
- FileUtils.mv(cache + '.new', cache)
+ FileUtils.mv(new_cache, cache)
else
puts 'E: dh-make-ruby needs an up-to-date apt-file cache in order to map gem names'
puts 'E: to package names but apt-file has an invalid cache. Please run '
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list