def __init__(self, logdir):
     InstallProgress.__init__(self)
     logging.debug("setting up environ for non-interactive use")
     os.environ["DEBIAN_FRONTEND"] = "noninteractive"
     os.environ["APT_LISTCHANGES_FRONTEND"] = "none"
     os.environ["RELEASE_UPRADER_NO_APPORT"] = "1"
     self.config = DistUpgradeConfig(".")
     self.logdir = logdir
     self.install_run_number = 0
     try:
         if self.config.getWithDefault("NonInteractive","ForceOverwrite", False):
             apt_pkg.config.set("DPkg::Options::","--force-overwrite")
     except (NoSectionError, NoOptionError):
         pass
     # more debug
     #apt_pkg.Config.Set("Debug::pkgOrderList","true")
     #apt_pkg.Config.Set("Debug::pkgDPkgPM","true")
     # default to 2400 sec timeout
     self.timeout = 2400
     try:
         self.timeout = self.config.getint("NonInteractive","TerminalTimeout")
     except Exception:
         pass
Example #2
0
 def __init__(self, logdir):
     InstallProgress.__init__(self)
     logging.debug("setting up environ for non-interactive use")
     if not os.environ.has_key("DEBIAN_FRONTEND"):
         os.environ["DEBIAN_FRONTEND"] = "noninteractive"
     os.environ["APT_LISTCHANGES_FRONTEND"] = "none"
     os.environ["RELEASE_UPRADER_NO_APPORT"] = "1"
     self.config = DistUpgradeConfig(".")
     self.logdir = logdir
     self.install_run_number = 0
     try:
         if self.config.getWithDefault("NonInteractive","ForceOverwrite", False):
             apt_pkg.config.set("DPkg::Options::","--force-overwrite")
     except (NoSectionError, NoOptionError):
         pass
     # more debug
     #apt_pkg.Config.Set("Debug::pkgOrderList","true")
     #apt_pkg.Config.Set("Debug::pkgDPkgPM","true")
     # default to 2400 sec timeout
     self.timeout = 2400
     try:
         self.timeout = self.config.getint("NonInteractive","TerminalTimeout")
     except Exception:
         pass