Skip to content

Commit f912560

Browse files
committed
Update issues.
1 parent 4af965e commit f912560

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
- name: Install brew
3535
run: |
3636
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
37+
brew uninstall --force --ignore-dependencies cmake
38+
brew cleanup -s cmake
39+
brew cleanup --prune-prefix
3740
brew uninstall --force --ignore-dependencies node
3841
brew cleanup -s node
3942
brew cleanup --prune-prefix

brew-pkg.rb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def patchelf(root_dir, prefix_path, binary, format='@executable_path')
2828
stdout, status = Open3.capture2("otool -L #{binary_path}")
2929

3030
# Debug information
31-
ohai "Before patching:"
32-
ohai "#{stdout}"
31+
puts "Before patching:"
32+
puts "#{stdout}"
3333

3434
# Remove the first line which is unnecesary
3535
stdout_lines = stdout.lines[1..-1]
@@ -55,7 +55,7 @@ def patchelf(root_dir, prefix_path, binary, format='@executable_path')
5555
new_lib = File.join('@loader_path', relative_path)
5656

5757
# Patch the library path name
58-
ohai "install_name_tool -id #{new_lib} #{binary_path}"
58+
puts "install_name_tool -id #{new_lib} #{binary_path}"
5959
system("install_name_tool", "-id", new_lib, binary_path)
6060
else
6161
# Obtain the relative path from the executable or library
@@ -65,18 +65,18 @@ def patchelf(root_dir, prefix_path, binary, format='@executable_path')
6565
new_lib = File.join(format, relative_path)
6666

6767
# Patch the library path relative to the binary path
68-
ohai "install_name_tool -change #{lib} #{new_lib} #{binary_path}"
68+
puts "install_name_tool -change #{lib} #{new_lib} #{binary_path}"
6969
system("install_name_tool", "-change", lib, new_lib, binary_path)
7070
end
7171

7272
# Debug information
7373
stdout, status = Open3.capture2("otool -L #{binary_path}")
74-
ohai "After patching:"
75-
ohai "#{stdout}"
74+
puts "After patching:"
75+
puts "#{stdout}"
7676

7777
if lib_path != binary_path
7878
# Recursively iterate through libraries
79-
ohai "patchelf(#{root_dir}, #{prefix_path}, #{lib.delete_prefix(prefix_path)})"
79+
puts "patchelf(#{root_dir}, #{prefix_path}, #{lib.delete_prefix(prefix_path)})"
8080
patchelf(root_dir, prefix_path, lib.delete_prefix(prefix_path), '@loader_path')
8181
end
8282
end
@@ -139,7 +139,7 @@ def pkg
139139
opts.on('-w', '--ownership ownership_mode', 'Define the ownership as: recommended, preserve or preserve-other') do |o|
140140
if ownership_options.include?(o)
141141
options[:ownership] = value
142-
ohai "Setting pkgbuild option --ownership with value #{value}"
142+
puts "Setting pkgbuild option --ownership with value #{value}"
143143
else
144144
opoo "#{value} is not a valid value for pkgbuild --ownership option, ignoring"
145145
end
@@ -162,7 +162,7 @@ def pkg
162162

163163
# ARGV now contains the free arguments after parsing the options
164164
packages = [ARGV.first] + options[:additional_deps]
165-
ohai "Building packages: #{packages.join(', ')}"
165+
puts "Building packages: #{packages.join(', ')}"
166166

167167
# Define the formula
168168
dependencies = []
@@ -209,7 +209,7 @@ def pkg
209209
end
210210

211211
staging_root = options[:output_dir] + HOMEBREW_PREFIX
212-
ohai "Creating package staging root using Homebrew prefix #{HOMEBREW_PREFIX} inside #{staging_root}"
212+
puts "Creating package staging root using Homebrew prefix #{HOMEBREW_PREFIX} inside #{staging_root}"
213213
FileUtils.mkdir_p staging_root
214214

215215
formulas.each do |pkg|
@@ -218,7 +218,7 @@ def pkg
218218
dep_version = formula.version.to_s
219219
dep_version += "_#{formula.revision}" if formula.revision.to_s != '0'
220220

221-
ohai "Staging formula #{formula.name}"
221+
puts "Staging formula #{formula.name}"
222222

223223
# Get all directories for this keg, rsync to the staging root
224224
if File.exist?(File.join(HOMEBREW_CELLAR, formula.name, dep_version))
@@ -227,7 +227,7 @@ def pkg
227227
dirs.each { |d| safe_system "rsync", "-a", "#{d}", "#{staging_root}/" }
228228

229229
if File.exist?("#{HOMEBREW_CELLAR}/#{formula.name}/#{dep_version}") && !options[:without_deps]
230-
ohai "Staging directory #{HOMEBREW_CELLAR}/#{formula.name}/#{dep_version}"
230+
puts "Staging directory #{HOMEBREW_CELLAR}/#{formula.name}/#{dep_version}"
231231
safe_system "mkdir", "-p", "#{staging_root}/Cellar/#{formula.name}/"
232232
safe_system "rsync", "-a", "#{HOMEBREW_CELLAR}/#{formula.name}/#{dep_version}", "#{staging_root}/Cellar/#{formula.name}/"
233233
safe_system "mkdir", "-p", "#{staging_root}/opt"
@@ -237,7 +237,7 @@ def pkg
237237

238238
# Write out a LaunchDaemon plist if we have one
239239
if formula.service?
240-
ohai "Plist found at #{formula.plist_name}, staging for /Library/LaunchDaemons/#{formula.plist_name}.plist"
240+
puts "Plist found at #{formula.plist_name}, staging for /Library/LaunchDaemons/#{formula.plist_name}.plist"
241241
launch_daemon_dir = File.join staging_root, "Library", "LaunchDaemons"
242242
FileUtils.mkdir_p launch_daemon_dir
243243
fd = File.new(File.join(launch_daemon_dir, "#{formula.plist_name}.plist"), "w")
@@ -255,7 +255,7 @@ def pkg
255255
# Zip it
256256
if options[:compress]
257257
tgzfile = "#{options[:package_name]}.tar.gz"
258-
ohai "Compressing package #{tgzfile}"
258+
puts "Compressing package #{tgzfile}"
259259
args = [ "-czf", tgzfile, "-C", options[:output_dir], "." ]
260260
safe_system "tar", *args
261261
end
@@ -269,12 +269,12 @@ def pkg
269269
if File.exist?(pre)
270270
File.chmod(0755, pre)
271271
found_scripts = true
272-
ohai "Adding preinstall script"
272+
puts "Adding preinstall script"
273273
end
274274
if File.exist?(post)
275275
File.chmod(0755, post)
276276
found_scripts = true
277-
ohai "Adding postinstall script"
277+
puts "Adding postinstall script"
278278
end
279279
end
280280
if not found_scripts
@@ -284,7 +284,7 @@ def pkg
284284

285285
# Build it
286286
pkgfile = "#{options[:package_name]}.pkg"
287-
ohai "Building package #{pkgfile}"
287+
puts "Building package #{pkgfile}"
288288
args = [
289289
"--quiet",
290290
"--root", "#{options[:output_dir]}",

0 commit comments

Comments
 (0)