[jhbuild/desrt/master: 33/35] packagedb: remove manifest files on uninstall
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/desrt/master: 33/35] packagedb: remove manifest files on uninstall
- Date: Sun, 4 Jan 2015 04:32:20 +0000 (UTC)
commit f8ccc4a9680f253d88edada4320909ab18abfe28
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Jan 3 22:45:48 2015 -0500
packagedb: remove manifest files on uninstall
These have been left dangling. Make sure we delete them.
https://bugzilla.gnome.org/show_bug.cgi?id=742298
jhbuild/utils/packagedb.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/utils/packagedb.py b/jhbuild/utils/packagedb.py
index 5b8acd6..79f5771 100644
--- a/jhbuild/utils/packagedb.py
+++ b/jhbuild/utils/packagedb.py
@@ -104,6 +104,9 @@ class PackageEntry:
fileutils.rename(os.path.join(self.manifests_dir, self.package + '.tmp'),
os.path.join(self.manifests_dir, self.package))
+ def remove(self):
+ os.unlink(os.path.join(self.manifests_dir, self.package))
+
def to_xml(self, doc):
entry_node = ET.Element('entry', {'package': self.package,
'version': self.version})
@@ -273,6 +276,7 @@ class PackageDB:
logging.warn(_("Failed to delete %(file)r: %(msg)s") % { 'file': path,
'msg': error_string})
+ self._entries[package_name].remove()
del self._entries[package_name]
self._write_cache()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]