Exemplo n.º 1
0
 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)
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
 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)
Exemplo n.º 7
0
 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()
Exemplo n.º 8
0
 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)
Exemplo n.º 9
0
 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)
Exemplo n.º 10
0
 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)
Exemplo n.º 11
0
    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)
Exemplo n.º 12
0
 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
Exemplo n.º 14
0
 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)
Exemplo n.º 15
0
 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
Exemplo n.º 16
0
 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()
Exemplo n.º 17
0
 def setUp(self):
     super(FtpServerTestCase, self).setUp()
     self.config = Configuration.from_disk(None)
     ensure_directory_exists(self.config.incoming_directory)
     self.test_succeded = False
Exemplo n.º 18
0
 def initialise(self):
     ensure_directory_exists(self.base_directory)
Exemplo n.º 19
0
 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)
Exemplo n.º 20
0
 def initialise(self):
     ensure_directory_exists(self.base_directory)
     ensure_packages_json_file_exists_in_directory(self.base_directory)
Exemplo n.º 21
0
 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
Exemplo n.º 22
0
 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()
Exemplo n.º 23
0
 def initialise(self):
     ensure_directory_exists(self.base_directory)
     ensure_packages_json_file_exists_in_directory(self.base_directory)
Exemplo n.º 24
0
 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))
Exemplo n.º 25
0
 def initialise(self):
     ensure_directory_exists(self.base_directory)
     self._override_updates_symlink(self.base_directory, path.join(self.base_directory, 'updates')) # legacy