diff options
author | Just van Rossum <just@letterror.com> | 2003-02-01 10:07:28 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2003-02-01 10:07:28 (GMT) |
commit | 3bd8d0fb9c153552cd2593ecdeb80023b7776930 (patch) | |
tree | 30b9c5590f073cc6a32bd78fe624769151bcfac5 /Mac/scripts | |
parent | 2aa09566c5b1b1ab84db195fd73a51747c1d5606 (diff) | |
download | cpython-3bd8d0fb9c153552cd2593ecdeb80023b7776930.zip cpython-3bd8d0fb9c153552cd2593ecdeb80023b7776930.tar.gz cpython-3bd8d0fb9c153552cd2593ecdeb80023b7776930.tar.bz2 |
patch #678211 from Robin Dunn
Diffstat (limited to 'Mac/scripts')
-rw-r--r-- | Mac/scripts/buildpkg.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Mac/scripts/buildpkg.py b/Mac/scripts/buildpkg.py index 88d8b59..280f8ae 100644 --- a/Mac/scripts/buildpkg.py +++ b/Mac/scripts/buildpkg.py @@ -70,6 +70,7 @@ Relocatable Required InstallOnly RequiresReboot +RootVolumeOnly InstallFat\ """ @@ -147,6 +148,7 @@ class PackageMaker: 'Required': 'NO', 'InstallOnly': 'NO', 'RequiresReboot': 'NO', + 'RootVolumeOnly' : 'NO', 'InstallFat': 'NO'} @@ -280,13 +282,15 @@ class PackageMaker: allFiles = allFiles + glob.glob(pattern) # find pre-process and post-process scripts - # naming convention: packageName.{pre,post}-{upgrade,install} - # Alternatively the filenames can be {pre,post}-{upgrade,install} + # naming convention: packageName.{pre,post}_{upgrade,install} + # Alternatively the filenames can be {pre,post}_{upgrade,install} # in which case we prepend the package name packageName = self.packageInfo["Title"] - for pat in ("*upgrade", "*install"): + for pat in ("*upgrade", "*install", "*flight"): pattern = join(self.resourceFolder, packageName + pat) + pattern2 = join(self.resourceFolder, pat) allFiles = allFiles + glob.glob(pattern) + allFiles = allFiles + glob.glob(pattern2) # check name patterns files = [] @@ -296,15 +300,19 @@ class PackageMaker: files.append((f, f)) if f[-6:] == ".lproj": files.append((f, f)) - elif f in ["pre-upgrade", "pre-install", "post-upgrade", "post-install"]: - files.append((f, self.packageInfo["Title"]+"."+f)) - elif f[-8:] == "-upgrade": + elif basename(f) in ["pre_upgrade", "pre_install", "post_upgrade", "post_install"]: + files.append((f, packageName+"."+basename(f))) + elif basename(f) in ["preflight", "postflight"]: + files.append((f, f)) + elif f[-8:] == "_upgrade": files.append((f,f)) - elif f[-8:] == "-install": + elif f[-8:] == "_install": files.append((f,f)) # copy files for src, dst in files: + src = basename(src) + dst = basename(dst) f = join(self.resourceFolder, src) if isfile(f): shutil.copy(f, os.path.join(self.packageResourceFolder, dst)) |