[yum-cvs] yum/yum sqlitesack.py,1.92,1.93

James Bowes jbowes at linux.duke.edu
Sun Apr 8 21:40:43 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv13341/yum

Modified Files:
	sqlitesack.py 
Log Message:
Ok, let's always rip off the trailing slash

Index: sqlitesack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/sqlitesack.py,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- sqlitesack.py	8 Apr 2007 21:29:36 -0000	1.92
+++ sqlitesack.py	8 Apr 2007 21:40:41 -0000	1.93
@@ -277,7 +277,11 @@
         if not re.match('.*[\*\?\[\]].*', name):
             glob = False
             querytype = '='
-        
+
+        # Take off the trailing slash to act like rpm
+        if name[-1] == '/':
+            name = name[:-1]
+       
         pkgs = []
         if len(self.filelistsdb.keys()) == 0:
             # grab repo object from primarydb and force filelists population in this sack using repo
@@ -314,10 +318,6 @@
             if glob:
                 dirname_check = ""
             else:
-                if name[-1] == '/':
-                    tosplit = name[:-1]
-                else:
-                    tosplit = name
                 dirname = os.path.dirname(name)
                 dirname_check = "filelist.dirname = '%s' and " % dirname
 




More information about the Yum-cvs-commits mailing list