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

Last change on this file since 1476 was 1476, checked in by daduve, 5 years ago

new patch

File size: 1.9 KB
  • ubiquity/install_misc.py

    diff -Nuar ubiquity.old/ubiquity/install_misc.py ubiquity/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
     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
    11221122
    1123         if install_new:
     1123        if install_new:
    11241124            if save:
    11251125                if not os.path.exists(os.path.dirname(langpacks_file)):
    11261126                    os.makedirs(os.path.dirname(langpacks_file))
    11271127                with open(langpacks_file, 'w') as langpacks:
    11281128                    for pkg in to_install:
    11291129                        if pkg not in installed_language_pack:
    1130                                 print(pkg, file=langpacks)
    1131                 return []
     1130                            print(pkg, file=langpacks)
     1131                return []
    11321132            else:
    11331133                return to_install
    11341134
Note: See TracBrowser for help on using the repository browser.