sadly, DirEntry type does not get filled for some remote
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 16 Oct 2008 17:23:12 +0000 (17:23 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 16 Oct 2008 17:23:12 +0000 (17:23 +0000)
protocols, therefore if we want to use find to search for
a dir entry in a list, we need to relax operator == so it
does not take in count type if it is not known.

package/libzypp.changes
zypp/PathInfo.cc
zypp/PathInfo.h

index 53ae64245ca4fc9700ffe9ee635e6ff852e10e19..19cba33bbc2b846ccf5e26aabf7ba95e0e593f28 100644 (file)
@@ -4,6 +4,12 @@ Thu Oct 16 17:57:15 CEST 2008 - jkupec@suse.cz
 - repository license methods added to RepoManager (bnc #372386)
 - revision 11377
 
+-------------------------------------------------------------------
+Thu Oct 16 16:26:01 CEST 2008 - dmacvicar@suse.de
+
+- don't take into account stat information when looking
+  for remote SHA1SUMS (part of bnc#409927)
+
 -------------------------------------------------------------------
 Wed Oct 15 18:01:48 CEST 2008 - jkupec@suse.cz
 
index b19e6473417094462f348a82454926556d5bf1f1..a383085893d88224e0f48aacfa70310adf8caeb1 100644 (file)
@@ -598,6 +598,15 @@ namespace zypp
     // METHOD NAME : readdir
     // METHOD TYPE : int
     //
+    
+    bool DirEntry::operator==( const DirEntry &rhs ) const
+    {
+      // if one of the types is not known, use the name only
+      if ( type == FT_NOT_AVAIL || rhs.type == FT_NOT_AVAIL )
+        return ( name == rhs.name );
+      return ((name == rhs.name ) && (type == rhs.type)); 
+    }
+
     int readdir( DirContent & retlist, const Pathname & path,
                  bool dots, PathInfo::Mode statmode )
     {
index 004d6c4398d4ac727d907c8107b9619d3cdacebf..bb88e80a080f260ad9286c00cf08ec54a64b8c0e 100644 (file)
@@ -490,8 +490,7 @@ namespace zypp
       , type( type_r )
       {}
 
-      bool operator==( const DirEntry &rhs ) const
-      { return ((name == rhs.name ) && (type == rhs.type)); }
+      bool operator==( const DirEntry &rhs ) const;
     };
 
     /** Returned by readdir. */