Skip to content

Commit 56585b2

Browse files
committed
Problem: building Omnigres packages
Fails to find a peculiarly named container Solution: ensure we build it under any OS, not just RedHat
1 parent f7598e9 commit 56585b2

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

packages/omnigres/package.rb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,13 @@ def install_prerequisites
291291
return if @prerequisites_installed
292292

293293
@os = Pgpm::OS.auto_detect
294-
if @os.is_a?(Pgpm::OS::RedHat)
295-
images = Oj.load(Pgpm::Podman.run("images --format json", print_stdout: false))
296-
unless images.flat_map { |i| i["Names"] }.include?("localhost/#{PGPM_BUILD_CONTAINER_IMAGE}:latest")
297-
tmpfile = Tempfile.new
298-
Pgpm::Podman.run "run -ti --cidfile #{tmpfile.path} #{PGPM_BUILD_CONTAINER}"
299-
id = File.read(tmpfile.path)
300-
tmpfile.unlink
301-
Pgpm::Podman.run "commit #{id} #{PGPM_BUILD_CONTAINER_IMAGE}"
302-
end
294+
images = Oj.load(Pgpm::Podman.run("images --format json", print_stdout: false))
295+
unless images.flat_map { |i| i["Names"] }.include?("localhost/#{PGPM_BUILD_CONTAINER_IMAGE}:latest")
296+
tmpfile = Tempfile.new
297+
Pgpm::Podman.run "run -ti --cidfile #{tmpfile.path} #{PGPM_BUILD_CONTAINER}"
298+
id = File.read(tmpfile.path)
299+
tmpfile.unlink
300+
Pgpm::Podman.run "commit #{id} #{PGPM_BUILD_CONTAINER_IMAGE}"
303301
end
304302
@prerequisites_installed = true
305303
end

0 commit comments

Comments
 (0)