aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-06-04 18:40:53 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-06-04 18:40:53 +0000
commita9dd2f039320abd8beba8710550749305a06ba97 (patch)
tree6d26545f9d1ffdecfce2a9755134933cee914581
parentf20624e954718a037c48818570a586f8ec8fde7e (diff)
downloadpaludis-a9dd2f039320abd8beba8710550749305a06ba97.tar.gz
paludis-a9dd2f039320abd8beba8710550749305a06ba97.tar.xz
Don't die if we can't remove a stale cache file.
-rw-r--r--paludis/repositories/gentoo/ebuild_entries.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/paludis/repositories/gentoo/ebuild_entries.cc b/paludis/repositories/gentoo/ebuild_entries.cc
index ec622db..29455b7 100644
--- a/paludis/repositories/gentoo/ebuild_entries.cc
+++ b/paludis/repositories/gentoo/ebuild_entries.cc
@@ -128,7 +128,17 @@ EbuildEntries::generate_version_metadata(const QualifiedPackageName & q,
if (write_metadata_cache.load(result))
ok = true;
else if (write_cache_file.exists())
- write_cache_file.unlink();
+ {
+ try
+ {
+ write_cache_file.unlink();
+ }
+ catch (const FSError &)
+ {
+ // the attempt to write a fresh file will produce a
+ // warning, no need to be too noisy
+ }
+ }
}
if (! ok)