mixlib-install 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da86da1678b6aef5defbe82060f7476caa1f62e7
4
- data.tar.gz: fad6d57bd932742b690beaed6d1dba6f5f2061eb
3
+ metadata.gz: f4bbebe8c34d32ee85913bbc2909706b61eae0c1
4
+ data.tar.gz: 8bacb078f62eac0966167958adb11042aec45790
5
5
  SHA512:
6
- metadata.gz: bdf236b22604381394f24df9d0182eb2881ffc6964e2879ab5c3d20c8b21a494ec8cc2b1eb38460fc762cd0bf449986ce6c68ed1fd847b75caa70326834ac983
7
- data.tar.gz: 4d5d547af2ad2429a35a327cb3f8680277c43973ce0dded009767780c128dc5a47e8e0e8b32582be9dfe2aca98e2fdfa22110b78cda24a21d4c946f6cce51ac0
6
+ metadata.gz: 3b614b75aa5bafd8f8f75b472628f4a452a2c343d83df7738c1b5c02eceb615cf7fcc4bc50ccf01d7110551db7c84ea384c0571e9783195d309a01e5ea751177
7
+ data.tar.gz: 6921b10c9c5d86b4cecd87ac2ddd88c319d115684d7afa8d6fa76973bf01ef8d9dd009beae092511b27698a07ca6380df86a154fd65c6fe79d9617e046d599f6
data/CHANGELOG.md CHANGED
@@ -1,13 +1,10 @@
1
1
  # Change Log
2
- This change log follows the principles
3
- outlined from [Keep a CHANGELOG](http://keepachangelog.com/).
4
2
 
5
- All notable changes to this project will be documented in this file.
6
- This project adheres to [Semantic Versioning](http://semver.org/).
7
-
8
- ## [Unreleased]
3
+ ## [1.0.2]
4
+ ### Added
5
+ - Use 32 bit windows artifacts for 64-bit, when there is no 64-bit native artifact.
9
6
 
10
- ## [1.0.1] - 2016-03-31
7
+ ## [1.0.1]
11
8
  ### Fixed
12
9
  - detect_platform method for Windows
13
10
 
@@ -16,11 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
16
13
  - wait for msiexec to exit
17
14
  - Replace md5sum checks with sha256 checks in install_command.ps1
18
15
 
19
- ## [1.0.0] - 2016-03-30
16
+ ## [1.0.0]
20
17
  ### Added
21
18
  - Ability to query product artifacts from multiple channels
22
19
  - Ability to generate installation scripts for `sh` and `ps1`
23
-
24
- [Unreleased]: https://github.com/chef/mixlib-install/compare/v1.0.1...HEAD
25
- [1.0.1]: https://github.com/chef/mixlib-install/compare/v1.0.0...v1.0.1
26
- [1.0.0]: https://github.com/chef/mixlib-install/compare/v0.7.1...v1.0.0
@@ -74,6 +74,10 @@ module Mixlib
74
74
  architecture: architecture,
75
75
  }
76
76
  end
77
+
78
+ def clone_with(data)
79
+ ArtifactInfo.new(self.to_hash.merge(data))
80
+ end
77
81
  end
78
82
  end
79
83
  end
@@ -126,7 +126,43 @@ module Mixlib
126
126
  end
127
127
 
128
128
  # Convert results to build records
129
- results.map { |a| create_artifact(a) }
129
+ results.map! { |a| create_artifact(a) }
130
+
131
+ windows_artifact_fixup!(results)
132
+ end
133
+
134
+ # On windows, if we do not have a native 64-bit package available
135
+ # in the discovered artifacts, we will make 32-bit artifacts available
136
+ # for 64-bit architecture.
137
+ def windows_artifact_fixup!(artifacts)
138
+ new_artifacts = [ ]
139
+ native_artifacts = [ ]
140
+
141
+ artifacts.each do |r|
142
+ next if r.platform != "windows"
143
+
144
+ # Store all native 64-bit artifacts and clone 32-bit artifacts to
145
+ # be used as 64-bit.
146
+ case r.architecture
147
+ when "i386"
148
+ new_artifacts << r.clone_with(architecture: "x86_64")
149
+ when "x86_64"
150
+ native_artifacts << r.clone
151
+ else
152
+ puts "Unknown architecture '#{r.architecture}' for windows."
153
+ end
154
+ end
155
+
156
+ # Now discard the cloned artifacts if we find an equivalent native
157
+ # artifact
158
+ native_artifacts.each do |r|
159
+ new_artifacts.delete_if do |x|
160
+ x.platform_version == r.platform_version
161
+ end
162
+ end
163
+
164
+ # add the remaining cloned artifacts to the original set
165
+ artifacts += new_artifacts
130
166
  end
131
167
 
132
168
  #
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Install
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-install
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May