diff -Nuar ubiquity.old/ubiquity/install_misc.py ubiquity/ubiquity/install_misc.py --- ubiquity.old/ubiquity/install_misc.py 2013-02-18 11:50:49.026884728 +0100 +++ ubiquity/ubiquity/install_misc.py 2013-02-18 13:07:03.261567131 +0100 @@ -1042,13 +1042,25 @@ langpacks_file = '/var/lib/ubiquity/langpacks' if os.path.exists(langpacks_file): osextras.unlink_force(langpacks_file) + p1 = subprocess.Popen(['dpkg','-l'],stdout=subprocess.PIPE).communicate()[0] + list_packages = p1.split('\n') + installed_language_pack = [] + for package in list_packages: + try: + package_name = package.split(' ')[2] + if package_name.startswith('language-pack-'): + installed_language_pack.append(package_name) + except: + pass + if install_new: if save: if not os.path.exists(os.path.dirname(langpacks_file)): os.makedirs(os.path.dirname(langpacks_file)) with open(langpacks_file, 'w') as langpacks: for pkg in to_install: - print >>langpacks, pkg + if pkg not in installed_language_pack: + print >>langpacks, pkg return [] else: return to_install