Two issues spotted by Ronald OUssoren:

- there were no accessor functions for the global per-database fields
- packages and their dependencies were installed in order in stead
  of in reverse order.
This commit is contained in:
Jack Jansen 2004-03-13 23:50:48 +00:00
parent c32cec14b4
commit 118e1277a6
4 changed files with 2234 additions and 3 deletions

View File

@ -4,6 +4,8 @@ def FOUR_CHAR_CODE(x): return x
from Carbon.Files import *
kLSRequestAllInfo = -1
kLSRolesAll = -1
kLSUnknownType = FOUR_CHAR_CODE('\0\0\0\0')
kLSUnknownCreator = FOUR_CHAR_CODE('\0\0\0\0')
kLSInvalidExtensionIndex = -1
kLSUnknownErr = -10810
kLSNotAnApplicationErr = -10811
@ -49,8 +51,8 @@ kLSRolesViewer = 0x00000002
kLSRolesEditor = 0x00000004
# kLSRolesAll = (unsigned long)0xFFFFFFFF
kLSUnknownKindID = 0
kLSUnknownType = 0
kLSUnknownCreator = 0
# kLSUnknownType = 0
# kLSUnknownCreator = 0
kLSAcceptDefault = 0x00000001
kLSAcceptAllowLoginUI = 0x00000002
kLSLaunchDefaults = 0x00000001

View File

@ -1 +1,6 @@
from _Qt import *
try:
_ = AddFilePreview
except:
raise ImportError, "Old (2.3) _Qt.so module loaded in stead of new (2.4) _Qt.so"

File diff suppressed because it is too large Load Diff

View File

@ -358,11 +358,18 @@ class PimpDatabase:
def __init__(self, prefs):
self._packages = []
self.preferences = prefs
self._url = ""
self._urllist = []
self._version = ""
self._maintainer = ""
self._description = ""
# Accessor functions
def url(self): return self._url
def version(self): return self._version
def maintainer(self): return self._maintainer
def description(self): return self._description
def close(self):
"""Clean up"""
self._packages = []
@ -393,6 +400,7 @@ class PimpDatabase:
% (self._version, PIMP_VERSION))
self._maintainer = plistdata.get('Maintainer', '')
self._description = plistdata.get('Description', '').strip()
self._url = url
self._appendPackages(plistdata['Packages'])
others = plistdata.get('Include', [])
for url in others:
@ -900,7 +908,7 @@ class PimpInstaller:
def _addPackages(self, packages):
for package in packages:
if not package in self._todo:
self._todo.insert(0, package)
self._todo.append(package)
def _prepareInstall(self, package, force=0, recursive=1):
"""Internal routine, recursive engine for prepareInstall.