change pypungi imports to pungi

This commit is contained in:
Dennis Gilmore 2015-03-12 16:12:38 -05:00
parent fdc7901127
commit 07e90f0f96
30 changed files with 115 additions and 115 deletions

View File

@ -29,11 +29,11 @@ import shutil
import kobo.log
from productmd import ComposeInfo, ImageManifest
from pypungi.wrappers.variants import VariantsXmlParser
from pypungi.paths import Paths
from pypungi.wrappers.scm import get_file_from_scm
from pypungi.util import makedirs
from pypungi.metadata import compose_to_composeinfo
from pungi.wrappers.variants import VariantsXmlParser
from pungi.paths import Paths
from pungi.wrappers.scm import get_file_from_scm
from pungi.util import makedirs
from pungi.metadata import compose_to_composeinfo
def get_compose_dir(topdir, conf, compose_type="production", compose_date=None, compose_respin=None, compose_label=None, already_exists_callbacks=None):

View File

@ -1430,7 +1430,7 @@ class Pungi(PungiBase):
cmd.append(self.topdir)
self.logger.info(" ".join(cmd))
pypungi.util._doRunCommand(cmd, self.logger)
pungi.util._doRunCommand(cmd, self.logger)
# write out the tree data for snake
self.writeinfo('tree: %s' % self.mkrelative(self.topdir))

View File

@ -23,7 +23,7 @@ import kobo.log
from kobo.shortcuts import relative_path
from kobo.threads import WorkerThread, ThreadPool
from pypungi.util import makedirs
from pungi.util import makedirs
class LinkerPool(ThreadPool):

View File

@ -24,8 +24,8 @@ import productmd.treeinfo.product
from productmd import get_major_version
from kobo.shortcuts import relative_path
from pypungi.compose_metadata.discinfo import write_discinfo as create_discinfo
from pypungi.compose_metadata.discinfo import write_media_repo as create_media_repo
from pungi.compose_metadata.discinfo import write_discinfo as create_discinfo
from pungi.compose_metadata.discinfo import write_media_repo as create_media_repo
def get_description(compose, variant, arch):

View File

