extras-buildsys-temp/scripts mach.in,1.5,1.6
Seth Vidal (skvidal)
fedora-extras-commits at redhat.com
Sat Apr 30 20:50:44 UTC 2005
Author: skvidal
Update of /cvs/fedora/extras-buildsys-temp/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26611
Modified Files:
mach.in
Log Message:
- make it output less
- write errors to rpm.log too
- make createrepo command a little less prone for failure b/c of excludes
- remove an exception raise that just caused problems.
Index: mach.in
===================================================================
RCS file: /cvs/fedora/extras-buildsys-temp/scripts/mach.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mach.in 19 Apr 2005 20:05:52 -0000 1.5
+++ mach.in 30 Apr 2005 20:50:42 -0000 1.6
@@ -597,10 +597,6 @@
if os.WIFEXITED (status):
retval = os.WEXITSTATUS (status)
- if (retval != 0):
- raise self.ReturnValue, (retval, output)
- # FIXME: we send back retvals with a raise now, do the same
- # in do_progress
return (retval, output)
def do_chroot (self, command, message = None, progress = False, user = "", fatal = False):
@@ -815,7 +811,6 @@
# big guns
self._bruteclean ()
- # chroot into root
def chroot (self, args):
self.mount ()
# a minimal system might not have su/runuser, yikes
@@ -1101,25 +1096,19 @@
command = "%s -c \"RPM_BUILD_NCPUS=%s %s --nodeps -ba %s /usr/src/rpm/SPECS/%s 2>&1\" - %s" % (
self.config['runuser'], nrcpus, self.config['root_rpmbuild'],
join_quoted (options), specfile, builduser)
- (status, output) = self.do_chroot (command,
- "Rebuilding source rpm %s" % srpmname,
- True)
+ msg = "Rebuild source rpm %s" % srpmname
+ (status, output) = self.do_chroot(command, msg, False)
if (output):
- open (resultdir + '/rpm.log', "wb"). write (output)
+ fo = open(resultdir + '/rpm.log', "wb")
+ fo.write(output)
+ fo.close()
+
if status != 0:
- sys.stderr.write ("ERROR: something went wrong rebuilding the .src.rpm\n")
- sys.stderr.write ("ERROR: inspect rpm build log %s/rpm.log\n" % resultdir)
- self.umount ()
- self.unlock ()
+ sys.stderr.write("ERROR: something went wrong rebuilding the .src.rpm\n")
+ sys.stderr.write("ERROR: inspect rpm build log %s/rpm.log\n" % resultdir)
+ self.umount()
+ self.unlock()
raise self.Error, "failed to rebuild SRPMs"
- # reinstall and repackage src rpm
- #sys.stdout.write ("Repackaging %s ..." % srpm)
- #do_chroot (config, '%s -Uhv /tmp/%s > /dev/null 2>&1' % (chroot_rpm, srpm))
- #do_chroot (config, "%s -c 'rpm -Uhv /tmp/%s > /dev/null 2>&1' %s" % (self.config['runuser'], srpm, builduser))
- #self.rpm ('-Uhv /tmp/%s > /dev/null 2>&1' % srpm)
- #(status, output) = do_chroot_with_output (config,
- # "%s -c '%s -bs --nodeps /usr/src/rpm/SPECS/%s 2>&1' %s" % (self.config['runuser'], self.config['root_rpmbuild'], spec, builduser),
- # True)
# analyze log file and move all of the rpms listed as Wrote:
(srpm, rpms) = get_rpms_from_log (resultdir + '/rpm.log')
@@ -1763,7 +1752,7 @@
ensure_dir (os.path.join (root, 'var/cache/mach/%s/headers' % fields[3]))
if (fields[0] == 'rpm-dir'):
rootobj = Root (config)
- rootobj.do_chroot ('createrepo -x S*/* -x B*/* /usr/src/rpm')
+ rootobj.do_chroot ('createrepo -x SPECS/* -x SRPMS/* -x SOURCES/* -x BUILD/* /usr/src/rpm')
sources.close ()
More information about the fedora-extras-commits
mailing list