diff options
author | William A. Kennington III <william@wkennington.com> | 2014-12-02 16:43:01 -0800 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2014-12-02 16:43:01 -0800 |
commit | 287db58750837075ee5272d228b059d1abac0387 (patch) | |
tree | afb8e9fc8148e821161ba0bef9774e366ac61076 /pkgs/development/compilers | |
parent | d6c3b564c462550216a50e9ff005b23f59dcabf2 (diff) | |
download | nixlib-287db58750837075ee5272d228b059d1abac0387.tar nixlib-287db58750837075ee5272d228b059d1abac0387.tar.gz nixlib-287db58750837075ee5272d228b059d1abac0387.tar.bz2 nixlib-287db58750837075ee5272d228b059d1abac0387.tar.lz nixlib-287db58750837075ee5272d228b059d1abac0387.tar.xz nixlib-287db58750837075ee5272d228b059d1abac0387.tar.zst nixlib-287db58750837075ee5272d228b059d1abac0387.zip |
icedtea: Fix updater to work with latest icedtea changes
Diffstat (limited to 'pkgs/development/compilers')
-rwxr-xr-x | pkgs/development/compilers/icedtea/update.py | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/pkgs/development/compilers/icedtea/update.py b/pkgs/development/compilers/icedtea/update.py index ba3c5fc51ad1..69cf0906bce7 100755 --- a/pkgs/development/compilers/icedtea/update.py +++ b/pkgs/development/compilers/icedtea/update.py @@ -81,7 +81,7 @@ def get_latest_version_url(major): def get_old_bundle_attrs(jdk, bundle): attrs = {} - for attr in ('changeset', 'url', 'sha256'): + for attr in ('url', 'sha256'): attrs[attr] = get_jdk_attr(jdk, 'bundles.{}.{}'.format(bundle, attr)) return attrs @@ -128,7 +128,7 @@ def get_new_bundle_attr(makefile, bundle, attr): return m.group(1) -def get_new_bundle_attrs(jdk, branch, path): +def get_new_bundle_attrs(jdk, version, branch, path): hg_url = HG_URL.format(jdk, branch) attrs = {} @@ -137,31 +137,20 @@ def get_new_bundle_attrs(jdk, branch, path): tar = tarfile.open(name = path, mode = 'r:xz') makefile = get_member_file(tar, 'Makefile.am') - hotspot_map = get_member_file(tar, 'hotspot.map') + hotspot_map = get_member_file(tar, 'hotspot.map.in') for bundle in BUNDLES: battrs = {} + battrs['url'] = 'http://icedtea.wildebeest.org/download/drops/icedtea{}/{}/{}.tar.bz2'.format(jdk, version, bundle) if bundle == 'hotspot': - m = re.search(r'^default (.*?) (.*?) (.*?)$', hotspot_map, re.MULTILINE) + m = re.search(r'^default (.*?) (.*?) (.*?) (.*?)$', hotspot_map, re.MULTILINE) if m == None: - raise Exception('Could not find info for hotspot bundle in hotspot.map') + raise Exception('Could not find info for hotspot bundle in hotspot.map.in') - battrs['url'] = '{}/archive/{}.tar.gz'.format(m.group(1), m.group(2)) - battrs['changeset'] = m.group(2) - battrs['sha256'] = m.group(3) - - attrs[bundle] = battrs - continue - - changeset = get_new_bundle_attr(makefile, bundle, 'changeset') - battrs['changeset'] = changeset - battrs['sha256'] = get_new_bundle_attr(makefile, bundle, 'sha256sum') - - if bundle == 'openjdk': - battrs['url'] = '{}/archive/{}.tar.gz'.format(hg_url, changeset) + battrs['sha256'] = m.group(4) else: - battrs['url'] = '{}/{}/archive/{}.tar.gz'.format(hg_url, bundle, changeset) + battrs['sha256'] = get_new_bundle_attr(makefile, bundle, 'sha256sum') attrs[bundle] = battrs @@ -203,7 +192,7 @@ def get_new_attrs(jdk): print('Inspecting tarball for bundle information...') - attrs['bundles'] = get_new_bundle_attrs(jdk, attrs['branch'], path) + attrs['bundles'] = get_new_bundle_attrs(jdk, attrs['version'], attrs['branch'], path) print('Done!') @@ -235,10 +224,8 @@ def generate_jdk(jdk): b_url = battrs['url'] b_url = b_url.replace(hg_url, '${hg_url}') - b_url = b_url.replace(battrs['changeset'], '${changeset}') src += ' {} = rec {{\n'.format(bundle) - src += ' changeset = "{}";\n'.format(battrs['changeset']) src += ' url = "{}";\n'.format(b_url) src += ' sha256 = "{}";\n'.format(battrs['sha256']) src += ' };\n' |