summaryrefslogtreecommitdiff
path: root/portato/plugins/noroot.py
diff options
context:
space:
mode:
authornecoro <>2007-04-25 16:05:46 +0000
committernecoro <>2007-04-25 16:05:46 +0000
commit28c524e8243f9eb41f2ecb7197e33711727526d9 (patch)
tree1ac2ddf2cd27411c0e9d634283873a9642ccb131 /portato/plugins/noroot.py
parent86490cd2c9f7523835ecedf472398845c56b5c0c (diff)
downloadportato-28c524e8243f9eb41f2ecb7197e33711727526d9.tar.gz
portato-28c524e8243f9eb41f2ecb7197e33711727526d9.tar.bz2
portato-28c524e8243f9eb41f2ecb7197e33711727526d9.zip
added noroot-option
Diffstat (limited to '')
-rw-r--r--portato/plugins/noroot.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/portato/plugins/noroot.py b/portato/plugins/noroot.py
new file mode 100644
index 0000000..a28ef85
--- /dev/null
+++ b/portato/plugins/noroot.py
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+#
+# File: portato/plugins/noroot.py
+# This file is part of the Portato-Project, a graphical portage-frontend.
+#
+# Copyright (C) 2007 René 'Necoro' Neumann
+# This is free software. You may redistribute copies of it under the terms of
+# the GNU General Public License version 2.
+# There is NO WARRANTY, to the extent permitted by law.
+#
+# Written by René 'Necoro' Neumann <necoro@necoro.net>
+
+def i_am_root (*args):
+ """Pretend we are root."""
+ return True
span>/+14 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add caching infrastructureLars Hjemli9-28/+353 This enables internal caching of page output. Page requests are split into four groups: 1) repo listing (front page) 2) repo summary 3) repo pages w/symbolic references in query string 4) repo pages w/constant sha1's in query string Each group has a TTL specified in minutes. When a page is requested, a cached filename is stat(2)'ed and st_mtime is compared to time(2). If TTL has expired (or the file didn't exist), the cached file is regenerated. When generating a cached file, locking is used to avoid parallell processing of the request. If multiple processes tries to aquire the same lock, the ones who fail to get the lock serves the (expired) cached file. If the cached file don't exist, the process instead calls sched_yield(2) before restarting the request processing. Signed-off-by: Lars Hjemli <hjemli@gmail.com>