Mailinglist Archive: zypp-commit (325 mails)

< Previous Next >
[zypp-commit] r7184 - in /trunk/libzypp: VERSION.cmake package/libzypp.changes zypp/target/store/XMLFilesBackend.cc
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Tue, 11 Sep 2007 13:01:30 -0000
  • Message-id: <20070911130130.662252B11D@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Tue Sep 11 15:01:30 2007
New Revision: 7184

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7184&view=rev
Log:
- Don't fail if a product is deleted multiple times (e.g. due to
  obsoletes and an explicit deleted request). (#308746)

Modified:
    trunk/libzypp/VERSION.cmake
    trunk/libzypp/package/libzypp.changes
    trunk/libzypp/zypp/target/store/XMLFilesBackend.cc

Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=7184&r1=7183&r2=7184&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Tue Sep 11 15:01:30 2007
@@ -47,4 +47,4 @@
 SET(LIBZYPP_MAJOR "3")
 SET(LIBZYPP_MINOR "22")
 SET(LIBZYPP_COMPATMINOR "21")
-SET(LIBZYPP_PATCH "6")
+SET(LIBZYPP_PATCH "7")

Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=7184&r1=7183&r2=7184&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Tue Sep 11 15:01:30 2007
@@ -1,19 +1,26 @@
 -------------------------------------------------------------------
+Tue Sep 11 14:54:44 CEST 2007 - ma@xxxxxxx
+
+- Don't fail if a product is deleted multiple times (e.g. due to
+  obsoletes and an explicit deleted request). (#308746)
+- version 3.22.7
+
+-------------------------------------------------------------------
 Tue Sep 11 13:52:47 CEST 2007 - jkupec@xxxxxxx
 
-- SYSCONFDIR variable added for modifying /etc 
+- SYSCONFDIR variable added for modifying /etc
 
 -------------------------------------------------------------------
 Tue Sep 11 12:18:11 CEST 2007 - schubi@xxxxxxx
 
 - uninstallable resolvable -->suggested solution: delete; Bug 308164
-- r 7177 
+- r 7177
 
 -------------------------------------------------------------------
 Mon Sep 10 16:19:05 CEST 2007 - schubi@xxxxxxx
 
 - new translations added
-- r 7166 
+- r 7166
 - version 3.22.6
 
 -------------------------------------------------------------------
@@ -25,7 +32,7 @@
 Mon Sep 10 14:17:29 CEST 2007 - schubi@xxxxxxx
 
 - Splitting packages: Take the package with the best
-  architecture,edition ONLY; Bug 308591 
+  architecture,edition ONLY; Bug 308591
 - r 7160
 
 -------------------------------------------------------------------

Modified: trunk/libzypp/zypp/target/store/XMLFilesBackend.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/XMLFilesBackend.cc?rev=7184&r1=7183&r2=7184&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/XMLFilesBackend.cc (original)
+++ trunk/libzypp/zypp/target/store/XMLFilesBackend.cc Tue Sep 11 15:01:30 2007
@@ -47,9 +47,6 @@
 #include <zypp/ZYpp.h>
 #include <zypp/PathInfo.h>
 
-#include "boost/filesystem/operations.hpp" // includes boost/filesystem/path.hpp
-#include "boost/filesystem/fstream.hpp"    // ditto
-
 #include "XMLFilesBackend.h"
 #include "serialize.h"
 
@@ -59,7 +56,6 @@
 using std::endl;
 using std::string;
 using std::list;
-using namespace boost::filesystem;
 using namespace zypp;
 using namespace zypp::filesystem;
 
@@ -258,7 +254,7 @@
   for ( it_kinds = d->kinds.begin() ; it_kinds != d->kinds.end(); ++it_kinds )
   {
     Resolvable::Kind kind = (*it_kinds);
-    bool isthere = exists(dirForResolvableKind(kind));
+    bool isthere = PathInfo( dirForResolvableKind(kind) ).isExist();
     ok = ok && isthere;
   }
 
@@ -266,12 +262,12 @@
   for ( it_kinds = d->kinds_flags.begin() ; it_kinds != d->kinds_flags.end(); ++it_kinds )
   {
     Resolvable::Kind kind = (*it_kinds);
-    bool isthere = exists(dirForResolvableKindFlags(kind));
+    bool isthere = PathInfo( dirForResolvableKindFlags(kind) ).isExist();
     ok = ok && isthere;
   }
 
   // named flags
-  bool nmthere = exists(dirForNamedFlags());
+  bool nmthere = PathInfo( dirForNamedFlags() ).isExist();
   ok = ok && nmthere;
 
   return ok;
@@ -328,25 +324,19 @@
 std::string
 XMLFilesBackend::dirForResolvableKind( Resolvable::Kind kind ) const
 {
-  std::string dir;
-  dir += Pathname( d->root + Pathname(ZYPP_DB_DIR) + Pathname(resolvableKindToString(kind, true)) ).asString();
-  return dir;
+  return Pathname( d->root + Pathname(ZYPP_DB_DIR) + Pathname(resolvableKindToString(kind, true)) ).asString();
 }
 
 std::string
 XMLFilesBackend::dirForResolvableKindFlags( Resolvable::Kind kind ) const
 {
-  std::string dir;
-  dir += Pathname( d->root + Pathname(ZYPP_DB_DIR) + Pathname("flags") + Pathname(resolvableKindToString(kind, true)) ).asString();
-  return dir;
+  return Pathname( d->root + Pathname(ZYPP_DB_DIR) + Pathname("flags") + Pathname(resolvableKindToString(kind, true)) ).asString();
 }
 
 std::string
 XMLFilesBackend::dirForNamedFlags() const
 {
-  std::string dir;
-  dir += Pathname( d->root + Pathname(ZYPP_DB_DIR) + Pathname("named-flags")).asString();
-  return dir;
+  return Pathname( d->root + Pathname(ZYPP_DB_DIR) + Pathname("named-flags")).asString();
 }
 
 std::string
@@ -385,7 +375,7 @@
 std::string
 XMLFilesBackend::fullPathForResolvable( ResObject::constPtr resolvable ) const
 {
-  return path( path(dirForResolvable(resolvable)) / path(fileNameForResolvable(resolvable))).string();
+  return( Pathname( dirForResolvable(resolvable) ) / fileNameForResolvable(resolvable) ).asString();
 }
 
 std::string
@@ -393,14 +383,14 @@
 {
   std::stringstream key_stream(key);
   std::string key_encoded = Digest::digest("MD5", key_stream);
-  return path( path(dirForNamedFlags()) / path(key_encoded)).string();
+  return( Pathname( dirForNamedFlags() ) / key_encoded ).asString();
 }
 
 std::string
 XMLFilesBackend::fullPathForResolvableFlags( ResObject::constPtr resolvable ) const
 {
   // flags are in a hidden file with the same name
-  return path( path(dirForResolvableFlags(resolvable)) / path(fileNameForResolvable(resolvable))).string();
+  return( Pathname( dirForResolvableFlags(resolvable) ) / fileNameForResolvable(resolvable) ).asString();
 }
 
 void
@@ -520,7 +510,7 @@
 {
   std::set<std::string> _flags;
   // do we have previous saved flags?
-  if (!exists(path(filename)))
+  if ( ! PathInfo( filename ).isExist() )
     return _flags;
 
   std::ifstream file(filename.c_str());
@@ -593,8 +583,8 @@
 {
   try
   {
-    int ret = filesystem::unlink(Pathname(filename));
-    if ( ret != 0 )
+    int ret = filesystem::unlink( filename );
+    if ( ret != 0 && ret != ENOENT )
     {
       ERR << "Error removing resolvable file " << filename << std::endl;
       ZYPP_THROW(Exception("Error deleting " + filename.asString()));

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages