[Pkg-owncloud-commits] [php-sabredav] 72/75: tfix: naturalselection
David Prévot
taffit at moszumanska.debian.org
Thu Feb 26 18:51:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 5926904e45d717dde088ffff10c28e9da4c38d84
Author: David Prévot <taffit at debian.org>
Date: Thu Feb 26 13:49:12 2015 -0400
tfix: naturalselection
Git-Dch: Ignore
---
debian/patches/0005-tfix-threshold.patch | 84 ++++++++++++++++++++++++++++++++
debian/patches/0006-tfix-selection.patch | 23 +++++++++
debian/patches/series | 2 +
3 files changed, 109 insertions(+)
diff --git a/debian/patches/0005-tfix-threshold.patch b/debian/patches/0005-tfix-threshold.patch
new file mode 100644
index 0000000..af405bb
--- /dev/null
+++ b/debian/patches/0005-tfix-threshold.patch
@@ -0,0 +1,84 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Thu, 26 Feb 2015 13:40:12 -0400
+Subject: tfix: threshold
+
+Forwarded: https://github.com/fruux/sabre-dav/pull/615
+Applied-Upstream: https://github.com/fruux/sabre-dav/commit/60a1e4e70e315a1098712e43e7f16b196abd0b12
+---
+ bin/naturalselection | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/bin/naturalselection b/bin/naturalselection
+index 8ccd33b..086722a 100755
+--- a/bin/naturalselection
++++ b/bin/naturalselection
+@@ -16,16 +16,16 @@ def getfreespace(path):
+ stat = os.statvfs(path)
+ return stat.f_frsize * stat.f_bavail
+
+-def getbytesleft(path,treshold):
+- return getfreespace(path)-treshold
++def getbytesleft(path,threshold):
++ return getfreespace(path)-threshold
+
+-def run(cacheDir, treshold, sleep=5, simulate=False, min_erase = 0):
++def run(cacheDir, threshold, sleep=5, simulate=False, min_erase = 0):
+
+- bytes = getbytesleft(cacheDir,treshold)
++ bytes = getbytesleft(cacheDir,threshold)
+ if (bytes>0):
+- print "Bytes to go before we hit treshhold:", bytes
++ print "Bytes to go before we hit threshold:", bytes
+ else:
+- print "Treshold exceeded with:", -bytes, "bytes"
++ print "Threshold exceeded with:", -bytes, "bytes"
+ dir = os.listdir(cacheDir)
+ dir2 = []
+ for file in dir:
+@@ -46,7 +46,7 @@ def run(cacheDir, treshold, sleep=5, simulate=False, min_erase = 0):
+ left = min_erase
+
+ # If the min_erase setting is lower than the amount of bytes over
+- # the treshold, we use that number instead.
++ # the threshold, we use that number instead.
+ if left < -bytes :
+ left = -bytes
+
+@@ -73,7 +73,7 @@ def run(cacheDir, treshold, sleep=5, simulate=False, min_erase = 0):
+ def main():
+ parser = OptionParser(
+ version="naturalselecton v0.3",
+- description="Cache directory manager. Deletes cache entries based on accesstime and free space tresholds.\n" +
++ description="Cache directory manager. Deletes cache entries based on accesstime and free space thresholds.\n" +
+ "This utility is distributed alongside SabreDAV.",
+ usage="usage: %prog [options] cacheDirectory",
+ )
+@@ -98,15 +98,15 @@ def main():
+ default=5
+ )
+ parser.add_option(
+- '-l','--treshold',
+- help="Treshhold in bytes (default = 10737418240, which is 10GB)",
++ '-l','--threshold',
++ help="Threshold in bytes (default = 10737418240, which is 10GB)",
+ type="int",
+- dest="treshold",
++ dest="threshold",
+ default=10737418240
+ )
+ parser.add_option(
+ '-m', '--min-erase',
+- help="Minimum number of bytes to erase when the treshold is reached. " +
++ help="Minimum number of bytes to erase when the threshold is reached. " +
+ "Setting this option higher will reduce the amount of times the cache directory will need to be scanned. " +
+ "(the default is 1073741824, which is 1GB.)",
+ type="int",
+@@ -130,7 +130,7 @@ def main():
+ cacheDir,
+ sleep=options.sleep,
+ simulate=options.simulate,
+- treshold=options.treshold,
++ threshold=options.threshold,
+ min_erase=options.min_erase
+ )
+ if runs>0:
diff --git a/debian/patches/0006-tfix-selection.patch b/debian/patches/0006-tfix-selection.patch
new file mode 100644
index 0000000..d4622e0
--- /dev/null
+++ b/debian/patches/0006-tfix-selection.patch
@@ -0,0 +1,23 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Thu, 26 Feb 2015 13:56:46 -0400
+Subject: tfix: selection
+
+Forwarded: https://github.com/fruux/sabre-dav/pull/615
+Applied-Upstream: https://github.com/fruux/sabre-dav/commit/60a1e4e70e315a1098712e43e7f16b196abd0b12
+---
+ bin/naturalselection | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/naturalselection b/bin/naturalselection
+index 086722a..eaa55a4 100755
+--- a/bin/naturalselection
++++ b/bin/naturalselection
+@@ -72,7 +72,7 @@ def run(cacheDir, threshold, sleep=5, simulate=False, min_erase = 0):
+
+ def main():
+ parser = OptionParser(
+- version="naturalselecton v0.3",
++ version="naturalselection v0.3",
+ description="Cache directory manager. Deletes cache entries based on accesstime and free space thresholds.\n" +
+ "This utility is distributed alongside SabreDAV.",
+ usage="usage: %prog [options] cacheDirectory",
diff --git a/debian/patches/series b/debian/patches/series
index 93bd88a..701dbf3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@
0002-Use-ClassLoader-from-Symfony-instead-of-autoLoader.patch
0003-Increase-timeout.patch
0004-Allow-to-use-more-recent-sabre-http.patch
+0005-tfix-threshold.patch
+0006-tfix-selection.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list