- allow downgrade if buildtime is the same esp. if both are 0
authorStefan Schubert <schubi@suse.de>
Thu, 3 Apr 2008 12:26:52 +0000 (12:26 +0000)
committerStefan Schubert <schubi@suse.de>
Thu, 3 Apr 2008 12:26:52 +0000 (12:26 +0000)
- create buildtime in the testcases

zypp/solver/detail/ResolverUpgrade.cc
zypp/solver/detail/Testcase.cc

index dad663b..71aaf30 100644 (file)
@@ -134,7 +134,7 @@ downgrade_allowed( PoolItem installed, PoolItem candidate, bool silent_downgrade
     {
        if ( silent_downgrades )
            return true;
-       if ( ipkg->buildtime() < cpkg->buildtime() ) {                  // installed has older buildtime
+       if ( ipkg->buildtime() <= cpkg->buildtime() ) {                 // installed has older or equal buildtime
            MIL << "allowed downgrade " << installed << " to " << candidate << endl;
            return true;                                                // see bug #152760
        }
index 3f5ad64..e357b66 100644 (file)
@@ -188,6 +188,7 @@ std::string helixXML( const PoolItem &item )
   str << "<" << toLower (resolvable->kind().asString()) << ">" << endl;
   str << TAB << xml_tag_enclose (resolvable->name(), "name", true) << endl;
   str << TAB << xml_tag_enclose (item->vendor(), "vendor", true) << endl;
+  str << TAB << xml_tag_enclose (item->buildtime().asSeconds(), "buildtime", true) << endl;  
   if ( isKind<Package>(resolvable) ) {
       str << TAB << "<history>" << endl << TAB << "<update>" << endl;
       str << TAB2 << helixXML (resolvable->arch()) << endl;