]>
git.ipfire.org Git - people/jschlag/pbs.git/blob - src/scripts/pakfire-build-service
5 # Use tornado's logging options
7 tornado
.options
.parse_command_line()
9 import pakfire
.buildservice
12 def __init__(self
, *args
, **kwargs
):
14 self
.backend
= pakfire
.buildservice
.Backend(*args
, **kwargs
)
18 "check-mirrors" : self
.backend
.mirrors
.check
,
21 "cleanup-files" : self
.backend
.cleanup_files
,
24 "cleanup-sessions" : self
.backend
.sessions
.cleanup
,
27 "cleanup-uploads" : self
.backend
.uploads
.cleanup
,
30 "list-repository" : self
._list
_repository
,
32 # Sends all queued messages
33 "process-message-queue" : self
.backend
.messages
.process_queue
,
36 "pull-sources" : self
.backend
.sources
.pull
,
38 # Remaster Repositories
39 "remaster-repositories" : self
.backend
.repos
.remaster
,
41 # Send bug updates to Bugzilla
42 "send-bug-updates" : self
.backend
.bugzilla
.send_all
,
45 def __call__(self
, *args
):
46 if not len(args
) >= 2:
47 print >>sys
.stderr
, "Insufficient number of arguments"
51 basename
= args
.pop(0)
56 command
= self
._commands
[command
]
58 print >>sys
.stderr
, "Command not found: %s" % command
64 # Exit with error code
67 def _list_repository(self
, distro_name
, repo_name
, arch
):
69 distro
= self
.backend
.distros
.get_by_name(distro_name
)
71 print >>sys
.stderr
, "Could not find distribution: %s" % distro_name
75 repo
= distro
.get_repo(repo_name
)
77 print >>sys
.stderr
, "Could not find repository: %s" % repo_name
80 # Iterate through all of it
83 if not job
.type == "build":
86 if not job
.arch
in (arch
, "noarch"):