diff -Nuar ubiquity/ubiquity/install_misc.py ubiquity.orig/ubiquity/install_misc.py --- ubiquity/ubiquity/install_misc.py 2016-05-11 14:59:08.311808655 +0200 +++ ubiquity.orig/ubiquity/install_misc.py 2016-05-11 15:02:09.379813215 +0200 @@ -1108,13 +1108,26 @@ 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] + p1 = p1.decode('utf-8') + 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(pkg, file=langpacks) + if pkg not in installed_language_pack: + print(pkg, file=langpacks) return [] else: return to_install