[yum-git] 2 commits - test/yum-release-i18n-test.sh yum/yumRepo.py

James Antill james at linux.duke.edu
Tue Apr 15 22:57:32 UTC 2008


 test/yum-release-i18n-test.sh |   16 ++++++++++++++++
 yum/yumRepo.py                |   14 +++++++++++++-
 2 files changed, 29 insertions(+), 1 deletion(-)

New commits:
commit 6ad63a368c3909c838df8b4c907b943886aec0b3
Author: James Antill <james at and.org>
Date:   Tue Apr 15 18:56:21 2008 -0400

    Add grouplist/groupinfo to the i18n tests

diff --git a/test/yum-release-i18n-test.sh b/test/yum-release-i18n-test.sh
index 8faa387..242bfb7 100755
--- a/test/yum-release-i18n-test.sh
+++ b/test/yum-release-i18n-test.sh
@@ -85,6 +85,22 @@ tst()
   cmd info afflib libselinux linux $PKG_BAD ¶
   cmd info afflib libselinux linux $PKG_BAD ¶ | cat
 
+  cmd grouplist
+  cmd grouplist | cat
+  # Games and Entertainment joy
+  lcmd grouplist
+  lcmd grouplist | cat
+
+  cmd groupinfo 'Games and Entertainment'
+  cmd groupinfo 'Games and Entertainment' | cat
+  cmd groupinfo 'ଖେଳ ଏବଂ ମନୋରଞ୍ଜନ'
+  cmd groupinfo 'ଖେଳ ଏବଂ ମନୋରଞ୍ଜନ' | cat
+  # Games and Entertainment joy
+  lcmd groupinfo 'Games and Entertainment'
+  lcmd groupinfo 'Games and Entertainment' | cat
+  lcmd groupinfo 'ଖେଳ ଏବଂ ମନୋରଞ୍ଜନ'
+  lcmd groupinfo 'ଖେଳ ଏବଂ ମନୋରଞ୍ଜନ' | cat
+
   $FULL_PKG_OUTPUT && cmd list
   $FULL_PKG_OUTPUT && cmd list | cat
   $FULL_PKG_OUTPUT && cmd info
commit fafdd9ce90f061a4f910f61b4d8a93c2f95de181
Author: James Antill <james at and.org>
Date:   Tue Apr 15 18:44:48 2008 -0400

     Edge case ... if the MD files checksums match we assume they are the same.
      The fails if we have --unique-md-filenames in one run, but not the other.
     So if the locations don't match ... just delete the old name and redownload

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 65ecb50..0074d11 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -965,7 +965,19 @@ class YumRepository(Repository, config.RepoConf):
             """ Check if two returns from _get_mdtype_data() are equal. """
             if ndata is None:
                 return False
-            return omdtype == nmdtype and odata.checksum == ndata.checksum
+            if omdtype != nmdtype:
+                return False
+            if odata.checksum != ndata.checksum:
+                return False
+            #  If we turn --unique-md-filenames on without chaning the data,
+            # then we'll get different filenames, but the same checksum.
+            #  Atm. just say they are different, to make sure we delete the
+            # old files.
+            orname = os.path.basename(odata.location[1])
+            nrname = os.path.basename(ndata.location[1])
+            if orname != nrname:
+                return False
+            return True
 
         all_mdtypes = self.retrieved.keys()
         if mdtypes is None:



More information about the Yum-cvs-commits mailing list