Repository : http://git.fedorahosted.org/git/?p=conga-luci-1stgen.git
On branch : RHEL5-active
>---------------------------------------------------------------
commit a86717c94a8fb6a922cc1b2689da5c4c83f8a86c
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Mon Jun 10 14:46:29 2013 +0200
luci/MAINTAINERS.rst: make debug how to more informativ
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
>---------------------------------------------------------------
luci/MAINTAINERS.rst | 46 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/luci/MAINTAINERS.rst b/luci/MAINTAINERS.rst
index 365e656..ba8cba1 100644
--- a/luci/MAINTAINERS.rst
+++ b/luci/MAINTAINERS.rst
@@ -36,10 +36,13 @@ This way, the Python debugger will take the control when running into
such points in the code.
More elegant solution may be to run luci from `zopectl` like this::
+
zopectl> debug
Starting debugger (the name "app" is bound to the top-level Zope object)
[...]
- >>> Zope2.debug('/luci', d=True)
+ >>> app.objectIds()
+ ['Control_Panel', 'temp_folder', 'session_data_manager', ...]
+ >>> Zope2.debug('/luci', d=True, u='admin:password') # request_method='GET'
* Type "s<cr>c<cr>" to jump to beginning of real publishing process.
* Then type c<cr> to jump to the beginning of the URL traversal
algorithm.
@@ -47,6 +50,29 @@ More elegant solution may be to run luci from `zopectl` like this::
> <string>(1)?()
pdb>
+and the following (practice-proven) breakpoints may be handy::
+
+ pdb> b /usr/lib64/luci/zope/lib/python/ZPublisher/HTTPRequest.py:362
+
+ pdb> b /usr/lib64/luci/zope/lib/python/ZPublisher/HTTPRequest.py:1222
+ pdb> b /usr/lib64/luci/zope/lib/python/Products/Five/traversable.py:82
+
+ pdb> b /usr/lib64/luci/zope/lib/python/ZPublisher/mapply.py:88
+ pdb> b /usr/lib64/luci/zope/lib/python/Products/CMFCore/FSPythonScript.py:112
+
+ pdb> b /usr/lib64/luci/zope/lib/python/zope/interface/adapter.py:484
+ pdb> b /usr/lib64/luci/zope/lib/python/zope/app/traversing/namespace.py:362
+ pdb> b /usr/lib64/luci/zope/lib/python/zope/component/__init__.py:157
+ pdb> b /usr/lib64/luci/zope/lib/python/zope/interface/adapter.py:473
+ pdb> b /usr/lib64/luci/zope/lib/python/zope/app/traversing/namespace.py:362
+
+ pdb> b /usr/lib64/luci/zope/lib/python/App/Extensions.py:158
+
+together with a hint how to extract real source file path from
+`<FSPythonScript at /A/B used for /X/Y>` (being a `self` here)::
+
+ pdb> p self._filepath
+
How to enable and access ZMI
============================
@@ -87,9 +113,11 @@ Quite unusual on Zope approach is to store both application data and most
of the application itself into an object-database-like file (Data.fs by
default).
This means only a minor part of the application can be found in a form
-of files in the filesystem (`/var/lib/luci`, mostly Python code)
-and the rest lives in Data.fs, mirrored in respective directories
-in the code/distribution tree.
+of files in the filesystem (Python code in `/var/lib/luci/Extensions/`
+and representation of standardized portal content item in
+`/var/lib/luci/Products/ManagedSystem/`) and the rest lives in `Data.fs`,
+mirrored (not reliably, authoritative version is the `Data.fs` one)
+in respective directories in the code/distribution tree.
It comprises these six directories, which are eligible for import/export
procedure (between Data.fs and the tangible mirrored files):
@@ -100,10 +128,10 @@ procedure (between Data.fs and the tangible mirrored files):
- plone-custom
- storage
-You can find a Makefile at each of these in a distribution tarball and it
+You can find a `Makefile` at each of these in a distribution tarball and it
contains the targets dedicated to import and export (named exactly like this).
-So just stick with these targets, or specify FILES variable for
-file system -> Data.fs direction.
+So just stick with these targets, or specify `FILES` variable for
+file system -> `Data.fs` direction.
Making modified Data.fs ready for distribution (IMPORTANT)
@@ -116,6 +144,10 @@ script that will:
scramble password of admin user (as another level of enforcing
a user to set her own admin password)
+Should you have previously enabled "manager's mode" (by invoking
+`utils/luci_manage enable`), remember also to disable it
+(`utils/luci_manage`).
+
Zope/Plone Fixes
================