Example #1
0
File: fedup.py Project: kalev/fedup
            msg = _("NOTE: Some repos could not be contacted: %s")
        print msg % ", ".join(f.disabled_repos)
        print _("If you start the upgrade now, packages from these repos will not be installed.")

    # warn about broken dependencies etc.
    if probs:
        print
        print _("WARNING: problems were encountered during transaction test:")
        for s in probs.summaries:
            print "  "+s.desc
            for line in s.format_details():
                print "    "+line
        print _("Continue with the upgrade at your own risk.")

if __name__ == '__main__':
    args = parse_args()

    # TODO: use polkit to get privs for modifying bootloader stuff instead
    if os.getuid() != 0:
        print _("you must be root to run this program.")
        raise SystemExit(1)

    # set up logging
    if args.debuglog:
        logutils.debuglog(args.debuglog)
    logutils.consolelog(level=args.loglevel)
    log.info("%s %s starting at %s", sys.argv[0], fedupversion, time.asctime())

    try:
        exittype = "cleanly"
        main(args)
Example #2
0
            self.close()
        elif responseid == 1:
            w.hide()
            self.populate_srclist()

    def disable_delete(self, w, event):
        return True # ignore delete signal from Esc keypress

    def sourcecombo_changed(self, w, *args):
        idx = w.get_active()
        if idx < 0:
            return
        src = FedupSource._make(self.srclist[idx])
        page = self.builder.get_object("sourcebox")
        self.window.set_page_complete(page, src.available)


if __name__ == '__main__':
    args = parse_args(gui=True)
    try:
        # Make ^C work. See https://bugzilla.gnome.org/show_bug.cgi?id=622084
        signal.signal(signal.SIGINT, signal.SIG_DFL)
        ui = FedupUI(args)
        ui.run()
    except IOError as e:
        print e
        raise SystemExit(1)
    except KeyboardInterrupt:
        print "KeyboardInterrupt"
        raise SystemExit(2)
Example #3
0
            "If you start the upgrade now, packages from these repos will not be installed."
        )

    # warn about broken dependencies etc.
    if probs:
        print
        print _("WARNING: problems were encountered during transaction test:")
        for s in probs.summaries:
            print "  " + s.desc
            for line in s.format_details():
                print "    " + line
        print _("Continue with the upgrade at your own risk.")


if __name__ == '__main__':
    args = parse_args()

    # TODO: use polkit to get privs for modifying bootloader stuff instead
    if os.getuid() != 0:
        print _("you must be root to run this program.")
        raise SystemExit(1)

    # set up logging
    if args.debuglog:
        logutils.debuglog(args.debuglog)
    logutils.consolelog(level=args.loglevel)
    log.info("%s %s starting at %s", sys.argv[0], fedupversion, time.asctime())

    try:
        exittype = "cleanly"
        main(args)
Example #4
0
            self.close()
        elif responseid == 1:
            w.hide()
            self.populate_srclist()

    def disable_delete(self, w, event):
        return True  # ignore delete signal from Esc keypress

    def sourcecombo_changed(self, w, *args):
        idx = w.get_active()
        if idx < 0:
            return
        src = FedupSource._make(self.srclist[idx])
        page = self.builder.get_object("sourcebox")
        self.window.set_page_complete(page, src.available)


if __name__ == '__main__':
    args = parse_args(gui=True)
    try:
        # Make ^C work. See https://bugzilla.gnome.org/show_bug.cgi?id=622084
        signal.signal(signal.SIGINT, signal.SIG_DFL)
        ui = FedupUI(args)
        ui.run()
    except IOError as e:
        print e
        raise SystemExit(1)
    except KeyboardInterrupt:
        print "KeyboardInterrupt"
        raise SystemExit(2)