mock build

This commit is contained in:
alexey
2025-03-15 00:01:18 +03:00
parent 9cf2aabc65
commit 998f87cee3
61 changed files with 3581 additions and 37 deletions

View File

@@ -1,3 +1,7 @@
$LOAD_PATH.unshift File.expand_path(".", "locallibs/ruby-rpm-ffi/lib")
require "rpm"
require_relative "runner"
class RepoManager
@@ -22,4 +26,15 @@ class RepoManager
@last_status = cmd.exit_status
@last_pid = cmd.pid
end
def get_rpm_info(path_to_rpm)
res = { :error => nil }
if File.exist?(path_to_rpm)
pkg = RPM::Package.open(path_to_rpm)
res[:pkginfo] = pkg
else
res[:error] = "#{path_to_rpm} не существует"
end
res
end
end