[sabayon] bgo#551535 - Don't ignore gconf directories when saving the profile, so that gconf data gets actuall



commit 70106cf0ec86afdf4d653175c4e13122ace23dc1
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Fri Aug 14 14:52:05 2009 -0500

    bgo#551535 - Don't ignore gconf directories when saving the profile, so that gconf data gets actually stored
    
    We used to keep a single list of DIRECTORIES_TO_IGNORE, which were not included in file
    monitoring nor when saving the profile.  However, those directories have the .gconf* ones
    among them.  We need to preserve the gconf directories when saving the profile, otherwise
    no GConf data gets saved.
    
    So, we now keep two separate lists; one DIRECTORIES_TO_IGNORE for file monitoring,
    and another one DIRECTORIES_TO_IGNORE_PROFILE to be used just while saving the profile.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 lib/config.py.in |   26 +++++++++++++++++++++++++-
 lib/storage.py   |    7 +++++--
 2 files changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/lib/config.py.in b/lib/config.py.in
index c5c9990..a160ab6 100755
--- a/lib/config.py.in
+++ b/lib/config.py.in
@@ -105,6 +105,8 @@ FILES_TO_IGNORE = [
 DIRECTORIES_TO_IGNORE = [
     ".beagle",
     ".cache",
+    ".ccache",
+    ".dbus",
     ".fontconfig",
     ".gconf",
     ".gconf.xml.defaults",
@@ -114,8 +116,30 @@ DIRECTORIES_TO_IGNORE = [
     ".gstreamer-0.8",
     ".gstreamer-0.10",
     ".gvfs",
+    ".local/share/tracker",
+    ".metacity/sessions",
+    ".profile_cache",
+    ".pulse",
+    ".thumbnails",
+    ".wapi",
+    ".Trash"
+]
+
+#
+# Directories which we don't want to add when saving profile
+# 
+DIRECTORIES_TO_IGNORE_PROFILE = [
+    ".beagle",
+    ".cache",
+    ".ccache",
+    ".dbus",
+    ".fontconfig",
+    ".gconfd",
+    ".gstreamer-0.8",
+    ".gstreamer-0.10",
+    ".gvfs",
+    ".local/share/tracker",
     ".metacity/sessions",
-    ".nautilus/metafiles",
     ".profile_cache",
     ".pulse",
     ".thumbnails",
diff --git a/lib/storage.py b/lib/storage.py
index abb1c22..595ab0b 100755
--- a/lib/storage.py
+++ b/lib/storage.py
@@ -601,7 +601,8 @@ class ProfileStorage:
                         # We need to stop if we are recursing inside a ignored 
                         # directory.
                         if util.should_ignore_dir (homedir, 
-                                DIRECTORIES_TO_IGNORE, os.path.join(homedir, name, f)):
+                                                   DIRECTORIES_TO_IGNORE_PROFILE,
+                                                   os.path.join (homedir, name, f)):
                             dprint ("Not going inside %s as it is an ignored directory.", path)
                         else:
                             zip_directory (save_zip,
@@ -613,7 +614,9 @@ class ProfileStorage:
                         if os.path.join (name, f) in zip_filelist:
                             dprint ("Not adding %s to zipfile since it is already in the file", os.path.join (name, f))
                         elif util.should_ignore_file (homedir, 
-                                DIRECTORIES_TO_IGNORE, FILES_TO_IGNORE, os.path.join(homedir, name, f)):
+                                                      DIRECTORIES_TO_IGNORE_PROFILE,
+                                                      FILES_TO_IGNORE,
+                                                      os.path.join (homedir, name, f)):
                             dprint ("Not adding %s to zipfile since it is a ignored file", os.path.join (name, f))
                         else:
                             zip_filelist.append(os.path.join(name, f))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]