dr 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/dr +4 -2
- data/lib/dr/repo.rb +12 -0
- data/lib/dr/version.rb +1 -1
- metadata +1 -1
data/bin/dr
CHANGED
@@ -318,12 +318,14 @@ class RepoCLI < ExtendedThor
|
|
318
318
|
rescue Dr::Package::UnableToBuild
|
319
319
|
log :info, ""
|
320
320
|
next
|
321
|
-
|
321
|
+
rescue Exception => e
|
322
|
+
# Handle all other exceptions and try to build next package
|
323
|
+
log :err, e.to_s
|
322
324
|
log :info, ""
|
323
325
|
next
|
324
326
|
end
|
325
327
|
|
326
|
-
if version
|
328
|
+
if version && !repo.suite_has_higher_pkg_version?(suite, pkg, version)
|
327
329
|
repo.push pkg.name, version, suite
|
328
330
|
updated += 1
|
329
331
|
end
|
data/lib/dr/repo.rb
CHANGED
@@ -150,6 +150,18 @@ module Dr
|
|
150
150
|
v
|
151
151
|
end
|
152
152
|
|
153
|
+
def suite_has_higher_pkg_version?(suite, pkg, version)
|
154
|
+
used_versions = get_subpackage_versions(pkg.name)[codename_to_suite(suite)]
|
155
|
+
|
156
|
+
has_higher_version = false
|
157
|
+
used_versions.each do |subpkg_name, subpkg_version|
|
158
|
+
if subpkg_version.to_s >= version.to_s
|
159
|
+
has_higher_version = true
|
160
|
+
end
|
161
|
+
end
|
162
|
+
has_higher_version
|
163
|
+
end
|
164
|
+
|
153
165
|
def get_subpackage_versions(pkg_name)
|
154
166
|
pkg = get_package pkg_name
|
155
167
|
suites = get_suites
|
data/lib/dr/version.rb
CHANGED