Skip to content

Commit

Permalink
Merge pull request #549 from ubuntu/lang_fix
Browse files Browse the repository at this point in the history
Fix Rust and Swift frameworks
  • Loading branch information
LyzardKing authored May 22, 2018
2 parents 8d9bf54 + 93b97d2 commit 337d262
Showing 4 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions docker/create_packages.sh
Original file line number Diff line number Diff line change
@@ -139,6 +139,7 @@ mkdir -p $repo_root_dir/swift
cd $repo_root_dir/swift
create_package clang
create_package libicu-dev
create_package libicu55
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

# unity3d deps
Binary file not shown.
10 changes: 5 additions & 5 deletions umake/frameworks/rust.py
Original file line number Diff line number Diff line change
@@ -74,10 +74,10 @@ def post_install(self):
os.path.join(self.install_path, "cargo", "bin"))},
"LD_LIBRARY_PATH": {"value": os.path.join(self.install_path, "rustc", "lib")}})

# adjust for rust 1.5 some symlinks magic to have stdlib craft available
os.chdir(os.path.join(self.install_path, "rustc", "lib"))
os.rename("rustlib", "rustlib.init")
os.symlink(glob(os.path.join('..', '..', 'rust-std-*', 'lib', 'rustlib'))[0], 'rustlib')
os.symlink(os.path.join('..', 'rustlib.init', 'etc'), os.path.join('rustlib', 'etc'))
# adjust for rust: some symlinks magic to have stdlib craft available
arch_lib_folder = '{}-unknown-linux-gnu'.format(self.arch_trans[get_current_arch()])
os.symlink(os.path.join(self.install_path, 'rust-std-{}'.format(arch_lib_folder), 'lib', 'rustlib',
arch_lib_folder, 'lib'),
os.path.join(self.install_path, 'rustc', 'lib', 'rustlib', arch_lib_folder, 'lib'))

UI.delayed_display(DisplayMessage(self.RELOGIN_REQUIRE_MSG.format(self.name)))
12 changes: 7 additions & 5 deletions umake/frameworks/swift.py
Original file line number Diff line number Diff line change
@@ -48,7 +48,8 @@ class SwiftLang(umake.frameworks.baseinstaller.BaseInstaller):

def __init__(self, **kwargs):
super().__init__(name="Swift Lang", description=_("Swift compiler (default)"), is_category_default=True,
packages_requirements=["clang", "libicu-dev"],
packages_requirements=["clang", "libicu-dev",
"libicu57 | libicu55"],
only_on_archs=['amd64'],
download_page="https://swift.org/download/",
dir_to_decompress_in_tarball="swift*",
@@ -83,10 +84,11 @@ def get_metadata_and_check_license(self, result):
line_content = line.decode()
(new_sig_url, in_download) = self.parse_download_link(line_content, in_download)
if str(new_sig_url) > str(sig_url):
tmp_release = re.search("ubuntu(.....).tar", new_sig_url).group(1)
if tmp_release <= get_current_ubuntu_version():
sig_url = new_sig_url

# Avoid fetching development snapshots
if 'DEVELOPMENT-SNAPSHOT' not in new_sig_url:
tmp_release = re.search("ubuntu(.....).tar", new_sig_url).group(1)
if tmp_release <= get_current_ubuntu_version():
sig_url = new_sig_url
if not sig_url:
logger.error("Download page changed its syntax or is not parsable")
UI.return_main_screen(status_code=1)

0 comments on commit 337d262

Please sign in to comment.