Exemple #1
0
    def __init__(self, bug, user=None, password=None, cache=False,
                nobuild=False, other_BZ=None):
        """ Constructor.
        :arg bug, the bug number on bugzilla
        :kwarg user, the username with which to log in in bugzilla.
        :kwarg password, the password associated with this account.
        :kwarg cache, boolean specifying whether the spec and srpm should
        be re-downloaded or not.
        :kwarg nobuild, boolean specifying whether to build or not the
        package.
        :kwarg other_BZ, url of an eventual other bugzilla system.
        """
        Helpers.__init__(self, cache, nobuild)
        self.bug_num = bug
        self.spec_url = None
        self.srpm_url = None
        self.spec_file = None
        self.srpm_file = None
        self.log = get_logger()
        if other_BZ:
            self.bugzilla = Bugzilla(url=other_BZ + '/xmlrpc.cgi')
        else:
            self.bugzilla = Bugzilla(url=BZ_URL)

        self.log.info("Trying bugzilla cookies for authentication")
        self.user = user
        self.bug = self.bugzilla.getbug(self.bug_num)
Exemple #2
0
 def __init__(self, args, spec_file, srpm_file):
     self.checks = []
     self.ext_checks = []
     self.args = args  # Command line arguments & options
     self.cache = args.cache
     self.nobuild = args.nobuild
     self._results = {'PASSED': [], 'FAILED': [], 'NA': [], 'USER': []}
     if spec_file:
         self.spec = SpecFile(spec_file)
     else:
         self.spec = None
     self.sources = Sources()
     self.log = get_logger()
     if srpm_file:
         self.srpm = SRPMFile(srpm_file)
     else:
         self.srpm = None
     self.plugins = load('FedoraReview.checks')
     self.add_check_classes()
Exemple #3
0
 def __init__(self, args, spec_file, srpm_file, cache=False,
         nobuild=False, mock_config='fedora-rawhide-i386'):
     self.checks = []
     self.ext_checks = []
     self.args = args  # Command line arguments & options
     self.cache = cache
     self.nobuild = nobuild
     self._results = {'PASSED': [], 'FAILED': [], 'NA': [], 'USER': []}
     self.deprecated = []
     if spec_file:
         self.spec = SpecFile(spec_file)
     else:
         self.spec = None
     self.sources = Sources(cache=cache, mock_config=mock_config)
     self.log = get_logger()
     if srpm_file:
         self.srpm = SRPMFile(srpm_file, cache=cache, nobuild=nobuild,
             mock_config=mock_config, spec=self.spec)
     else:
         self.srpm = None
     self.plugins = load('FedoraReview.checks')
     self.add_check_classes()
Exemple #4
0
    def __init__(self, bug, user=None, password=None):
        """ Constructor.
        :arg bug, the bug number on bugzilla
        :kwarg user, the username with which to log in in bugzilla.
        :kwarg password, the password associated with this account.
        be re-downloaded or not.
        """
        Helpers.__init__(self)
        self.bug_num = bug
        self.spec_url = None
        self.srpm_url = None
        self.spec_file = None
        self.srpm_file = None
        self.log = get_logger()
        if Settings.other_bz:
            self.bugzilla = Bugzilla(url=Settings.other_bz + '/xmlrpc.cgi')
        else:
            self.bugzilla = Bugzilla(url=BZ_URL)

        self.log.info("Trying bugzilla cookies for authentication")
        self.user = user
        self.bug = self.bugzilla.getbug(self.bug_num)