Do not uninstall wxaddons module or files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -112,6 +112,13 @@ class InstalledReceipt(object):
|
|||||||
handleFile(name)
|
handleFile(name)
|
||||||
handleDir(dirpath)
|
handleDir(dirpath)
|
||||||
|
|
||||||
|
# wxaddons should be always kept as the user may have installed
|
||||||
|
# third-party modules seperate from wxpython.
|
||||||
|
def testWxaddons(self, name):
|
||||||
|
for prefix in PREFIXES:
|
||||||
|
if name.startswith(prefix + "wxaddons"):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def testCommon(self, name):
|
def testCommon(self, name):
|
||||||
for cmn in COMMON_FILES:
|
for cmn in COMMON_FILES:
|
||||||
@@ -125,6 +132,8 @@ class InstalledReceipt(object):
|
|||||||
if os.path.exists(name):
|
if os.path.exists(name):
|
||||||
if not self.lastInstall and self.testCommon(name):
|
if not self.lastInstall and self.testCommon(name):
|
||||||
return
|
return
|
||||||
|
if self.testWxaddons(name):
|
||||||
|
return
|
||||||
print "Will remove:", name
|
print "Will remove:", name
|
||||||
self.walkFiles(show, show)
|
self.walkFiles(show, show)
|
||||||
|
|
||||||
@@ -144,11 +153,13 @@ class InstalledReceipt(object):
|
|||||||
if os.path.exists(name):
|
if os.path.exists(name):
|
||||||
if not self.lastInstall and self.testCommon(name):
|
if not self.lastInstall and self.testCommon(name):
|
||||||
return
|
return
|
||||||
|
if self.testWxaddons(name):
|
||||||
|
return
|
||||||
print "Removing:", name
|
print "Removing:", name
|
||||||
os.unlink(name)
|
os.unlink(name)
|
||||||
def removeDir(name):
|
def removeDir(name):
|
||||||
print "Removing:", name
|
print "Removing:", name
|
||||||
if os.path.exists(name):
|
if os.path.exists(name) and not self.testWxaddons(name):
|
||||||
hasFiles = os.listdir(name)
|
hasFiles = os.listdir(name)
|
||||||
if hasFiles: # perhaps some stale symlinks, or .pyc files
|
if hasFiles: # perhaps some stale symlinks, or .pyc files
|
||||||
for file in hasFiles:
|
for file in hasFiles:
|
||||||
|
Reference in New Issue
Block a user