'Import stdlib data for this lang, if necessary.
"lang" is the language to update.
"ver" (optional) is a specific version of the language,
e.g. (5, 8).
"progress_cb" (optional) is a callable that is called as
follows to show the progress of the update:
progress_cb(<desc>, <value>)
where <desc> is a short string describing the current step
and <value> is an integer between 0 and 100 indicating the
level of completeness.'

def _update_lang_with_ver(self, lang, ver=None, progress_cb=None):

    log.debug("update    '%s'    stdlibs", lang)
    if progress_cb:
        try:
            progress_cb('Determining    necessary    updates...', 5)
        except:
            log.exception('error    in    progress_cb    (ignoring)')
    if (ver is not None):
        ver_str = '.'.join(map(str, ver))
        cix_path = join(self.stdlibs_dir, ('%s-%s.cix' % (safe_lang_from_lang(lang), ver_str)))
    else:
        cix_path = join(self.stdlibs_dir, ('%s.cix' % (safe_lang_from_lang(lang),)))
    self.db.acquire_lock()
    try:
        todo = []
        res = AreaResource(cix_path, 'ci-pkg-dir')
        try:
            last_updated = self.res_index[res.area_path]
        except KeyError:
            todo.append(('add', res))
        else:
            mtime = os.stat(cix_path).st_mtime
            if (last_updated != mtime):
                todo.append(('update', res))
        self._handle_res_todos(lang, todo, progress_cb)
        self.save()
    finally:
        self.db.release_lock()
