source: ubiquity/trunk/fuentes/debian/patches/nolangpacksinatall.patch

Last change on this file was 1542, checked in by kbut, 5 years ago

replace tabs in patch by whitespace

File size: 1.4 KB
  • ubiquity/install_misc.py

    diff -Nuar ubiquity/ubiquity/install_misc.py ubiquity.orig/ubiquity/install_misc.py
    old new  
    11081108        langpacks_file = '/var/lib/ubiquity/langpacks'
    11091109        if os.path.exists(langpacks_file):
    11101110            osextras.unlink_force(langpacks_file)
     1111        p1 = subprocess.Popen(['dpkg','-l'],stdout=subprocess.PIPE).communicate()[0]
     1112        p1 = p1.decode('utf-8')
     1113        list_packages = p1.split('\n')
     1114        installed_language_pack = []
     1115        for package in list_packages:
     1116            try:
     1117                package_name = package.split(' ')[2]
     1118                if package_name.startswith('language-pack-'):
     1119                    installed_language_pack.append(package_name)
     1120            except:
     1121                pass
     1122
    11111123        if install_new:
    11121124            if save:
    11131125                if not os.path.exists(os.path.dirname(langpacks_file)):
    11141126                    os.makedirs(os.path.dirname(langpacks_file))
    11151127                with open(langpacks_file, 'w') as langpacks:
    11161128                    for pkg in to_install:
    1117                         print(pkg, file=langpacks)
     1129                        if pkg not in installed_language_pack:
     1130                            print(pkg, file=langpacks)
    11181131                return []
    11191132            else:
    11201133                return to_install
Note: See TracBrowser for help on using the repository browser.