def checkout(self,
                 package,
                 version,
                 comp_type,
                 output_dir,
                 component=None,
                 quiet=False):
        """
        Checkout the orig tarball for package I{package} of I{version} and
        compression type I{comp_type} to I{output_dir}

        @param package: the package to generate the orig tarball for
        @type package: C{str}
        @param version: the version to check generate the orig tarball for
        @type version: C{str}
        @param comp_type: the compression type of the tarball
        @type comp_type: C{str}
        @param output_dir: the directory to put the tarball into
        @type output_dir: C{str}
        """
        name = DebianPkgPolicy.build_tarball_name(package,
                                                  version,
                                                  comp_type,
                                                  output_dir,
                                                  component=component)
        super(DebianPristineTar, self).checkout(name, quiet=quiet)
Beispiel #2
0
    def checkout(self, package, version, comp_type, output_dir, component=None,
                 quiet=False, signature=False):
        """
        Checkout the orig tarball for package I{package} of I{version} and
        compression type I{comp_type} to I{output_dir}

        @param package: the package to generate the orig tarball for
        @type package: C{str}
        @param version: the version to check generate the orig tarball for
        @type version: C{str}
        @param comp_type: the compression type of the tarball
        @type comp_type: C{str}
        @param output_dir: the directory to put the tarball into
        @type output_dir: C{str}
        """
        signaturefile = None
        name = DebianPkgPolicy.build_tarball_name(package,
                                                  version,
                                                  comp_type,
                                                  output_dir,
                                                  component=component)
        if signature:
            signaturefile = DebianPkgPolicy.build_signature_name(package,
                                                                 version,
                                                                 comp_type,
                                                                 output_dir,
                                                                 component=component)
        super(DebianPristineTar, self).checkout(name,
                                                quiet=quiet,
                                                signaturefile=signaturefile)
Beispiel #3
0
    def upstream_tarball_name(self, compression, component=None):
        """
        Possible upstream tarball name for this source package

        Gives the name of the main tarball if component is None
        """
        if self.is_native():
            return None
        return Policy.build_tarball_name(self.name,
                                         self.upstream_version,
                                         compression=compression,
                                         component=component)
Beispiel #4
0
    def upstream_tarball_name(self, compression, component=None):
        """
        Possible upstream tarball name for this source package

        Gives the name of the main tarball if component is None
        """
        if self.is_native():
            return None
        return Policy.build_tarball_name(self.name,
                                         self.upstream_version,
                                         compression=compression,
                                         component=component)
Beispiel #5
0
def get_component_tarballs(name, version, tarball, components):
    """
    Figure out the paths to the component tarballs based on the main
    tarball.
    """
    tarballs = []
    (_, _, comp_type) = Archive.parse_filename(tarball)
    for component in components:
        cname = DebianPkgPolicy.build_tarball_name(name, version, comp_type,
                                                   os.path.dirname(tarball),
                                                   component)
        tarballs.append(DebianAdditionalTarball(cname, component))
        if not os.path.exists(cname):
            raise GbpError("Can not find component tarball %s" % cname)
    return tarballs
    def checkout(self, package, version, comp_type, output_dir):
        """
        Checkout the orig tarball for package I{package} of I{version} and
        compression type I{comp_type} to I{output_dir}

        @param package: the package to generate the orig tarball for
        @type package: C{str}
        @param version: the version to check generate the orig tarball for
        @type version: C{str}
        @param comp_type: the compression type of the tarball
        @type comp_type: C{str}
        @param output_dir: the directory to put the tarball into
        @type output_dir: C{str}
        """
        name = DebianPkgPolicy.build_tarball_name(package, version, comp_type, output_dir)
        super(DebianPristineTar, self).checkout(name)
Beispiel #7
0
def get_component_tarballs(name, version, tarball, components):
    """
    Figure out the paths to the component tarballs based on the main
    tarball.
    """
    tarballs = []
    (_, _, comp_type) = Archive.parse_filename(tarball)
    for component in components:
        cname = DebianPkgPolicy.build_tarball_name(name,
                                                   version,
                                                   comp_type,
                                                   os.path.dirname(tarball),
                                                   component)
        tarballs.append((component, cname))
        if not os.path.exists(cname):
            raise GbpError("Can not find component tarball %s" % cname)
    return tarballs