def setUp(self): from gevent.event import Event super(FtpWithRpcTestCase, self).setUp() self.config = self._get_config_for_test() ensure_directory_exists( path.join(self.config.incoming_directory, 'main-stable')) self.test_succeded = Event()
def consume_file(self, filepath, platform, arch): package_name, package_version, platform_string, architecture, extension = parse_filepath(filepath) package_dir = path.join(self.base_directory, package_name) ensure_directory_exists(package_dir) final_filepath = hard_link_or_raise_exception(filepath, package_dir) if self._get_latest_update_file_in_directory(package_dir) == final_filepath: self._extract_update(package_dir, final_filepath)
def consume_file(self, filepath, platform, arch): package_name, package_version, platform_string, architecture, extension = parse_filepath( filepath) directory = path.join(self.base_directory, package_name.replace('_', '-')) ensure_directory_exists(directory) filename = '{0}-{1}.tar.gz'.format(package_name, package_version) hard_link_or_raise_exception(filepath, path.join(directory, filename))
def iter_files(self): ensure_directory_exists(self.base_directory) for distribution_name, distribution_dict in KNOWN_DISTRIBUTIONS.items(): for version, architectures in distribution_dict.items(): for arch in architectures: dirpath = self.deduce_dirname(distribution_name, version, arch) for filepath in glob(path.join(dirpath, '*.deb')): yield filepath
def consume_file(self, filepath, platform, arch): package_name, package_version, platform_string, architecture, extension = parse_filepath(filepath) platform_string = "vmware-esx" if extension == "ova" else platform_string # TODO this needs to change in our build dirpath = path.join(self.base_directory, 'packages', package_name, 'releases', package_version, 'distributions', platform_string, 'architectures', architecture, 'extensions', extension) ensure_directory_exists(dirpath) hard_link_or_raise_exception(filepath, dirpath) self.rebuild_index()
def consume_file(self, filepath, platform, arch): package_name, package_version, platform_string, architecture, extension = parse_filepath( filepath) package_dir = path.join(self.base_directory, package_name) ensure_directory_exists(package_dir) final_filepath = hard_link_or_raise_exception(filepath, package_dir) if self._get_latest_update_file_in_directory( package_dir) == final_filepath: self._extract_update(package_dir, final_filepath)
def initialise(self): ensure_directory_exists(self.base_directory) for distribution_name, distribution_dict in KNOWN_DISTRIBUTIONS.items(): for version, architectures in distribution_dict.items(): for arch in architectures: dirpath = self.deduce_dirname(distribution_name, version, arch) ensure_directory_exists(dirpath) if not path.exists(path.join(dirpath, 'Packages')): write_to_packages_file(dirpath, '', 'w') self.generate_release_file_for_specific_distribution_and_version(distribution_name, version, False)
def initialise(self): ensure_directory_exists(self.base_directory) for platform, architectures in KNOWN_PLATFORMS.items(): for arch in architectures: dirpath = path.join(self.base_directory, "%s-%s" % (platform, arch)) ensure_directory_exists(path.join(dirpath, "repodata")) gkg_key = path.join(self.config.packages_directory, "gpg.key") hard_link_and_override(gkg_key, path.join(dirpath, "repodata", "repomd.xml.key")) for dirpath in glob(path.join(self.base_directory, "*")): if not self._is_repodata_exists(dirpath): createrepo(dirpath)
def initialise(self): ensure_directory_exists(self.base_directory) for platform, architectures in KNOWN_PLATFORMS.items(): for arch in architectures: dirpath = path.join(self.base_directory, '%s-%s' % (platform, arch)) ensure_directory_exists(path.join(dirpath, 'repodata')) gkg_key = path.join(self.config.packages_directory, 'gpg.key') hard_link_and_override( gkg_key, path.join(dirpath, 'repodata', 'repomd.xml.key')) for dirpath in glob(path.join(self.base_directory, '*')): if not self._is_repodata_exists(dirpath): createrepo(dirpath)
def initialise(self): from os import path ensure_directory_exists(self.base_directory) self.cachedir = path.join(self.base_directory, 'cachedir') ensure_directory_exists(self.cachedir) for platform, architectures in KNOWN_PLATFORMS.items(): for arch in architectures: dirpath = path.join(self.base_directory, '%s-%s' % (platform, arch)) ensure_directory_exists(path.join(dirpath, 'repodata')) gkg_key = path.join(self.config.packages_directory, 'gpg.key') hard_link_and_override(gkg_key, path.join(dirpath, 'repodata', 'repomd.xml.key')) for dirpath in glob(path.join(self.base_directory, '*')): if not self._is_repodata_exists(dirpath): createrepo(dirpath)
def initialise(self): ensure_directory_exists(self.base_directory)
def initialise(self): ensure_directory_exists(self.base_directory) self._override_updates_symlink(self.base_directory, path.join(self.base_directory, 'updates')) # legacy
def __init__(self, *args, **kwargs): from os import path super(YumIndexer, self).__init__(*args, **kwargs) self.cachedir = path.join(self.base_directory, 'cachedir') ensure_directory_exists(self.cachedir)
def setUp(self): super(FtpServerTestCase, self).setUp() self.config = self._get_config_for_test() ensure_directory_exists(self.config.incoming_directory) self.test_succeded = False
def setUp(self): from gevent.event import Event super(FtpWithRpcTestCase, self).setUp() self.config = Configuration.from_disk(None) ensure_directory_exists(path.join(self.config.incoming_directory, 'main-stable')) self.test_succeded = Event()
def setUp(self): super(FtpServerTestCase, self).setUp() self.config = Configuration.from_disk(None) ensure_directory_exists(self.config.incoming_directory) self.test_succeded = False
def initialise(self): ensure_directory_exists(self.base_directory) ensure_packages_json_file_exists_in_directory(self.base_directory)
def setUp(self): from gevent.event import Event super(FtpWithRpcTestCase, self).setUp() self.config = self._get_config_for_test() ensure_directory_exists(path.join(self.config.incoming_directory, 'main-stable')) self.test_succeded = Event()
def consume_file(self, filepath, platform, arch): package_name, package_version, platform_string, architecture, extension = parse_filepath(filepath) directory = path.join(self.base_directory, package_name) ensure_directory_exists(directory) filename = '{0}-{1}.tar.gz'.format(package_name, package_version) hard_link_or_raise_exception(filepath, path.join(directory, filename))