Kaydet (Commit) 3bd8d0fb authored tarafından Just van Rossum's avatar Just van Rossum

patch #678211 from Robin Dunn

üst 2aa09566
...@@ -70,6 +70,7 @@ Relocatable ...@@ -70,6 +70,7 @@ Relocatable
Required Required
InstallOnly InstallOnly
RequiresReboot RequiresReboot
RootVolumeOnly
InstallFat\ InstallFat\
""" """
...@@ -147,6 +148,7 @@ class PackageMaker: ...@@ -147,6 +148,7 @@ class PackageMaker:
'Required': 'NO', 'Required': 'NO',
'InstallOnly': 'NO', 'InstallOnly': 'NO',
'RequiresReboot': 'NO', 'RequiresReboot': 'NO',
'RootVolumeOnly' : 'NO',
'InstallFat': 'NO'} 'InstallFat': 'NO'}
...@@ -280,13 +282,15 @@ class PackageMaker: ...@@ -280,13 +282,15 @@ class PackageMaker:
allFiles = allFiles + glob.glob(pattern) allFiles = allFiles + glob.glob(pattern)
# find pre-process and post-process scripts # find pre-process and post-process scripts
# naming convention: packageName.{pre,post}-{upgrade,install} # naming convention: packageName.{pre,post}_{upgrade,install}
# Alternatively the filenames can be {pre,post}-{upgrade,install} # Alternatively the filenames can be {pre,post}_{upgrade,install}
# in which case we prepend the package name # in which case we prepend the package name
packageName = self.packageInfo["Title"] packageName = self.packageInfo["Title"]
for pat in ("*upgrade", "*install"): for pat in ("*upgrade", "*install", "*flight"):
pattern = join(self.resourceFolder, packageName + pat) pattern = join(self.resourceFolder, packageName + pat)
pattern2 = join(self.resourceFolder, pat)
allFiles = allFiles + glob.glob(pattern) allFiles = allFiles + glob.glob(pattern)
allFiles = allFiles + glob.glob(pattern2)
# check name patterns # check name patterns
files = [] files = []
...@@ -296,15 +300,19 @@ class PackageMaker: ...@@ -296,15 +300,19 @@ class PackageMaker:
files.append((f, f)) files.append((f, f))
if f[-6:] == ".lproj": if f[-6:] == ".lproj":
files.append((f, f)) files.append((f, f))
elif f in ["pre-upgrade", "pre-install", "post-upgrade", "post-install"]: elif basename(f) in ["pre_upgrade", "pre_install", "post_upgrade", "post_install"]:
files.append((f, self.packageInfo["Title"]+"."+f)) files.append((f, packageName+"."+basename(f)))
elif f[-8:] == "-upgrade": elif basename(f) in ["preflight", "postflight"]:
files.append((f, f))
elif f[-8:] == "_upgrade":
files.append((f,f)) files.append((f,f))
elif f[-8:] == "-install": elif f[-8:] == "_install":
files.append((f,f)) files.append((f,f))
# copy files # copy files
for src, dst in files: for src, dst in files:
src = basename(src)
dst = basename(dst)
f = join(self.resourceFolder, src) f = join(self.resourceFolder, src)
if isfile(f): if isfile(f):
shutil.copy(f, os.path.join(self.packageResourceFolder, dst)) shutil.copy(f, os.path.join(self.packageResourceFolder, dst))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment