summaryrefslogtreecommitdiffstats
path: root/rpmbuild-remote.py
diff options
context:
space:
mode:
Diffstat (limited to 'rpmbuild-remote.py')
-rw-r--r--rpmbuild-remote.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py
index f751242..9631e83 100644
--- a/rpmbuild-remote.py
+++ b/rpmbuild-remote.py
@@ -110,24 +110,29 @@ def send_files(session, files, dest):
def execute_jobs(opts, system, jobs):
session = paramiko.SSHClient()
+ LOG.info("Connecting to %(user)s@%(host)s:%(port)d" % system)
session.connect(system['host'], port=system['port'],
username=system['user'], key_filename=system['ssh_key'])
for job in jobs:
if type(job) == type(''):
dest = "rpmbuild/SRPMS/"
send_files(session, [job], dest)
+ file = os.path.basename(job)
if opts.mock is None:
- cmd = "rpmbuild --rebuild rpmbuild/SRPMS/%s"
- % os.path.basename(job)
+ LOG.info("Building %s" % file)
+ cmd = "rpmbuild --rebuild rpmbuild/SRPMS/%s" % file
else:
+ LOG.info("Building %s with mock config %s" % (file, opts.mock))
cmd = "mock -r %s rpmbuild/SRPMS/%s"
- % (opts.mock, os.path.basename(job))
+ % (opts.mock, file)
else:
dest = "rpmbuild/SPECS"
send_files(session, [jobs[0]], dest)
dest = "rpmbuild/SOURCES"
send_files(session, jobs[1:], dest)
- cmd = "rpmbuild -ba rpmbuild/SPECS/%s" % os.path.basename(jobs[0])
+ file = os.path.basename(jobs[0])
+ LOG.info("Building %s from %d souces" % (file, len(job) - 1))
+ cmd = "rpmbuild -ba rpmbuild/SPECS/%s" % file)
files = session.exec_command(cmd)
# Write output files
# Fetch RPM files