summaryrefslogtreecommitdiffstats
path: root/rpmbuild-remote.py
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-09-08 22:18:01 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-09-08 22:18:01 -0400
commit4cef6d78f82159ce78380a67e73ae17242f7fa07 (patch)
tree551e6c816c9aa227f248a206aefcd59e6ff9ff60 /rpmbuild-remote.py
parent8d607e11dbd0df3895792d528633ab97a1636efd (diff)
downloadrpmbuild-remote-4cef6d78f82159ce78380a67e73ae17242f7fa07.zip
rpmbuild-remote-4cef6d78f82159ce78380a67e73ae17242f7fa07.tar.gz
rpmbuild-remote-4cef6d78f82159ce78380a67e73ae17242f7fa07.tar.xz
Add logging messages
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