Namespace sanitizing, step 2b
authorMarius Mauch <genone@gentoo.org>
Thu, 25 Jan 2007 16:25:02 +0000 (16:25 -0000)
committerMarius Mauch <genone@gentoo.org>
Thu, 25 Jan 2007 16:25:02 +0000 (16:25 -0000)
svn path=/main/trunk/; revision=5781

pym/portage/cache/fs_template.py
pym/portage/cache/sqlite.py
pym/portage/elog_modules/mod_custom.py
pym/portage/elog_modules/mod_mail.py
pym/portage/elog_modules/mod_mail_summary.py
pym/portage/elog_modules/mod_save.py
pym/portage/elog_modules/mod_save_summary.py
pym/portage/elog_modules/mod_syslog.py

index b76e98bd3b8791fe5b4195f30ca3b598d9dadc08..1fdfac764f13c2e1fc9b4e0447e9d66ada5d2098 100644 (file)
@@ -5,7 +5,7 @@
 
 import os
 from cache import template
-from portage_data import portage_gid
+from portage.data import portage_gid
 
 class FsBased(template.database):
        """template wrapping fs needed options, and providing _ensure_access as a way to 
index 5c1bfa26655ef478d9d3e923c04c6c03927f14a1..ee3dde3c74363f6b6e5486185fe8fba5bb7d188e 100644 (file)
@@ -6,8 +6,8 @@ from cache import fs_template
 from cache import cache_errors
 import os
 from cache.template import reconstruct_eclasses
-from portage_util import writemsg, apply_secpass_permissions
-from portage_data import portage_gid
+from portage.util import writemsg, apply_secpass_permissions
+from portage.data import portage_gid
 try:
        import sqlite3 as db_module # sqlite3 is optional with >=python-2.5
 except ImportError:
index d609e79ba6aeae45589bae06e15e2d6e5ef3bbbe..f95e1999aa4d614336932eac0196e0b9ccffb813 100644 (file)
@@ -1,16 +1,16 @@
-import elog_modules.mod_save, portage_exec, portage_exception
+import elog_modules.mod_save, portage.exec, portage.exception
 
 def process(mysettings, cpv, logentries, fulltext):
        elogfilename = elog_modules.mod_save.process(mysettings, cpv, logentries, fulltext)
        
        if (not "PORTAGE_ELOG_COMMAND" in mysettings.keys()) \
                        or len(mysettings["PORTAGE_ELOG_COMMAND"]) == 0:
-               raise portage_exception.MissingParameter("!!! Custom logging requested but PORTAGE_ELOG_COMMAND is not defined")
+               raise portage.exception.MissingParameter("!!! Custom logging requested but PORTAGE_ELOG_COMMAND is not defined")
        else:
                mylogcmd = mysettings["PORTAGE_ELOG_COMMAND"]
                mylogcmd = mylogcmd.replace("${LOGFILE}", elogfilename)
                mylogcmd = mylogcmd.replace("${PACKAGE}", cpv)
-               retval = portage_exec.spawn_bash(mylogcmd)
+               retval = portage.exec.spawn_bash(mylogcmd)
                if retval != 0:
-                       raise portage_exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval)
+                       raise portage.exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval)
        return
index b8e17a51ad8f1c84041fad39e02ced032a262dc4..b84555e8c33b77bcf18bcf0e1aacf066dacef585 100644 (file)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-import portage_mail, socket
+import portage.mail, socket
 
 def process(mysettings, cpv, logentries, fulltext):
        if mysettings.has_key("PORTAGE_ELOG_MAILURI"):
@@ -16,7 +16,7 @@ def process(mysettings, cpv, logentries, fulltext):
        mysubject = mysubject.replace("${PACKAGE}", cpv)
        mysubject = mysubject.replace("${HOST}", socket.getfqdn())
 
-       mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, fulltext)
-       portage_mail.send_mail(mysettings, mymessage)
+       mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject, fulltext)
+       portage.mail.send_mail(mysettings, mymessage)
 
        return
index 5e642f418da6e65cf4396f349bda2475a4cced42..99c285642b8d3ac4bc2850aaea301f120ec04ef4 100644 (file)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: mod_mail.py 3484 2006-06-10 22:38:44Z genone $
 
-import portage_mail, socket, os, time
+import portage.mail, socket, os, time
 from email.MIMEText import MIMEText as TextMessage
 
 _items = {}
@@ -34,7 +34,7 @@ def finalize(mysettings):
        for cpv in _items.keys():
                 mybody += "- %s\n" % cpv
 
-       mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, mybody, attachments=_items.values())
-       portage_mail.send_mail(mysettings, mymessage)
+       mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject, mybody, attachments=_items.values())
+       portage.mail.send_mail(mysettings, mymessage)
 
        return
index 4e1cd2cf8fc384ba95c85a4873602e87dad588b3..2993b45db353e5ac205633d811f97a4826082586 100644 (file)
@@ -1,5 +1,5 @@
 import os, time
-from portage_data import portage_uid, portage_gid
+from portage.data import portage_uid, portage_gid
 
 def process(mysettings, cpv, logentries, fulltext):
        cpv_path = cpv.replace("/", ":")
index 7cb310d954a24bf877902bdfbd2669c237941ecf..eb453e58778aed54109c97b988a3d1a6572cb23a 100644 (file)
@@ -1,5 +1,5 @@
 import os, time
-from portage_data import portage_uid, portage_gid
+from portage.data import portage_uid, portage_gid
 
 def process(mysettings, cpv, logentries, fulltext):
        if mysettings["PORT_LOGDIR"] != "":
index a95ecb452e270ac2f94419e7cae0e7b22de13df2..77e1d4ea683acc48081eae5681c104c8778dd573 100644 (file)
@@ -1,5 +1,5 @@
 import syslog
-from portage_const import EBUILD_PHASES
+from portage.const import EBUILD_PHASES
 
 def process(mysettings, cpv, logentries, fulltext):
        syslog.openlog("portage", syslog.LOG_ERR | syslog.LOG_WARNING | syslog.LOG_INFO | syslog.LOG_NOTICE, syslog.LOG_LOCAL5)