summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authordan <dan@pkgsrc.org>2006-09-22 11:14:05 +0000
committerdan <dan@pkgsrc.org>2006-09-22 11:14:05 +0000
commitab0530311a436f62bed53fd3c36daf35182bf84d (patch)
treec77191c3f62b04dc7f377e2953e5685c3b56aa2a /devel
parent119d8ee846d8df5c105515e6e2cbb30a34c591ea (diff)
downloadpkgsrc-ab0530311a436f62bed53fd3c36daf35182bf84d.tar.gz
Fix a regression introduced between 0.29 and 0.30 detected when
handling large repositories like NetBSD src. Problem found by riz@, fix from mainline a:njs/d:2006-09-22T07:01:26, tested by me. bump rev to nb1 ChangeLog: 2006-09-21 Nathaniel Smith <njs@pobox.com> * lru_writeback_cache.hh (clean_insert): Correct the cache overflow logic so as to _actually_ never remove the last element. Add an invariant to verify this. (insert_dirty): Add an invariant here too.
Diffstat (limited to 'devel')
-rw-r--r--devel/monotone/Makefile3
-rw-r--r--devel/monotone/distinfo3
-rw-r--r--devel/monotone/patches/patch-ab32
3 files changed, 36 insertions, 2 deletions
diff --git a/devel/monotone/Makefile b/devel/monotone/Makefile
index d934e99b493..d623946fce4 100644
--- a/devel/monotone/Makefile
+++ b/devel/monotone/Makefile
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.28 2006/09/18 15:36:34 jmmv Exp $
+# $NetBSD: Makefile,v 1.29 2006/09/22 11:14:05 dan Exp $
#
DISTNAME= monotone-0.30
CATEGORIES= devel
MASTER_SITES= http://monotone.ca/downloads/
+PKGREVISION= 1
MAINTAINER= jmmv@NetBSD.org
HOMEPAGE= http://monotone.ca/
diff --git a/devel/monotone/distinfo b/devel/monotone/distinfo
index a4d782bdb22..7ff1fe9e21e 100644
--- a/devel/monotone/distinfo
+++ b/devel/monotone/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.21 2006/09/20 13:10:10 jmmv Exp $
+$NetBSD: distinfo,v 1.22 2006/09/22 11:14:06 dan Exp $
SHA1 (monotone-0.30.tar.gz) = e78356dcaa7f5cd2e8c7e6371a375369ab6feca7
RMD160 (monotone-0.30.tar.gz) = d58fe36d9f0686ec6be47dc2f39ec3f7ba2d40d9
Size (monotone-0.30.tar.gz) = 4663418 bytes
SHA1 (patch-aa) = 73f5a3066c7f82de8178c6f00848db12b60aa6ae
+SHA1 (patch-ab) = b65dc4ca12bd753ad433cbb15ac19fb8592db939
diff --git a/devel/monotone/patches/patch-ab b/devel/monotone/patches/patch-ab
new file mode 100644
index 00000000000..1ec72321ec3
--- /dev/null
+++ b/devel/monotone/patches/patch-ab
@@ -0,0 +1,32 @@
+$NetBSD: patch-ab,v 1.3 2006/09/22 11:14:06 dan Exp $
+
+--- lru_writeback_cache.hh 4ac60f38211fc4ef11ee1f968bfb88fee5446937
++++ lru_writeback_cache.hh c2fa384b9b29d6c5162fad70ebe96e6479b8aa3e
+@@ -212,19 +212,24 @@ public:
+ {
+ // Remove the last element.
+ liter = _list.end();
+- // Unless it's the only element (i.e., the one we just inserted) -- we
+- // never empty ourselves out completely
++ I(liter != _list.begin());
++ --liter;
++ // liter now points to the last element. If the last element is also
++ // the first element -- i.e., the list has only one element, and we
++ // know that it's the one we just inserted -- then never mind, we
++ // never want to empty ourselves out completely.
+ if (liter == _list.begin())
+ break;
+- --liter;
+ this->_remove(liter->first);
+ }
++ I(exists(key));
+ }
+
+ inline void insert_dirty(Key const & key, const Data & data)
+ {
+ insert_clean(key, data);
+ safe_insert(_dirty, key);
++ I(is_dirty(key));
+ }
+
+ private: