Ejemplo n.º 1
0
    def _do_report(self, outfile=None):
        ''' Create a review report'''
        clock = time.time()
        self.log.info('Getting .spec and .srpm Urls from : '
                      + self.bug.get_location())

        Settings.dump()
        if not self.bug.find_urls():
            raise self.HelperError('Cannot find .spec or .srpm URL(s)')
        self.log.debug("find_urls completed: %.3f"
                       % (time.time() - clock))
        clock = time.time()

        if not ReviewDirs.is_inited:
            wd = self.bug.get_dirname()
            ReviewDirs.workdir_setup(wd)
        if Mock.is_available():
            Mock.init()

        if not self.bug.download_files():
            raise self.HelperError('Cannot download .spec and .srpm')
        self.log.debug("Url download completed: %.3f" % (time.time() - clock))

        Settings.name = self.bug.get_name()
        self._run_checks(self.bug.spec_file, self.bug.srpm_file, outfile)
Ejemplo n.º 2
0
    def _get_spec_from_srpm(self):
        path = urlparse(self.srpm_url).path
        name = os.path.basename(path).rsplit('-', 2)[0]
        ReviewDirs.workdir_setup(name)
        self.do_download_srpm()

        SRPMFile(self.srpm_file).unpack()
        file = glob(os.path.join(ReviewDirs.srpm_unpacked, name + '*.spec'))[0]
        self.spec_file = file
        self.spec_url = 'file://' + file
Ejemplo n.º 3
0
 def _get_spec_from_srpm(self):
     path = urlparse(self.srpm_url).path
     name = os.path.basename(path).rsplit('-',2)[0]
     ReviewDirs.workdir_setup(name)
     self.do_download_srpm()
     
     SRPMFile(self.srpm_file).unpack()
     file = glob(os.path.join(ReviewDirs.srpm_unpacked, 
                              name + '*.spec'))[0]
     self.spec_file = file
     self.spec_url = 'file://' + file
Ejemplo n.º 4
0
    def _get_spec_from_srpm(self):
        ''' Extract spec from srpm and update self.spec_url. '''
        path = urlparse(self.srpm_url).path
        name = os.path.basename(path).rsplit('-', 2)[0]
        ReviewDirs.workdir_setup(self.get_dirname())
        self.do_download_srpm()

        SRPMFile(self.srpm_file).unpack()
        path = glob(os.path.join(ReviewDirs.srpm_unpacked,
                                 name + '*.spec'))[0]
        self.spec_file = path
        self.spec_url = 'file://' + path
Ejemplo n.º 5
0
    def _get_spec_from_srpm(self):
        ''' Extract spec from srpm and update self.spec_url. '''
        path = urlparse(self.srpm_url).path
        name = os.path.basename(path).rsplit('-', 2)[0]
        ReviewDirs.workdir_setup(name, Settings.cache)
        self.do_download_srpm()

        SRPMFile(self.srpm_file).unpack()
        try:
            path = glob(os.path.join(ReviewDirs.srpm_unpacked,
                                     name + '*.spec'))[0]
        except IndexError:
            raise ReviewError("Cannot find spec file in srpm")
        self.spec_file = path
        self.spec_url = 'file://' + path
Ejemplo n.º 6
0
    def _get_spec_from_srpm(self):
        ''' Extract spec from srpm and update self.spec_url. '''
        path = urlparse(self.srpm_url).path
        name = os.path.basename(path).rsplit('-', 2)[0]
        ReviewDirs.workdir_setup(name, Settings.cache)
        self.do_download_srpm()

        SRPMFile(self.srpm_file).unpack()
        try:
            path = glob(os.path.join(ReviewDirs.srpm_unpacked,
                                     name + '*.spec'))[0]
        except IndexError:
            raise ReviewError("Cannot find spec file in srpm")
        self.spec_file = path
        self.spec_url = 'file://' + path
Ejemplo n.º 7
0
    def _do_report(self, outfile=None):
        ''' Create a review report'''
        clock = time.time()
        self.log.info('Getting .spec and .srpm Urls from : ' +
                      self.bug.get_location())

        Settings.dump()
        if not self.bug.find_urls():
            raise self.HelperError('Cannot find .spec or .srpm URL(s)')
        self.log.debug("find_urls completed: %.3f" % (time.time() - clock))
        clock = time.time()

        if not ReviewDirs.is_inited:
            wd = self.bug.get_dirname()
            ReviewDirs.workdir_setup(wd)
        if Mock.is_available():
            Mock.init()

        if not self.bug.download_files():
            raise self.HelperError('Cannot download .spec and .srpm')
        self.log.debug("Url download completed: %.3f" % (time.time() - clock))

        Settings.name = self.bug.get_name()
        self._run_checks(self.bug.spec_file, self.bug.srpm_file, outfile)