dr 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dr/gitpackage.rb +11 -6
- data/lib/dr/pkgversion.rb +3 -0
- data/lib/dr/repo.rb +3 -1
- data/lib/dr/version.rb +1 -1
- metadata +2 -2
data/lib/dr/gitpackage.rb
CHANGED
@@ -78,16 +78,16 @@ module Dr
|
|
78
78
|
log :info, "Re-downloading the source repository of " +
|
79
79
|
"#{@name.style "pkg-name"}"
|
80
80
|
Dir.mktmpdir do |tmp|
|
81
|
-
git_cmd = "git clone --mirror --branch #{
|
81
|
+
git_cmd = "git clone --mirror --branch #{branch} " +
|
82
82
|
"#{git_addr} #{tmp}/git"
|
83
83
|
ShellCmd.new git_cmd, :tag => "git", :show_out => true
|
84
84
|
|
85
85
|
src_dir = "#{tmp}/src"
|
86
86
|
FileUtils.mkdir_p src_dir
|
87
87
|
|
88
|
-
checkout branch, src_dir
|
88
|
+
checkout branch, src_dir, "#{tmp}/git"
|
89
89
|
|
90
|
-
unless File.exists? "#{
|
90
|
+
unless File.exists? "#{src_dir}/debian/control"
|
91
91
|
log :err, "The debian packaging files not found in the repository"
|
92
92
|
raise "Adding a package from #{git_addr} failed"
|
93
93
|
end
|
@@ -143,6 +143,11 @@ module Dr
|
|
143
143
|
|
144
144
|
version = nil
|
145
145
|
|
146
|
+
unless get_rev branch
|
147
|
+
log :err, "Branch #{branch.fg "blue"} not found in #{@name.style "pkg-name"}"
|
148
|
+
raise "The requested branch doesn't exist in the repository!"
|
149
|
+
end
|
150
|
+
|
146
151
|
orig_rev, curr_rev = update_from_origin branch
|
147
152
|
log :info, "Branch #{branch.fg "blue"}, revision #{curr_rev[0..7].fg "blue"}"
|
148
153
|
unless force
|
@@ -205,7 +210,7 @@ module Dr
|
|
205
210
|
end
|
206
211
|
|
207
212
|
if repo_arches.length == 0
|
208
|
-
log :
|
213
|
+
log :err, "#{@name.style "pkg-name"} cannot be build for any of " +
|
209
214
|
"the architectures supported by this repository"
|
210
215
|
raise "Unable to build the package for this repository"
|
211
216
|
end
|
@@ -424,9 +429,9 @@ EOS
|
|
424
429
|
end
|
425
430
|
end
|
426
431
|
|
427
|
-
def checkout(branch, dir)
|
432
|
+
def checkout(branch, dir, override_git_dir=@git_dir)
|
428
433
|
log :info, "Extracting the sources"
|
429
|
-
git_cmd ="git --git-dir #{
|
434
|
+
git_cmd ="git --git-dir #{override_git_dir} --bare archive " +
|
430
435
|
"--format tar #{branch} | tar x -C #{dir}"
|
431
436
|
ShellCmd.new git_cmd, :tag => "git", :show_out => true
|
432
437
|
end
|
data/lib/dr/pkgversion.rb
CHANGED
data/lib/dr/repo.rb
CHANGED
@@ -9,6 +9,7 @@ require "dr/logger"
|
|
9
9
|
require "dr/gnupg"
|
10
10
|
require "dr/buildroot"
|
11
11
|
require "dr/utils"
|
12
|
+
require "dr/pkgversion"
|
12
13
|
|
13
14
|
require "fileutils"
|
14
15
|
require "yaml"
|
@@ -251,7 +252,8 @@ module Dr
|
|
251
252
|
|
252
253
|
is_of_higher_version = true
|
253
254
|
names.each do |name|
|
254
|
-
if used_versions.has_key?(name) &&
|
255
|
+
if used_versions.has_key?(name) &&
|
256
|
+
PkgVersion.new(version) <= PkgVersion.new(used_versions[name])
|
255
257
|
is_of_higher_version = false
|
256
258
|
end
|
257
259
|
end
|
data/lib/dr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|