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
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:
-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
# 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"):
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
# 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 = {}
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
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("/", ":")
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"] != "":
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)