From 41f65acaa412d71f8441078b28fb807f02e9a158 Mon Sep 17 00:00:00 2001 From: "Philip M. Gollucci" Date: Fri, 22 Aug 2008 16:47:20 +0000 Subject: http://viewvc.tigris.org/issues/show_bug.cgi?id=369 Deal with viewvc issues #369 -- mod_python import cycle by incorporating vendor svn commit r1993 from branches/1.0.x Requested by: Eygene Ryabinkin (via e-mail) Approved by: gabor (mentor) --- devel/viewvc/Makefile | 2 +- devel/viewvc/files/patch-svn-r1993 | 54 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 devel/viewvc/files/patch-svn-r1993 (limited to 'devel/viewvc') diff --git a/devel/viewvc/Makefile b/devel/viewvc/Makefile index d5e831be8b3b..4037f9cc511e 100644 --- a/devel/viewvc/Makefile +++ b/devel/viewvc/Makefile @@ -7,7 +7,7 @@ PORTNAME= viewvc PORTVERSION= 1.0.5 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel python MASTER_SITES= http://viewvc.tigris.org/files/documents/3330/41694/ diff --git a/devel/viewvc/files/patch-svn-r1993 b/devel/viewvc/files/patch-svn-r1993 new file mode 100644 index 000000000000..43f20fda9fd5 --- /dev/null +++ b/devel/viewvc/files/patch-svn-r1993 @@ -0,0 +1,54 @@ +Index: bin/mod_python/viewvc.py +=================================================================== +--- bin/mod_python/viewvc.py (revision 1992) ++++ bin/mod_python/viewvc.py (revision 1993) +@@ -42,9 +42,15 @@ + sys.path.insert(0, LIBRARY_DIR) + + import sapi +-import viewvc +-reload(viewvc) # need reload because initial import loads this stub file ++import imp + ++# Import real ViewVC module ++fp, pathname, description = imp.find_module('viewvc', [LIBRARY_DIR]) ++try: ++ viewvc = imp.load_module('viewvc', fp, pathname, description) ++finally: ++ if fp: ++ fp.close() + + def index(req): + server = sapi.ModPythonServer(req) +Index: bin/mod_python/query.py +=================================================================== +--- bin/mod_python/query.py (revision 1992) ++++ bin/mod_python/query.py (revision 1993) +@@ -42,10 +42,24 @@ + sys.path.insert(0, LIBRARY_DIR) + + import sapi +-import viewvc +-import query +-reload(query) # need reload because initial import loads this stub file ++import imp + ++# Import real ViewVC module ++fp, pathname, description = imp.find_module('viewvc', [LIBRARY_DIR]) ++try: ++ viewvc = imp.load_module('viewvc', fp, pathname, description) ++finally: ++ if fp: ++ fp.close() ++ ++# Import real ViewVC Query modules ++fp, pathname, description = imp.find_module('query', [LIBRARY_DIR]) ++try: ++ query = imp.load_module('query', fp, pathname, description) ++finally: ++ if fp: ++ fp.close() ++ + cfg = viewvc.load_config(CONF_PATHNAME) + + def index(req): -- cgit v1.2.3