extras-buildsys/utils/pushscript List.py,NONE,1.1

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Fri Oct 27 09:18:03 UTC 2006


Author: mschwendt

Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1879

Added Files:
	List.py 
Log Message:
just a helper: list pending build jobs


--- NEW FILE List.py ---
#!/usr/bin/python -t
# -*- mode: Python; indent-tabs-mode: nil; -*-
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

import errno, os, sys

import Utils, Push


def main(cfg,dists):
    if not dists:
        dists = cfg.alldists
    
    for dist in dists:
        distdir = '%s-%s-%s' % (cfg.distro, dist, cfg.project)
        print distdir+':'
        needsignroot = os.path.join(cfg.stagesdir, distdir)
        results = Push.get_build_results(needsignroot,droppushed=True)
        for (name,pkgrelroots) in results:
            for pkgrelroot in pkgrelroots:
                print '    '+name+'-'+os.path.basename(pkgrelroot)
        print


if __name__ == '__main__':
    if len(sys.argv) < 2:
        print 'Usage: %s <project> [release]...\n' % os.path.basename(sys.argv[0])
        sys.exit(errno.EINVAL)

    cfg = Utils.load_config_module(sys.argv[1])

    Utils.signer_gid_check(cfg.signersgid)
    os.umask(cfg.signersumask)
    main(cfg,sys.argv[2:])
    sys.exit(0)




More information about the fedora-extras-commits mailing list