extras-buildsys/utils/pushscript PushPackage.py,NONE,1.1
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Wed Feb 21 20:43:24 UTC 2007
- Previous message: extras-buildsys/utils/pushscript Config_Extras.py, 1.22, 1.23 Push.py, 1.29, 1.30
- Next message: extras-buildsys/utils/pushscript Utils.py, 1.10, 1.11 Push.py, 1.30, 1.31 PushPackage.py, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mschwendt
Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22091
Added Files:
PushPackage.py
Log Message:
Add a separate script, which can push packages manually, also to
frozen dists. Without a wrapper script (similar to "extras-push"),
it is called like
./PushPackage.py Extras development foo
where "foo" and any optional subsequent arguments are Python regular
expressions that are matched against build job src.rpm %name strings.
./PushPackage.py Extras development .\*
or
./PushPackage.py Extras development '.*'
would be the catch-all.
Updating metadata'n'stuff and sending build report is done by the
next normal "extras-push all".
--- NEW FILE PushPackage.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
from LockFile import LockFile
def main(cfg,args):
assert(len(args)>1)
dist = args[0]
whitelist = args[1:]
Push.cfg = cfg
result, repochanged = Push.copy_sign_move(dist,whitelist)
if result:
sys.exit(result)
if __name__ == '__main__':
if len(sys.argv) < 2:
print 'Usage: %s <project> <release> <name>\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)
# TODO: move signkeycheck from Push.py to Utils, then include here
os.umask(cfg.signersumask)
if not os.path.exists(cfg.rundir):
os.makedirs(cfg.rundir)
lockfile = os.path.join(cfg.rundir,'pushscript.lock')
lock = LockFile(lockfile)
try:
lock.lock()
except LockFileLocked:
print 'Script locked via %s\nIt seems to be in use already.' % lockfile
sys.exit(errno.EPERM)
main(cfg,sys.argv[2:])
lock.unlock()
sys.exit(0)
- Previous message: extras-buildsys/utils/pushscript Config_Extras.py, 1.22, 1.23 Push.py, 1.29, 1.30
- Next message: extras-buildsys/utils/pushscript Utils.py, 1.10, 1.11 Push.py, 1.30, 1.31 PushPackage.py, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list