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

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

add lliurex files

File size: 1.4 KB
RevLine 
[1056]1diff -Nuar ubiquity.old/ubiquity/install_misc.py ubiquity/ubiquity/install_misc.py
2--- ubiquity.old/ubiquity/install_misc.py       2013-02-18 11:50:49.026884728 +0100
3+++ ubiquity/ubiquity/install_misc.py   2013-02-18 13:07:03.261567131 +0100
4@@ -1090,6 +1090,18 @@
5         langpacks_file = '/var/lib/ubiquity/langpacks'
6         if os.path.exists(langpacks_file):
7             osextras.unlink_force(langpacks_file)
8+        p1 = subprocess.Popen(['dpkg','-l'],stdout=subprocess.PIPE).communicate()[0]
9+        p1 = p1.decode('utf-8')
10+        list_packages = p1.split('\n')
11+        installed_language_pack = []
12+        for package in list_packages:
13+            try:
14+                package_name = package.split(' ')[2]
15+                if package_name.startswith('language-pack-'):
16+                    installed_language_pack.append(package_name)
17+            except:
18+                pass
19+
20         if install_new:
21             if save:
22                 if not os.path.exists(os.path.dirname(langpacks_file)):
23@@ -1096,7 +1108,8 @@
24                     os.makedirs(os.path.dirname(langpacks_file))
25                 with open(langpacks_file, 'w') as langpacks:
26                     for pkg in to_install:
27-                        print(pkg, file=langpacks)
28+                        if pkg not in installed_language_pack:
29+                            print(pkg, file=langpacks)
30                 return []
31             else:
32                 return to_install
33
Note: See TracBrowser for help on using the repository browser.