@ -23,7 +23,7 @@ __all__ = (
import errno
import os
from pypungi.util import makedirs
from pungi.util import makedirs
class Paths(object):

View File

@ -15,7 +15,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from pypungi.checks import validate_options
from pungi.checks import validate_options
class PhaseBase(object):

View File

@ -28,12 +28,12 @@ from kobo.threads import ThreadPool, WorkerThread
from kobo.shortcuts import run, read_checksum_file, relative_path
from productmd.imagemanifest import Image
from pypungi.util import get_buildroot_rpms, get_volid
from pypungi.wrappers.lorax import LoraxWrapper
from pypungi.wrappers.kojiwrapper import KojiWrapper
from pypungi.wrappers.iso import IsoWrapper
from pypungi.wrappers.scm import get_file_from_scm
from pypungi.phases.base import PhaseBase
from pungi.util import get_buildroot_rpms, get_volid
from pungi.wrappers.lorax import LoraxWrapper
from pungi.wrappers.kojiwrapper import KojiWrapper
from pungi.wrappers.iso import IsoWrapper
from pungi.wrappers.scm import get_file_from_scm
from pungi.phases.base import PhaseBase
class BuildinstallPhase(PhaseBase):

View File

@ -27,14 +27,14 @@ from productmd.imagemanifest import Image
from kobo.threads import ThreadPool, WorkerThread
from kobo.shortcuts import run, read_checksum_file, relative_path
from pypungi.wrappers.iso import IsoWrapper
from pypungi.wrappers.createrepo import CreaterepoWrapper
from pypungi.wrappers.kojiwrapper import KojiWrapper
from pypungi.wrappers.jigdo import JigdoWrapper
from pypungi.phases.base import PhaseBase
from pypungi.util import makedirs, get_volid
from pypungi.media_split import MediaSplitter
from pypungi.compose_metadata.discinfo import read_discinfo, write_discinfo
from pungi.wrappers.iso import IsoWrapper
from pungi.wrappers.createrepo import CreaterepoWrapper
from pungi.wrappers.kojiwrapper import KojiWrapper
from pungi.wrappers.jigdo import JigdoWrapper
from pungi.phases.base import PhaseBase
from pungi.util import makedirs, get_volid
from pungi.media_split import MediaSplitter
from pungi.compose_metadata.discinfo import read_discinfo, write_discinfo
class CreateisoPhase(PhaseBase):

View File

@ -29,9 +29,9 @@ import threading
from kobo.threads import ThreadPool, WorkerThread
from kobo.shortcuts import run, relative_path
from pypungi.wrappers.scm import get_dir_from_scm
from pypungi.wrappers.createrepo import CreaterepoWrapper
from pypungi.phases.base import PhaseBase
from pungi.wrappers.scm import get_dir_from_scm
from pungi.wrappers.createrepo import CreaterepoWrapper
from pungi.phases.base import PhaseBase
createrepo_lock = threading.Lock()

View File

@ -22,10 +22,10 @@ import pipes
from kobo.shortcuts import run
from pypungi.util import get_arch_variant_data, pkg_is_rpm
from pypungi.arch import split_name_arch
from pypungi.wrappers.scm import get_file_from_scm, get_dir_from_scm
from pypungi.phases.base import PhaseBase
from pungi.util import get_arch_variant_data, pkg_is_rpm
from pungi.arch import split_name_arch
from pungi.wrappers.scm import get_file_from_scm, get_dir_from_scm
from pungi.phases.base import PhaseBase
class ExtraFilesPhase(PhaseBase):

View File

@ -23,26 +23,26 @@ import json
from kobo.rpmlib import parse_nvra
from productmd import RpmManifest
from pypungi.wrappers.scm import get_file_from_scm
from pungi.wrappers.scm import get_file_from_scm
from link import link_files
from pypungi.util import get_arch_variant_data, get_arch_data
from pypungi.phases.base import PhaseBase
from pypungi.arch import split_name_arch, get_compatible_arches
from pungi.util import get_arch_variant_data, get_arch_data
from pungi.phases.base import PhaseBase
from pungi.arch import split_name_arch, get_compatible_arches
def get_gather_source(name):
import pypungi.phases.gather.sources
import pungi.phases.gather.sources
from source import GatherSourceContainer
GatherSourceContainer.register_module(pypungi.phases.gather.sources)
GatherSourceContainer.register_module(pungi.phases.gather.sources)
container = GatherSourceContainer()
return container["GatherSource%s" % name]
def get_gather_method(name):
import pypungi.phases.gather.methods
import pungi.phases.gather.methods
from method import GatherMethodContainer
GatherMethodContainer.register_module(pypungi.phases.gather.methods)
GatherMethodContainer.register_module(pungi.phases.gather.methods)
container = GatherMethodContainer()
return container["GatherMethod%s" % name]

View File

@ -20,7 +20,7 @@ import os
import kobo.rpmlib
from pypungi.linker import LinkerThread, LinkerPool
from pungi.linker import LinkerThread, LinkerPool
# TODO: global Linker instance - to keep hardlinks on dest?

View File

@ -17,7 +17,7 @@
import kobo.plugins
from pypungi.checks import validate_options
from pungi.checks import validate_options
class GatherMethodBase(kobo.plugins.Plugin):

View File

@ -20,17 +20,17 @@ import tempfile
from kobo.shortcuts import run
from pypungi.util import rmtree
from pypungi.wrappers.pungi import PungiWrapper
from pungi.util import rmtree
from pungi.wrappers.pungi import PungiWrapper
from pypungi.arch import tree_arch_to_yum_arch
import pypungi.phases.gather
from pungi.arch import tree_arch_to_yum_arch
import pungi.phases.gather
import pypungi.phases.gather.method
import pungi.phases.gather.method
class GatherMethodDeps(pypungi.phases.gather.method.GatherMethodBase):
class GatherMethodDeps(pungi.phases.gather.method.GatherMethodBase):
enabled = True
config_options = (
{
@ -84,7 +84,7 @@ def write_pungi_config(compose, arch, variant, packages, groups, filter_packages
repos = {"pungi-repo": repo_path}
lookaside_repos = {}
for i, repo_url in enumerate(pypungi.phases.gather.get_lookaside_repos(compose, arch, variant)):
for i, repo_url in enumerate(pungi.phases.gather.get_lookaside_repos(compose, arch, variant)):
lookaside_repos["lookaside-repo-%s" % i] = repo_url
packages_str = []
@ -140,7 +140,7 @@ def resolve_deps(compose, arch, variant):
selfhosting = False
lookaside_repos = {}
for i, repo_url in enumerate(pypungi.phases.gather.get_lookaside_repos(compose, arch, variant)):
for i, repo_url in enumerate(pungi.phases.gather.get_lookaside_repos(compose, arch, variant)):
lookaside_repos["lookaside-repo-%s" % i] = repo_url
yum_arch = tree_arch_to_yum_arch(arch)

View File

@ -15,13 +15,13 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import pypungi.arch
from pypungi.util import pkg_is_rpm, pkg_is_srpm, pkg_is_debug
import pungi.arch
from pungi.util import pkg_is_rpm, pkg_is_srpm, pkg_is_debug
import pypungi.phases.gather.method
import pungi.phases.gather.method
class GatherMethodNodeps(pypungi.phases.gather.method.GatherMethodBase):
class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
enabled = True
config_options = (
{
@ -42,10 +42,10 @@ class GatherMethodNodeps(pypungi.phases.gather.method.GatherMethodBase):
seen_rpms = {}
seen_srpms = {}
valid_arches = pypungi.arch.get_valid_arches(arch, multilib=True)
valid_arches = pungi.arch.get_valid_arches(arch, multilib=True)
compatible_arches = {}
for i in valid_arches:
compatible_arches[i] = pypungi.arch.get_compatible_arches(i)
compatible_arches[i] = pungi.arch.get_compatible_arches(i)
for i in global_pkgset:
pkg = global_pkgset[i]

View File

@ -17,7 +17,7 @@
import kobo.plugins
from pypungi.checks import validate_options
from pungi.checks import validate_options
class GatherSourceBase(kobo.plugins.Plugin):

View File

@ -26,11 +26,11 @@ set([(rpm_name, rpm_arch or None)])
"""
from pypungi.wrappers.comps import CompsWrapper
import pypungi.phases.gather.source
from pungi.wrappers.comps import CompsWrapper
import pungi.phases.gather.source
class GatherSourceComps(pypungi.phases.gather.source.GatherSourceBase):
class GatherSourceComps(pungi.phases.gather.source.GatherSourceBase):
enabled = True
config_options = (
{

View File

@ -34,10 +34,10 @@ set([(rpm_name, rpm_arch or None)])
import json
import pypungi.phases.gather.source
import pungi.phases.gather.source
class GatherSourceJson(pypungi.phases.gather.source.GatherSourceBase):
class GatherSourceJson(pungi.phases.gather.source.GatherSourceBase):
enabled = True
config_options = (
{

View File

@ -26,10 +26,10 @@ set()
"""
import pypungi.phases.gather.source
import pungi.phases.gather.source
class GatherSourceNone(pypungi.phases.gather.source.GatherSourceBase):
class GatherSourceNone(pungi.phases.gather.source.GatherSourceBase):
enabled = True
config_options = (

View File

@ -21,11 +21,11 @@ import shutil
from kobo.shortcuts import run
from pypungi.phases.base import PhaseBase
from pypungi.phases.gather import write_prepopulate_file
from pypungi.wrappers.createrepo import CreaterepoWrapper
from pypungi.wrappers.comps import CompsWrapper
from pypungi.wrappers.scm import get_file_from_scm
from pungi.phases.base import PhaseBase
from pungi.phases.gather import write_prepopulate_file
from pungi.wrappers.createrepo import CreaterepoWrapper
from pungi.wrappers.comps import CompsWrapper
from pungi.wrappers.scm import get_file_from_scm
class InitPhase(PhaseBase):

View File

@ -27,11 +27,11 @@ import tempfile
from kobo.threads import ThreadPool, WorkerThread
from kobo.shortcuts import run
from pypungi.wrappers.kojiwrapper import KojiWrapper
from pypungi.wrappers.iso import IsoWrapper
from pypungi.wrappers.scm import get_file_from_scm
from pypungi.phases.base import PhaseBase
from pypungi.util import get_arch_variant_data
from pungi.wrappers.kojiwrapper import KojiWrapper
from pungi.wrappers.iso import IsoWrapper
from pungi.wrappers.scm import get_file_from_scm
from pungi.phases.base import PhaseBase
from pungi.util import get_arch_variant_data
# HACK: define cmp in python3

View File

@ -19,9 +19,9 @@ import os
from kobo.shortcuts import force_list
import pypungi.phases.pkgset.pkgsets
from pypungi.arch import get_valid_arches
from pypungi.phases.base import PhaseBase
import pungi.phases.pkgset.pkgsets
from pungi.arch import get_valid_arches
from pungi.phases.base import PhaseBase
class PkgsetPhase(PhaseBase):
@ -56,7 +56,7 @@ def populate_arch_pkgsets(compose, path_prefix, global_pkgset):
compose.log_info("Populating package set for arch: %s" % arch)
is_multilib = arch in compose.conf["multilib_arches"]
arches = get_valid_arches(arch, is_multilib, add_src=True)
pkgset = pypungi.phases.pkgset.pkgsets.PackageSetBase(compose.conf["sigkeys"], logger=compose._logger, arches=arches)
pkgset = pungi.phases.pkgset.pkgsets.PackageSetBase(compose.conf["sigkeys"], logger=compose._logger, arches=arches)
pkgset.merge(global_pkgset, arch, arches)
pkgset.save_file_list(compose.paths.work.package_list(arch=arch), remove_path_prefix=path_prefix)
result[arch] = pkgset

View File

@ -19,9 +19,9 @@ import os
from kobo.shortcuts import run, force_list, relative_path
import pypungi.phases.pkgset.pkgsets
from pypungi.arch import get_valid_arches
from pypungi.wrappers.createrepo import CreaterepoWrapper
import pungi.phases.pkgset.pkgsets
from pungi.arch import get_valid_arches
from pungi.wrappers.createrepo import CreaterepoWrapper
# TODO: per arch?
@ -31,7 +31,7 @@ def populate_arch_pkgsets(compose, path_prefix, global_pkgset):
compose.log_info("Populating package set for arch: %s" % arch)
is_multilib = arch in compose.conf["multilib_arches"]
arches = get_valid_arches(arch, is_multilib, add_src=True)
pkgset = pypungi.phases.pkgset.pkgsets.PackageSetBase(compose.conf["sigkeys"], logger=compose._logger, arches=arches)
pkgset = pungi.phases.pkgset.pkgsets.PackageSetBase(compose.conf["sigkeys"], logger=compose._logger, arches=arches)
pkgset.merge(global_pkgset, arch, arches)
pkgset.save_file_list(compose.paths.work.package_list(arch=arch), remove_path_prefix=path_prefix)
result[arch] = pkgset

View File

@ -29,8 +29,8 @@ import kobo.rpmlib
from kobo.threads import WorkerThread, ThreadPool
from pypungi.util import pkg_is_srpm
from pypungi.arch import get_valid_arches
from pungi.util import pkg_is_srpm
from pungi.arch import get_valid_arches
class ReaderPool(ThreadPool):

View File

@ -17,7 +17,7 @@
import kobo.plugins
from pypungi.checks import validate_options
from pungi.checks import validate_options
class PkgsetSourceBase(kobo.plugins.Plugin):

View File

@ -21,16 +21,16 @@ import json
import koji
import pypungi.phases.pkgset.pkgsets
from pypungi.arch import get_valid_arches
import pungi.phases.pkgset.pkgsets
from pungi.arch import get_valid_arches
from pypungi.phases.pkgset.common import create_arch_repos, create_global_repo, populate_arch_pkgsets
from pungi.phases.pkgset.common import create_arch_repos, create_global_repo, populate_arch_pkgsets
import pypungi.phases.pkgset.source
import pungi.phases.pkgset.source
class PkgsetSourceKoji(pypungi.phases.pkgset.source.PkgsetSourceBase):
class PkgsetSourceKoji(pungi.phases.pkgset.source.PkgsetSourceBase):
enabled = True
config_options = (
{
@ -121,7 +121,7 @@ def populate_global_pkgset(compose, koji_proxy, path_prefix, compose_tag, event_
pkgset = pickle.load(open(global_pkgset_path, "r"))
else:
compose.log_info(msg)
pkgset = pypungi.phases.pkgset.pkgsets.KojiPackageSet(koji_proxy, compose.conf["sigkeys"], logger=compose._logger, arches=ALL_ARCHES)
pkgset = pungi.phases.pkgset.pkgsets.KojiPackageSet(koji_proxy, compose.conf["sigkeys"], logger=compose._logger, arches=ALL_ARCHES)
pkgset.populate(compose_tag, event_id, inherit=inherit)
f = open(global_pkgset_path, "w")
data = pickle.dumps(pkgset)

View File

@ -20,20 +20,20 @@ import cPickle as pickle
from kobo.shortcuts import run
import pypungi.phases.pkgset.pkgsets
from pypungi.arch import get_valid_arches
from pypungi.util import makedirs
from pypungi.wrappers.pungi import PungiWrapper
import pungi.phases.pkgset.pkgsets
from pungi.arch import get_valid_arches
from pungi.util import makedirs
from pungi.wrappers.pungi import PungiWrapper
from pypungi.phases.pkgset.common import create_global_repo, create_arch_repos, populate_arch_pkgsets
from pypungi.phases.gather import get_prepopulate_packages
from pypungi.linker import LinkerThread, LinkerPool
from pungi.phases.pkgset.common import create_global_repo, create_arch_repos, populate_arch_pkgsets
from pungi.phases.gather import get_prepopulate_packages
from pungi.linker import LinkerThread, LinkerPool
import pypungi.phases.pkgset.source
import pungi.phases.pkgset.source
class PkgsetSourceRepos(pypungi.phases.pkgset.source.PkgsetSourceBase):
class PkgsetSourceRepos(pungi.phases.pkgset.source.PkgsetSourceBase):
enabled = True
config_options = (
{
@ -136,7 +136,7 @@ def populate_global_pkgset(compose, file_list, path_prefix):
pkgset = pickle.load(open(global_pkgset_path, "r"))
else:
compose.log_info(msg)
pkgset = pypungi.phases.pkgset.pkgsets.FilelistPackageSet(compose.conf["sigkeys"], logger=compose._logger, arches=ALL_ARCHES)
pkgset = pungi.phases.pkgset.pkgsets.FilelistPackageSet(compose.conf["sigkeys"], logger=compose._logger, arches=ALL_ARCHES)
pkgset.populate(file_list)
f = open(global_pkgset_path, "w")
data = pickle.dumps(pkgset)
@ -162,9 +162,9 @@ def write_pungi_config(compose, arch, variant, repos=None, comps_repo=None, pack
# TODO move to a function
gather_source = "GatherSource%s" % compose.conf["gather_source"]
from pypungi.phases.gather.source import GatherSourceContainer
import pypungi.phases.gather.sources
GatherSourceContainer.register_module(pypungi.phases.gather.sources)
from pungi.phases.gather.source import GatherSourceContainer
import pungi.phases.gather.sources
GatherSourceContainer.register_module(pungi.phases.gather.sources)
container = GatherSourceContainer()
SourceClass = container[gather_source]
src = SourceClass(compose)

View File

@ -45,11 +45,11 @@ import pipes
from kobo.shortcuts import run
from pypungi.arch import split_name_arch
from pypungi.util import makedirs, pkg_is_rpm
from pypungi.phases.base import PhaseBase
from pypungi.wrappers.iso import IsoWrapper
from pypungi.wrappers.scm import get_file_from_scm, get_dir_from_scm
from pungi.arch import split_name_arch
from pungi.util import makedirs, pkg_is_rpm
from pungi.phases.base import PhaseBase
from pungi.wrappers.iso import IsoWrapper
from pungi.wrappers.scm import get_file_from_scm, get_dir_from_scm
class ProductimgPhase(PhaseBase):

View File

@ -19,11 +19,11 @@ import tempfile
from kobo.shortcuts import run
from pypungi.wrappers.repoclosure import RepoclosureWrapper
from pypungi.arch import get_valid_arches
from pypungi.phases.base import PhaseBase
from pypungi.phases.gather import get_lookaside_repos
from pypungi.util import rmtree
from pungi.wrappers.repoclosure import RepoclosureWrapper
from pungi.arch import get_valid_arches
from pungi.phases.base import PhaseBase
from pungi.phases.gather import get_lookaside_repos
from pungi.util import rmtree
class TestPhase(PhaseBase):

View File

@ -24,7 +24,7 @@ import time
import kobo.log
from kobo.shortcuts import run, force_list
from pypungi.util import explode_rpm_package, makedirs
from pungi.util import explode_rpm_package, makedirs
class ScmBase(kobo.log.LoggingBase):