Пример #1
0
    def checksum(self):
        if not self.cmssw_checksumming:
            return None

        if self.custom_checksum != NO_STR:
            return self.custom_checksum

        if self._checksum is None:
            cmd = [
                rel_path(__file__, "scripts", "cmssw_checksum.sh"),
                self.get_cmssw_path()
            ]
            if self.exclude != NO_STR:
                cmd += [self.exclude]
            cmd = quote_cmd(cmd)

            code, out, _ = interruptable_popen(cmd,
                                               shell=True,
                                               executable="/bin/bash",
                                               stdout=subprocess.PIPE)
            if code != 0:
                raise Exception("cmssw checksum calculation failed")

            self._checksum = out.strip()

        return self._checksum
Пример #2
0
    def bundle(self, dst_path):
        cmd = [rel_path(__file__, "bundle_cmssw.sh"), self.path, dst_path]
        if self.exclude != NO_STR:
            cmd += [self.exclude]

        code = interruptable_popen(cmd)[0]
        if code != 0:
            raise Exception("cmssw bundling failed")
Пример #3
0
    def bundle(self, dst_path):
        cmd = [rel_path(__file__, "bundle_repository.sh"), self.repo_path, get_path(dst_path)]
        cmd += [" ".join(self.exclude_files)]
        cmd += [" ".join(self.include_files)]

        code = interruptable_popen(cmd)[0]
        if code != 0:
            raise Exception("repository bundling failed")
Пример #4
0
    def bundle(self, dst_path):
        bundle_script = rel_path(__file__, "scripts", "bundle_repository.sh")
        cmd = [bundle_script, self.get_repo_path(), get_path(dst_path)]
        cmd += [" ".join(self.exclude_files)]
        cmd += [" ".join(self.include_files)]

        code = interruptable_popen(cmd, executable="/bin/bash")[0]
        if code != 0:
            raise Exception("repository bundling failed")
Пример #5
0
    def bundle(self, dst_path):
        bundle_script = rel_path(__file__, "scripts", "bundle_cmssw.sh")
        cmd = [bundle_script, self.cmssw_path, get_path(dst_path)]
        if self.exclude != NO_STR:
            cmd += [self.exclude]

        code = interruptable_popen(cmd)[0]
        if code != 0:
            raise Exception("cmssw bundling failed")
Пример #6
0
    def bundle(self, dst_path):
        cmd = "{} \"{}\" \"{}\" \"{}\" \"{}\"".format(
            rel_path(__file__, "scripts", "bundle_repository.sh"),
            self.get_repo_path(),
            get_path(dst_path),
            " ".join(self.exclude_files),
            " ".join(self.include_files),
        )

        code = interruptable_popen(cmd, shell=True, executable="/bin/bash")[0]
        if code != 0:
            raise Exception("repository bundling failed")
Пример #7
0
    def bundle(self, dst_path):
        cmd = [
            rel_path(__file__, "scripts", "bundle_cmssw.sh"),
            self.get_cmssw_path(),
            get_path(dst_path),
        ]
        if self.exclude != NO_STR:
            cmd += [self.exclude]
        cmd = quote_cmd(cmd)

        code = interruptable_popen(cmd, shell=True, executable="/bin/bash")[0]
        if code != 0:
            raise Exception("cmssw bundling failed")
Пример #8
0
    def checksum(self):
        if self.custom_checksum != NO_STR:
            return self.custom_checksum

        if self._checksum is None:
            cmd = [rel_path(__file__, "repository_checksum.sh"), self.repo_path]

            code, out, _ = interruptable_popen(cmd, stdout=subprocess.PIPE)
            if code != 0:
                raise Exception("repository checksum calculation failed")

            self._checksum = out.strip()

        return self._checksum
Пример #9
0
    def checksum(self):
        if self.custom_checksum != NO_STR:
            return self.custom_checksum

        if self._checksum is None:
            cmd = [
                rel_path(__file__, "scripts", "repository_checksum.sh"),
                self.get_repo_path()
            ]
            cmd = quote_cmd(cmd)

            code, out, _ = interruptable_popen(cmd,
                                               shell=True,
                                               executable="/bin/bash",
                                               stdout=subprocess.PIPE)
            if code != 0:
                raise Exception("repository checksum calculation failed")

            self._checksum = out.strip()

        return self._checksum