예제 #1
0
    def get_dep_files(self,
                      build_deps=False,
                      recommend_deps=False,
                      source_deps=False,
                      zip_runtime_deps=False):
        files = []

        url_dest = config.packaging_dir + os.sep + 'external_zip_pkg' + os.sep + self.package_env.name

        deps = []
        if build_deps:
            deps += self.get_mono_deps()
        if recommend_deps:
            deps += self.get_mono_recommend_deps()
        if source_deps:
            deps += self.get_mono_source_deps()

        for dep in deps:
            # Get files for mono deps
            # Woah, total cheat here, I imported packaging, and am using it!
            package = packaging.package(self.package_env,
                                        dep,
                                        HEAD_or_RELEASE=self.HEAD_or_RELEASE)

            # If this is a recommended package, don't fail if missing
            if self.get_mono_recommend_deps().count(package.name):
                fail_flag = False
            else:
                fail_flag = True

            files += package.get_files(fail_on_missing=fail_flag)

            # Get url files
            urls = package.get_distro_zip_deps()
            if zip_runtime_deps:
                urls += package.get_distro_zip_runtime_deps()
            for url in urls:
                files += [url_dest + os.sep + os.path.basename(url)]
                utils.get_url(url, url_dest)

            # Get rpm deps
            urls += self.get_rpm_deps()

        # Get url files
        urls = self.get_distro_zip_deps()
        if zip_runtime_deps:
            urls += self.get_distro_zip_runtime_deps()
        urls += self.get_rpm_deps()
        for url in urls:
            files += [url_dest + os.sep + os.path.basename(url)]
            utils.get_url(url, url_dest)

        return utils.remove_list_duplicates(files)
예제 #2
0
	def get_dep_files(self, build_deps=False, recommend_deps=False, source_deps=False, zip_runtime_deps=False):
		files = []

		url_dest = config.packaging_dir + os.sep + 'external_zip_pkg' + os.sep + self.package_env.name

		deps = []
		if build_deps:
			deps += self.get_mono_deps()
		if recommend_deps:
			deps += self.get_mono_recommend_deps()
		if source_deps:
			deps += self.get_mono_source_deps()

		for dep in deps:
			# Get files for mono deps
				# Woah, total cheat here, I imported packaging, and am using it!
			package = packaging.package(self.package_env, dep, HEAD_or_RELEASE=self.HEAD_or_RELEASE)

			# If this is a recommended package, don't fail if missing
			if self.get_mono_recommend_deps().count(package.name):
				fail_flag = False
			else:
				fail_flag = True

			files += package.get_files(fail_on_missing=fail_flag)

			# Get url files
			urls = package.get_distro_zip_deps()
			if zip_runtime_deps:
				urls += package.get_distro_zip_runtime_deps()
			for url in urls:
				files += [ url_dest + os.sep + os.path.basename(url) ]
				utils.get_url(url, url_dest)

			# Get rpm deps
			urls += self.get_rpm_deps()

		# Get url files
		urls = self.get_distro_zip_deps()
		if zip_runtime_deps:
			urls += self.get_distro_zip_runtime_deps()
		urls += self.get_rpm_deps()
		for url in urls:
			files += [ url_dest + os.sep + os.path.basename(url) ]
			utils.get_url(url, url_dest)

		return utils.remove_list_duplicates(files)
예제 #3
0
            print "Error. (Is rsync installed?)"
        archive_path = os.path.join(dest, "archive", archive_version,
                                    "download")
        distutils.dir_util.mkpath(archive_path)
        # Hardlink copy into archive
        os.system("rm -rf %s/%s" % (archive_path, repo_name))
        os.system("cp -al %s %s/" % (dest_path, archive_path))

#print files

# Collect directory names of our packages
for file in rpms:
    dirs.append(os.path.dirname(file))

# Clean up
dirs = utils.remove_list_duplicates(dirs)
sources = utils.remove_list_duplicates(sources)

os.chdir('packaging')
cwd = os.path.abspath('.')

# Munge the paths a bit for use with rsync
#  (Removing leading path section)
for i in range(0, len(dirs)):
    dirs[i] = dirs[i].replace(cwd + os.sep, '')

for i in range(0, len(sources)):
    sources[i] = sources[i].replace(cwd + os.sep, '')

print "Gathered dirs and sources:"
print "\n".join(dirs)
예제 #4
0
		if os.system("rsync --archive --delete --verbose --exclude '*.repo' %s %s" % (obs_repo, dest_path)):
			print "Error. (Is rsync installed?)"
		archive_path = os.path.join(dest, "archive", archive_version, "download")
		distutils.dir_util.mkpath(archive_path)
		# Hardlink copy into archive
		os.system("rm -rf %s/%s" % (archive_path, repo_name))
		os.system("cp -al %s %s/" % (dest_path, archive_path))

#print files

# Collect directory names of our packages
for file in rpms:
	dirs.append(os.path.dirname(file))

# Clean up
dirs = utils.remove_list_duplicates(dirs)
sources = utils.remove_list_duplicates(sources)

os.chdir('packaging')
cwd = os.path.abspath('.')

# Munge the paths a bit for use with rsync
#  (Removing leading path section)
for i in range(0,len(dirs)):
	dirs[i] = dirs[i].replace(cwd + os.sep, '')

for i in range(0,len(sources)):
	sources[i] = sources[i].replace(cwd + os.sep, '')


print "Gathered dirs and sources:"