Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11609 - /trunk/libzypp/zypp/target/TargetImpl.cc
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Thu, 06 Nov 2008 17:36:41 -0000
  • Message-id: <20081106173641.D2A3B3392C@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Thu Nov 6 18:36:41 2008
New Revision: 11609

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11609&view=rev
Log:
dont throw if we can't create those files

Modified:
trunk/libzypp/zypp/target/TargetImpl.cc

Modified: trunk/libzypp/zypp/target/TargetImpl.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/TargetImpl.cc?rev=11609&r1=11608&r2=11609&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/TargetImpl.cc (original)
+++ trunk/libzypp/zypp/target/TargetImpl.cc Thu Nov 6 18:36:41 2008
@@ -385,9 +385,17 @@
// this value is used for statistics
Pathname idpath( home() / "AnonymousUniqueId");

- updateFileContent( idpath,
- boost::bind(fileMissing, idpath),
- generateRandomId );
+ try
+ {
+ updateFileContent( idpath,
+ boost::bind(fileMissing, idpath),
+ generateRandomId );
+ }
+ catch ( const Exception &e )
+ {
+ WAR << "Can't create anonymous id file" << endl;
+ }
+
}

void TargetImpl::createLastDistributionFlavorCache() const
@@ -405,11 +413,20 @@
}

string flavor = p->flavor();
-
- updateFileContent( flavorpath,
- // only if flavor is not empty
- functor::Constant<bool>( ! flavor.empty() ),
- functor::Constant<string>(flavor) );
+
+ try
+ {
+
+ updateFileContent( flavorpath,
+ // only if flavor is not empty
+ functor::Constant<bool>( ! flavor.empty() ),
+ functor::Constant<string>(flavor) );
+ }
+ catch ( const Exception &e )
+ {
+ WAR << "Can't create flavor cache" << endl;
+ return;
+ }
}

///////////////////////////////////////////////////////////////////

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

< Previous Next >
This Thread
  • No further messages