[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
cjerdonek at webkit.org
cjerdonek at webkit.org
Thu Feb 4 21:28:45 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 7b0628772e97077d3dff6d23c160c8c48e2da6d8
Author: cjerdonek at webkit.org <cjerdonek at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 27 03:04:35 2010 +0000
2010-01-26 Chris Jerdonek <cjerdonek at webkit.org>
Reviewed by Eric Seidel.
The Python autoinstall cache directory now only gets created
in the directory containing autoinstall.py.
https://bugs.webkit.org/show_bug.cgi?id=33365
* Scripts/webkitpy/autoinstall.py:
- Also added a README file to the cache directory saying
where it came from.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 2d7fb04..adfc650 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,19 @@
Reviewed by Eric Seidel.
+ The Python autoinstall cache directory now only gets created
+ in the directory containing autoinstall.py.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33365
+
+ * Scripts/webkitpy/autoinstall.py:
+ - Also added a README file to the cache directory saying
+ where it came from.
+
+2010-01-26 Chris Jerdonek <cjerdonek at webkit.org>
+
+ Reviewed by Eric Seidel.
+
Moved the check-webkit-style processors into a new
webkitpy/style/processors directory.
diff --git a/WebKitTools/Scripts/webkitpy/autoinstall.py b/WebKitTools/Scripts/webkitpy/autoinstall.py
index 641ef7f..55bfbe5 100644
--- a/WebKitTools/Scripts/webkitpy/autoinstall.py
+++ b/WebKitTools/Scripts/webkitpy/autoinstall.py
@@ -179,16 +179,29 @@ def bind(package_name, url, zip_subpath=None):
class Cache(object):
def __init__(self, directory=None):
- self.directory = directory or "./autoinstall.cache.d/"
+ if directory is None:
+ # Default to putting the cache directory in the same directory
+ # as this file.
+ containing_directory = os.path.dirname(__file__)
+ directory = os.path.join(containing_directory, "autoinstall.cache.d");
+
+ self.directory = directory
try:
if not os.path.exists(self.directory):
- _logger.debug("Creating cache directory '%s'." % self.directory)
- os.mkdir(self.directory)
+ self._create_cache_directory()
except Exception, err:
_logger.exception(err)
self.cache_directry = tempfile.mkdtemp()
_logger.info("Using cache directory '%s'." % self.directory)
+ def _create_cache_directory(self):
+ _logger.debug("Creating cache directory '%s'." % self.directory)
+ os.mkdir(self.directory)
+ readme_path = os.path.join(self.directory, "README")
+ with open(readme_path, "w") as f:
+ f.write("This directory was auto-generated by '%s'.\n"
+ "It is safe to delete.\n" % __file__)
+
def get(self, url):
_logger.info("Getting '%s' from cache." % url)
filename = url.rsplit("/")[-1]
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list