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.
Files changed (4) hide show
  1. data/bin/dr +4 -2
  2. data/lib/dr/repo.rb +12 -0
  3. data/lib/dr/version.rb +1 -1
  4. 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
- else # Ignore all other exceptions and try to build next package
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
@@ -1,3 +1,3 @@
1
1
  module Dr
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
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: 0.1.12
4
+ version: 0.1.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: