1 from flask_script import Command, Option
2 from coprs import exceptions
3 from coprs import db
4 from coprs.helpers import chroot_to_branch
5 from coprs.logic import coprs_logic
6
7
9
14
17
19 print("{0} - chroot doesn\"t exist.".format(chroot_name))
20
21 option_list = (
22 Option("chroot_names",
23 help="Chroot name, e.g. fedora-18-x86_64.",
24 nargs="+"),
25 )
26
27
29
30 "Creates a mock chroot in DB"
31
33 self.option_list += (
34 Option(
35 "--dist-git-branch",
36 "-b",
37 dest="branch",
38 help="Branch name for this set of new chroots"),
39 Option(
40 "--deactivated",
41 action="store_true",
42 help="Activate the chroot later, manually by `alter_chroot`"
43 ),
44 )
45
46 - def run(self, chroot_names, branch=None, deactivated=False):
60