fpm-cookery 0.30.0 → 0.30.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fpm/cookery/packager.rb +17 -1
- data/lib/fpm/cookery/path.rb +1 -1
- data/lib/fpm/cookery/version.rb +1 -1
- data/spec/path_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01f2d979c1ed4c88bda487ea7612442470a985a7
|
4
|
+
data.tar.gz: 2e343014f3158e19916a2f8cfaf26f714c2f6c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab8313c80b7df62b75c51d811b52f2dd935629714313dfe623e8d0682b7a3f931170a25ea3803b8922c1077e7ec44372a3ecad3719745d5d2a4b9af1f5938626
|
7
|
+
data.tar.gz: 25cfca9d6af24b0c3566b5df6ff7be51246ab046cee4ec02b5492613f2f4e54d312ac66d08bc1a497e7a1ec583f8efce6b03c720c1005df1fcbc11f276114315
|
data/CHANGELOG.md
CHANGED
data/lib/fpm/cookery/packager.rb
CHANGED
@@ -114,7 +114,17 @@ module FPM
|
|
114
114
|
recipe.builddir.mkdir
|
115
115
|
Dir.chdir(recipe.builddir) do
|
116
116
|
recipe.run_lifecycle_hook(:before_source_extraction)
|
117
|
-
|
117
|
+
extract_cookie = extract_cookie_name(package_name)
|
118
|
+
|
119
|
+
# Do not extract source again because it might destroy changes
|
120
|
+
# that have been made to the source. (like patches)
|
121
|
+
if File.exists?(extract_cookie)
|
122
|
+
extracted_source = File.read(extract_cookie).chomp
|
123
|
+
Log.debug "Extract cookie exists, using existing source directory: #{extracted_source}"
|
124
|
+
else
|
125
|
+
extracted_source = source.extract
|
126
|
+
File.open(extract_cookie, 'w', 0644) {|f| f.puts(extracted_source) }
|
127
|
+
end
|
118
128
|
|
119
129
|
if recipe.extracted_source
|
120
130
|
Log.debug "Using custom extracted source dir: #{recipe.builddir(recipe.extracted_source)}"
|
@@ -123,6 +133,8 @@ module FPM
|
|
123
133
|
|
124
134
|
recipe.run_lifecycle_hook(:after_source_extraction, recipe.builddir(extracted_source))
|
125
135
|
|
136
|
+
Log.info "Using source directory: #{extracted_source}"
|
137
|
+
|
126
138
|
Dir.chdir(extracted_source) do
|
127
139
|
#Source::Patches.new(recipe.patches).apply!
|
128
140
|
|
@@ -164,6 +176,10 @@ module FPM
|
|
164
176
|
ENV.replace(env)
|
165
177
|
end
|
166
178
|
|
179
|
+
def extract_cookie_name(name)
|
180
|
+
(recipe.builddir/".extract-cookie-#{name.gsub(/[^\w]/,'_')}").to_s
|
181
|
+
end
|
182
|
+
|
167
183
|
def build_cookie_name(name)
|
168
184
|
(recipe.builddir/".build-cookie-#{name.gsub(/[^\w]/,'_')}").to_s
|
169
185
|
end
|
data/lib/fpm/cookery/path.rb
CHANGED
data/lib/fpm/cookery/version.rb
CHANGED
data/spec/path_spec.rb
CHANGED
@@ -54,6 +54,12 @@ describe "Path" do
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
describe "with a Path argument" do
|
58
|
+
it "returns a new concatenated path object" do
|
59
|
+
expect((path/path).to_s).to eq('/foo/foo')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
57
63
|
describe "with a nil argument" do
|
58
64
|
it "does not modify the path" do
|
59
65
|
expect((path/nil).to_s).to eq('/foo')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fpm-cookery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.30.
|
4
|
+
version: 0.30.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernd Ahlers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|