2015-02-15 15:36:26 +01:00
|
|
|
#
|
|
|
|
# set package priority for multiple provider openmamba preferred and localization packages
|
|
|
|
#
|
|
|
|
# Copyright (c) 2011-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
#
|
|
|
|
try:
|
|
|
|
import os
|
|
|
|
import string
|
|
|
|
import re
|
|
|
|
except ImportError, e:
|
|
|
|
raise ImportError, str(e) + """
|
|
|
|
A critical module was not found. Probably this OS does not support it.
|
|
|
|
Currently pexpect is intended for UNIX operating systems."""
|
|
|
|
|
|
|
|
if os.environ.has_key("LANG"):
|
|
|
|
envlang=os.environ["LANG"]
|
|
|
|
else:
|
|
|
|
envlang="C"
|
|
|
|
uname=os.uname()
|
|
|
|
kernel_flavour=re.sub(r"^[0-9.]*", "", uname[2]);
|
|
|
|
lang=string.split(envlang, ".")[0]
|
|
|
|
lang1=string.split(lang, "_")[0]
|
|
|
|
|
|
|
|
if not sysconf.getReadOnly():
|
|
|
|
for channel in ["devel","milestone2"]:
|
|
|
|
for pkg in ["PyKDE4","PyQt4","alsaplayer-output-alsa","glibc","grub2","libpython","perl","pwdutils","python-tk","network-manager-applet","phonon-backend-gstreamer","soprano-backend-virtuoso","dhcp-client","libphonon"]:
|
|
|
|
pkgconf.removePriority(pkg,channel)
|
|
|
|
for pkg in ["OpenOffice-i18n","firefox-i18n","gcompris-i18n","gimp-help-i18n","kde-i18n","kde-l10n","koffice-i18n","man-pages-i18n","rsibreak-i18n"]:
|
|
|
|
pkgconf.removePriority("%s-%s" % (pkg,lang),channel)
|
|
|
|
pkgconf.removePriority("%s-%s" % (pkg,lang1),channel)
|
|
|
|
for pkg in ["PyKDE4","PyQt4","alsaplayer-output-alsa","glibc","grub2","libpython","perl","pwdutils","python-tk","network-manager-applet","phonon-backend-gstreamer","soprano-backend-virtuoso","dhcp-client","libphonon"]:
|
|
|
|
pkgconf.removePriority(pkg,"")
|
|
|
|
pkgconf.setPriority(pkg,None,10)
|
2015-04-26 14:08:48 +02:00
|
|
|
for pkg in ["calligra-l10n","firefox-i18n","gcompris-i18n","gimp-help-i18n","icecat-i18n",\
|
|
|
|
"kde-i18n","kde-l10n","koffice-i18n","libreoffice-i18n","man-pages-i18n","netbeans-l10n",\
|
|
|
|
"rsibreak-i18n","tesseract-i18n","thunderbird-i18n"]:
|
2015-02-15 15:36:26 +01:00
|
|
|
pkgconf.removePriority("%s-%s" % (pkg,lang),"")
|
|
|
|
pkgconf.removePriority("%s-%s" % (pkg,lang1),"")
|
|
|
|
pkgconf.setPriority("%s-%s" % (pkg,lang),None,15)
|
|
|
|
pkgconf.setPriority("%s-%s" % (pkg,lang1),None,10)
|
|
|
|
for kernelseries in ["kernel"]:
|
|
|
|
for flavour in ("mamba", "mamba-64GB", "mamba-rt", "mamba-64GB-rt", "mamba-x86_64", "mamba-xen"):
|
|
|
|
for kpkg in ("", "-headers", "-headers-sanitised", "-sound", \
|
|
|
|
"-source", "-wireless", "-nongpl-fglrx", "-nongpl-wl", \
|
|
|
|
"-nongpl-hsfmodem", "-lirc", "-ndiswrapper", "-nongpl-nvidia_173xx", \
|
|
|
|
"-nongpl-nvidia_71xx", "-nongpl-nvidia_96xx", "-nongpl-nvidia", "-nongpl-slmodem", \
|
|
|
|
"-vboxdrv", "-cm2020", "-rtl8192se", "-stk11xx"):
|
|
|
|
if (kernel_flavour == flavour):
|
|
|
|
pkgconf.removePriority("%s-%s%s" %(kernelseries, flavour, kpkg),"")
|
|
|
|
pkgconf.setPriority("%s-%s%s" %(kernelseries, flavour, kpkg),None,10)
|
|
|
|
else:
|
|
|
|
pkgconf.removePriority("%s-%s%s" %(kernelseries, flavour, kpkg),"")
|
|
|
|
pkgconf.removePriority("%s-%s%s" %(kernelseries, flavour, kpkg),None)
|
|
|
|
for kpkg in ("-sound-backport", "-wireless-backport"):
|
|
|
|
if (kernel_flavour == flavour):
|
|
|
|
pkgconf.removePriority("%s-%s%s" %(kernelseries, flavour, kpkg),"")
|
|
|
|
pkgconf.setPriority("%s-%s%s" %(kernelseries, flavour, kpkg),None,5)
|
|
|
|
else:
|
|
|
|
pkgconf.removePriority("%s-%s%s" %(kernelseries, flavour, kpkg),"")
|
|
|
|
pkgconf.removePriority("%s-%s%s" %(kernelseries, flavour, kpkg),None)
|