package.py 623 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. from pisi.version import Version
  3. def postInstall(fromVersion, fromRelease, toVersion, toRelease):
  4. if fromVersion and Version("0.90") <= Version(fromVersion) <= Version("0.96"):
  5. from zorg import config
  6. busId = call("zorg", "Xorg.Display", "activeDeviceID")
  7. device = config.getDeviceInfo(busId)
  8. if device:
  9. config.saveDeviceInfo(device)
  10. config.saveXorgConfig(device)
  11. if fromRelease and int(fromRelease) < 81:
  12. from zorg import config
  13. layout, variant = config.getKeymapOld()
  14. config.saveKeymap(layout, variant)