rbbt-util 5.23.28 → 5.23.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt-util.rb +0 -1
- data/lib/rbbt/util/open.rb +1 -1
- data/lib/rbbt/workflow/step.rb +2 -1
- data/lib/rbbt/workflow/step/run.rb +9 -3
- data/share/install/software/lib/install_helpers +49 -5
- data/share/rbbt_commands/stat/compare_lists +50 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d79b37d85261eb8752a28f32688774224fc9d99f
|
4
|
+
data.tar.gz: 3d3b98478b25ef4185166e437bcf40deedffcd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d82e5d8c6f47d92b887d757e8f6f317fb4fd5284f756027de4a70ecaf785d4577e8f13b854d549969d122069adccc7e5b7e7e497ba9af5e6adf1d51ce9903694
|
7
|
+
data.tar.gz: c6e7f5d41afd0fb98004bdcc01a8b1d5a4576d5f68b42e753d0be302e63b7baa97fc8cea4e252300bf6176841f2793e533130c398365b58bc637a30c60b17ca5
|
data/lib/rbbt-util.rb
CHANGED
data/lib/rbbt/util/open.rb
CHANGED
data/lib/rbbt/workflow/step.rb
CHANGED
@@ -32,6 +32,7 @@ class Step
|
|
32
32
|
|
33
33
|
def overriden
|
34
34
|
if @overriden.nil?
|
35
|
+
return [] if dependencies.nil?
|
35
36
|
dependencies.select{|dep| dep.overriden }.any?
|
36
37
|
else
|
37
38
|
@overriden
|
@@ -325,7 +326,7 @@ class Step
|
|
325
326
|
|
326
327
|
# A step result with no info_file means that it was manually
|
327
328
|
# placed. In that case, do not consider its dependencies
|
328
|
-
return [] if not (defined? WorkflowRESTClient and WorkflowRESTClient::RemoteStep === self) and Open.exists?(self.
|
329
|
+
return [] if not (defined? WorkflowRESTClient and WorkflowRESTClient::RemoteStep === self) and not Open.exists?(self.info_file) and Open.exists?(self.path.to_s)
|
329
330
|
|
330
331
|
return [] if dependencies.nil? or dependencies.empty?
|
331
332
|
|
@@ -141,18 +141,24 @@ class Step
|
|
141
141
|
outdated_time = []
|
142
142
|
outdated_dep = []
|
143
143
|
canfail_paths = self.canfail_paths
|
144
|
+
this_mtime = Open.mtime(self.path) if Open.exists?(self.path)
|
145
|
+
|
144
146
|
checks.each do |dep|
|
145
147
|
next unless dep.updatable?
|
148
|
+
dep_done = dep.done?
|
146
149
|
|
147
150
|
begin
|
148
|
-
|
149
|
-
if dep.done? && self.done? && Open.exists?(dep.path) && Open.exists?(self.path) && (Open.mtime(dep.path) > Open.mtime(self.path))
|
151
|
+
if this_mtime && dep_done && Open.exists?(dep.path) && (Open.mtime(dep.path) > this_mtime)
|
150
152
|
outdated_time << dep
|
151
153
|
end
|
152
154
|
rescue
|
153
155
|
end
|
154
156
|
|
155
|
-
|
157
|
+
# Is this pointless? this would mean some dep got updated after a later
|
158
|
+
# dep but but before this one.
|
159
|
+
#if (! dep.done? && ! canfail_paths.include?(dep.path)) || ! dep.updated?
|
160
|
+
|
161
|
+
if (! dep_done && ! canfail_paths.include?(dep.path))
|
156
162
|
outdated_dep << dep
|
157
163
|
end
|
158
164
|
end
|
@@ -42,7 +42,7 @@ get_pkg(){
|
|
42
42
|
local url="$2"
|
43
43
|
|
44
44
|
if [ ! -f "$OPT_SRC_DIR/$name.pkg" ]; then
|
45
|
-
wget "$url" -O "$OPT_SRC_DIR/$name.pkg"
|
45
|
+
wget "$url" -O "$OPT_SRC_DIR/$name.pkg" || wget "$url" -O "$OPT_SRC_DIR/$name.pkg" --no-check-certificate
|
46
46
|
fi
|
47
47
|
}
|
48
48
|
|
@@ -56,7 +56,7 @@ uncompress_pkg(){
|
|
56
56
|
mkdir -p "$OPT_BUILD_DIR"
|
57
57
|
cd "$OPT_BUILD_DIR"
|
58
58
|
|
59
|
-
(tar xvfz $pkg || tar xvfj $pkg || unzip $pkg || echo "Error decompressing") 2> /dev/null
|
59
|
+
(tar xvfz $pkg || tar xvfJ $pkg || tar xvfj $pkg || unzip $pkg || echo "Error decompressing") 2> /dev/null
|
60
60
|
|
61
61
|
cd "$old_pwd"
|
62
62
|
}
|
@@ -81,7 +81,8 @@ get_svn(){
|
|
81
81
|
cd "$name"
|
82
82
|
svn update
|
83
83
|
else
|
84
|
-
|
84
|
+
echo svn checkout "$url" "$name"
|
85
|
+
svn checkout "$url" "$name"
|
85
86
|
fi
|
86
87
|
|
87
88
|
clean_build
|
@@ -146,6 +147,8 @@ compile(){
|
|
146
147
|
|
147
148
|
[ -f setup.rb ] && (ruby -Ilib/ setup.rb --prefix="$(opt_dir "$name")" $extra || exit -1)
|
148
149
|
|
150
|
+
[ -f install.rb ] && ruby -Ilib/ install.rb config --prefix="$(opt_dir "$name")" $extra && ruby -Ilib/ install.rb install
|
151
|
+
|
149
152
|
if [ -f setup.py ]; then
|
150
153
|
python setup.py build && python setup.py install --user || exit -1
|
151
154
|
clean_build
|
@@ -157,12 +160,21 @@ build(){
|
|
157
160
|
local extra="$@"
|
158
161
|
|
159
162
|
echo "Building $name"
|
163
|
+
if [ "x$extra" != "x" ]; then
|
164
|
+
echo "Extra params: $extra"
|
165
|
+
fi
|
160
166
|
|
161
167
|
local old_pwd="`expand_path $(pwd)`"
|
162
168
|
cd "`build_dir`"
|
163
169
|
echo PWD: `pwd`
|
164
170
|
ls
|
165
171
|
|
172
|
+
if [ -f config/m4 ]; then
|
173
|
+
libtoolize --force
|
174
|
+
aclocal
|
175
|
+
autoheader
|
176
|
+
fi
|
177
|
+
|
166
178
|
if [ -f Makefile.am -a ! -f configure ]; then
|
167
179
|
autoreconf
|
168
180
|
fi
|
@@ -176,22 +188,43 @@ build(){
|
|
176
188
|
fi
|
177
189
|
|
178
190
|
if [ -f aclocal.m4 ]; then
|
191
|
+
autoreconf -i
|
192
|
+
autoconf
|
193
|
+
automake
|
194
|
+
else
|
179
195
|
autoconf
|
196
|
+
automake
|
180
197
|
fi
|
181
198
|
|
199
|
+
if [ -f config ]; then
|
200
|
+
ln -s config configure
|
201
|
+
fi
|
202
|
+
|
203
|
+
if [ -f CMakeLists.txt ]; then
|
204
|
+
mkdir build
|
205
|
+
cd build
|
206
|
+
cmake -DCMAKE_INSTALL_PREFIX:PATH=/ ..
|
207
|
+
make -j4
|
208
|
+
make DESTDIR="$(opt_dir "$name")" install
|
209
|
+
setup "$name"
|
210
|
+
clean_build
|
211
|
+
fi
|
212
|
+
|
182
213
|
if [ -f configure ]; then
|
214
|
+
echo ./configure --prefix="$(opt_dir "$name")" $extra
|
183
215
|
./configure --prefix="$(opt_dir "$name")" $extra
|
184
216
|
compile "$name" $extra
|
185
217
|
setup "$name"
|
186
218
|
clean_build
|
187
|
-
cd "$old_pwd"
|
188
219
|
else
|
189
220
|
compile "$name" $extra
|
190
221
|
move_opt "$name"
|
191
222
|
setup "$name"
|
192
223
|
clean_build
|
193
224
|
fi
|
225
|
+
|
194
226
|
|
227
|
+
cd "$old_pwd"
|
195
228
|
}
|
196
229
|
|
197
230
|
#{{{ SETUP
|
@@ -261,6 +294,7 @@ setup(){
|
|
261
294
|
cd "$old_pwd"
|
262
295
|
fi
|
263
296
|
|
297
|
+
([ -d "$pkg_dir/include" ] && add2file "$OPT_DIR/.c-paths" "$pkg_dir/include")
|
264
298
|
([ -d "$pkg_dir/lib" ] && add2file "$OPT_DIR/.ld-paths" "$pkg_dir/lib")
|
265
299
|
([ -d "$pkg_dir/lib/pkgconfig" ] && add2file "$OPT_DIR/.pkgconfig-paths" "$pkg_dir/lib/pkgconfig")
|
266
300
|
}
|
@@ -278,6 +312,16 @@ install_src(){
|
|
278
312
|
build "$name" "$extra"
|
279
313
|
}
|
280
314
|
|
315
|
+
install_svn(){
|
316
|
+
local name="$1"
|
317
|
+
local url="$2"
|
318
|
+
shift;shift;
|
319
|
+
local extra="$@"
|
320
|
+
|
321
|
+
get_svn "$name" "$url"
|
322
|
+
build "$name" $extra
|
323
|
+
}
|
324
|
+
|
281
325
|
custom_build(){
|
282
326
|
local name="$1"
|
283
327
|
shift;
|
@@ -314,7 +358,7 @@ install_jar(){
|
|
314
358
|
local url="$2"
|
315
359
|
|
316
360
|
[ -d "$OPT_DIR/$name/" ] || mkdir -p "$OPT_DIR/$name/"
|
317
|
-
wget "$url" -O "$OPT_DIR/$name/$name.jar"
|
361
|
+
wget "$url" -O "$OPT_DIR/jars/$name.jar" | wget "$url" -O "$OPT_DIR/jars/$name.jar" --no-check-certificate
|
318
362
|
link "$OPT_DIR/$name/$name.jar" "$OPT_JAR_DIR/$name.jar"
|
319
363
|
}
|
320
364
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rbbt-util'
|
4
|
+
require 'rbbt/util/simpleopt'
|
5
|
+
|
6
|
+
$0 = "rbbt #{$previous_commands*" "} #{ File.basename(__FILE__) }" if $previous_commands
|
7
|
+
|
8
|
+
options = SOPT.setup <<EOF
|
9
|
+
|
10
|
+
Compare two lists and do confusion matrix
|
11
|
+
|
12
|
+
$ #{$0} [options] <filename1> <filename2>
|
13
|
+
|
14
|
+
-h--help Print this help
|
15
|
+
-c--common Print the common entries
|
16
|
+
-o1--only_1 Print entries only in file 1
|
17
|
+
-o2--only_2 Print entries only in file 2
|
18
|
+
|
19
|
+
EOF
|
20
|
+
if options[:help]
|
21
|
+
if defined? rbbt_usage
|
22
|
+
rbbt_usage
|
23
|
+
else
|
24
|
+
puts SOPT.doc
|
25
|
+
end
|
26
|
+
exit 0
|
27
|
+
end
|
28
|
+
|
29
|
+
raise ParameterException, "Please provide two files with the entities to compare" unless ARGV.length == 2
|
30
|
+
file1, file2 = ARGV
|
31
|
+
|
32
|
+
list1 = Open.read(file1).split("\n")
|
33
|
+
list2 = Open.read(file2).split("\n")
|
34
|
+
|
35
|
+
common = list1 & list2
|
36
|
+
only_1 = list1 - list2
|
37
|
+
only_2 = list2 - list1
|
38
|
+
|
39
|
+
case
|
40
|
+
when options[:common]
|
41
|
+
puts common * "\n"
|
42
|
+
when options[:only_1]
|
43
|
+
puts only_1 * "\n"
|
44
|
+
when options[:only_2]
|
45
|
+
puts only_2 * "\n"
|
46
|
+
else
|
47
|
+
puts "Common: #{common.length}"
|
48
|
+
puts "Unique to 1 (#{File.basename(file1)}): #{only_1.length}"
|
49
|
+
puts "Unique to 2 (#{File.basename(file2)}): #{only_2.length}"
|
50
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.23.
|
4
|
+
version: 5.23.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -357,6 +357,7 @@ files:
|
|
357
357
|
- share/rbbt_commands/resource/produce
|
358
358
|
- share/rbbt_commands/rsync
|
359
359
|
- share/rbbt_commands/stat/abs
|
360
|
+
- share/rbbt_commands/stat/compare_lists
|
360
361
|
- share/rbbt_commands/stat/density
|
361
362
|
- share/rbbt_commands/stat/heatmap
|
362
363
|
- share/rbbt_commands/stat/log
|