mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Fix permissions of deb structure in postinst script
This commit is contained in:
parent
4c7c0b4b68
commit
f94344fb70
@ -292,6 +292,12 @@ class Installer:
|
||||
print >>controlfile, "Description: %s" % self.fullname
|
||||
print >>controlfile, "Depends: libc6, libgcc1, libstdc++6, libx11-6"
|
||||
controlfile.close()
|
||||
postinst = open(Filename(tempdir, "postinst").toOsSpecific(), "w")
|
||||
print >>postinst, "#!/bin/sh"
|
||||
print >>postinst, "chmod -R 777 /usr/share/%s" % self.shortname.lower()
|
||||
print >>postinst, "chmod -R 555 /usr/share/%s/hosts" % self.shortname.lower()
|
||||
postinst.close()
|
||||
os.chmod(Filename(tempdir, "postinst").toOsSpecific(), 0755)
|
||||
postrmfile = open(Filename(tempdir, "postrm").toOsSpecific(), "w")
|
||||
print >>postrmfile, "#!/bin/sh"
|
||||
print >>postrmfile, "rm -rf /usr/share/%s" % self.shortname.lower()
|
||||
@ -313,13 +319,16 @@ class Installer:
|
||||
|
||||
# Create a control.tar.gz file in memory
|
||||
controlfile = Filename(tempdir, "control")
|
||||
postinstfile = Filename(tempdir, "postinst")
|
||||
postrmfile = Filename(tempdir, "postrm")
|
||||
controltargz = CachedFile()
|
||||
controltarfile = tarfile.TarFile.gzopen("control.tar.gz", "w", controltargz, 9)
|
||||
controltarfile.add(controlfile.toOsSpecific(), "control")
|
||||
controltarfile.add(postinstfile.toOsSpecific(), "postinst")
|
||||
controltarfile.add(postrmfile.toOsSpecific(), "postrm")
|
||||
controltarfile.close()
|
||||
controlfile.unlink()
|
||||
postinstfile.unlink()
|
||||
postrmfile.unlink()
|
||||
|
||||
# Create the data.tar.gz file in the temporary directory
|
||||
|
@ -202,6 +202,12 @@ if version == '' and deploy_mode == 'installer':
|
||||
if not outputDir:
|
||||
print '\nYou must name the output directory with the -o parameter.\n'
|
||||
sys.exit(1)
|
||||
if not outputDir.exists():
|
||||
print '\nThe specified output directory does not exist!\n'
|
||||
sys.exit(1)
|
||||
elif not outputDir.isDirectory():
|
||||
print '\nThe specified output directory is a file!\n'
|
||||
sys.exit(1)
|
||||
|
||||
if deploy_mode == 'standalone':
|
||||
s = Standalone(appFilename, tokens)
|
||||
|
Loading…
x
Reference in New Issue
Block a user