tpkg 2.3.4 → 2.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/tpkg +3 -3
  3. data/lib/tpkg.rb +15 -1
  4. data/lib/tpkg/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16accff9642ba5dbf8083890dfa43bbf35335128
4
- data.tar.gz: f991d4fb37208a27c18a6b2def1509957f0e4586
3
+ metadata.gz: 9c649e51171cd431800496c5b34091c65487515e
4
+ data.tar.gz: 31f1de23c2986e16cf4ec1e299ade9dc8b0d55f6
5
5
  SHA512:
6
- metadata.gz: 9d33886e05eb4edcea9e5ca8b5ebed4da2b2af0eb16df653f6631500e154e7b306a18dc7e38d869c21423eb4d3362c6761c8be7532840b8d956196d973a68d49
7
- data.tar.gz: 4b260550c6723e9bc506af9d98118dfcd7f06822e79a2aefc91cdb4802f7f4dabaaae7d67267ce269457afeac6767590e5f4501f11d6d918e1c424d98c24e4dd
6
+ metadata.gz: 1fef599042e0646e5a64a375439524df7c9c7f339f5e81f542a685bfa0117404c84b571d08d368d01f4f59f575a7575bcfa61b13da1c72072c91b708198bc2bd
7
+ data.tar.gz: 6908cc3974aac908dc47ca650c5154bfce892e1aadcfe41098fe53b6936550327b2f797729ee2d1fe630dc85914e962ad41690a185e4d7661d6c86b4c294ab3c
data/bin/tpkg CHANGED
@@ -445,7 +445,7 @@ end
445
445
  if @groups
446
446
  settings = parse_config_files
447
447
  if settings[:host_group_script]
448
- if !File.executable?(settings[:host_group_script])
448
+ if !File.executable?(settings[:host_group_script].split(' ').first)
449
449
  warn "Warning: host group script #{settings[:host_group_script]} is not executable, execution will likely fail"
450
450
  end
451
451
  servers = []
@@ -844,7 +844,7 @@ when :query_list_files_available
844
844
  elsif File.directory?(pkg[:source])
845
845
  pkgfile = File.join(pkg[:source], pkg[:metadata][:filename])
846
846
  else
847
- pkgfile = download(pkg[:source], pkg[:metadata][:filename], downloaddir)
847
+ pkgfile = tpkg.download(pkg[:source], pkg[:metadata][:filename], downloaddir)
848
848
  end
849
849
  puts "#{pkg[:metadata][:filename]}:"
850
850
  fip = Tpkg.files_in_package(pkgfile)
@@ -1149,7 +1149,7 @@ when :query_tpkg_metadata_available
1149
1149
  elsif File.directory?(pkg[:source])
1150
1150
  pkgfile = File.join(pkg[:source], pkg[:metadata][:filename])
1151
1151
  else
1152
- pkgfile = download(pkg[:source], pkg[:metadata][:filename], downloaddir)
1152
+ pkgfile = tpkg.download(pkg[:source], pkg[:metadata][:filename], downloaddir)
1153
1153
  end
1154
1154
  puts Tpkg::extract_tpkg_metadata_file(pkgfile)
1155
1155
  end
@@ -669,7 +669,21 @@ class Tpkg
669
669
  Dir.mkdir(tmpdir)
670
670
  tmpdir
671
671
  end
672
-
672
+
673
+ # Backward compatibility method. Use tpkg.os.arch instead.
674
+ @@arch = nil
675
+ def self.get_arch
676
+ @@arch = Tpkg::OS.create().arch if @@arch.nil?
677
+ @@arch.dup
678
+ end
679
+
680
+ # Backward compatibility method. Use tpkg.os.os instead.
681
+ @@os = nil
682
+ def self.get_os
683
+ @@os = Tpkg::OS.create().os if @@os.nil?
684
+ @@os.dup
685
+ end
686
+
673
687
  # Given an array of pkgs. Determine if any of those package
674
688
  # satisfy the requirement specified by req
675
689
  def packages_meet_requirement?(pkgs, req)
@@ -1,3 +1,3 @@
1
1
  class Tpkg
2
- VERSION = '2.3.4'
2
+ VERSION = '2.3.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tpkg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Dao
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-10 00:00:00.000000000 Z
12
+ date: 2014-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: facter