try:
        spokeClass = getattr(spokeModule, spokeClassName)
    except KeyError:
        print "%s %s could not be found in %s" % (SpokeText, spokeClassName, spokeModuleName)
        sys.exit(1)


print "Running %s %s from %s" % (spokeText, spokeClass, spokeModule)

platform = getPlatform()
ksdata = makeVersion()
storage = Storage(data=ksdata, platform=platform)
storage.reset()
instclass = DefaultInstall()

payload = YumPayload(ksdata)
payload.setup(storage)

spoke = spokeClass(ksdata, storage, payload, instclass)
if hasattr(spoke, "register_event_cb"):
    spoke.register_event_cb("continue", lambda: Gtk.main_quit())
    spoke.register_event_cb("quit", lambda: Gtk.main_quit())
spoke.initialize()

if not spoke.showable:
    print "This %s is not showable, but I'll continue anyway." % spokeText

spoke.refresh()
spoke.window.set_beta(True)
spoke.window.set_property("distribution", "TEST HARNESS")
spoke.window.show_all()
Beispiel #2
0
    try:
        spokeClass = getattr(spokeModule, spokeClassName)
    except KeyError:
        print "%s %s could not be found in %s" % (SpokeText, spokeClassName, spokeModuleName)
        sys.exit(1)


print "Running %s %s from %s" % (spokeText, spokeClass, spokeModule)

ksdata = makeVersion()
storage = Blivet(ksdata=ksdata)
storage.reset()
instclass = DefaultInstall()
app = App("TEST HARNESS", yes_or_no_question = YesNoDialog)

payload = YumPayload(ksdata)
payload.setup(storage)
payload.install_log = sys.stdout

spoke = spokeClass(app, ksdata, storage, payload, instclass)

if not spoke.showable:
    print "This %s is not showable, but I'll continue anyway." % spokeText

app.schedule_screen(spoke)
app.run()

if hasattr(spoke, "status"):
    print "%s status:\n%s\n" % (SpokeText, spoke.status)
if hasattr(spoke, "completed"):
    print "%s completed:\n%s\n" % (SpokeText, spoke.completed)
Beispiel #3
0
    # set some things specially since we're just testing
    flags.testing = True

    # set up ksdata
    ksdata = makeVersion()

    #ksdata.method.method = "url"
    #ksdata.method.url = "http://husky/install/f17/os/"
    #ksdata.method.url = "http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/"

    # set up storage
    storage = blivet.Blivet(ksdata=ksdata)
    storage.reset()

    # set up the payload
    payload = YumPayload(ksdata)
    payload.setup(storage)

    for repo in payload._yum.repos.repos.values():
        print repo.name, repo.enabled

    ksdata.method.method = "url"
    #ksdata.method.url = "http://husky/install/f17/os/"
    ksdata.method.url = "http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/"

    # now switch the base repo to what we set ksdata.method to just above
    payload.updateBaseRepo()
    for repo in payload._yum.repos.repos.values():
        print repo.name, repo.enabled

    # list all of the groups
Beispiel #4
0
if not spokeClass:
    try:
        spokeClass = getattr(spokeModule, spokeClassName)
    except KeyError:
        print "%s %s could not be found in %s" % (SpokeText, spokeClassName,
                                                  spokeModuleName)
        sys.exit(1)

print "Running %s %s from %s" % (spokeText, spokeClass, spokeModule)

ksdata = makeVersion()
storage = Blivet(ksdata=ksdata)
storage.reset()
instclass = DefaultInstall()

payload = YumPayload(ksdata)
payload.setup(storage)

spoke = spokeClass(ksdata, storage, payload, instclass)
if hasattr(spoke, "register_event_cb"):
    spoke.register_event_cb("continue", lambda: Gtk.main_quit())
    spoke.register_event_cb("quit", lambda: Gtk.main_quit())

if hasattr(spoke, "set_path"):
    spoke.set_path(
        "categories",
        [("pyanaconda.ui.gui.categories.%s",
          os.path.join(os.path.dirname(__file__), "..", "categories"))])
    spoke.set_path("spokes",
                   [("pyanaconda.ui.gui.spokes.%s",
                     os.path.join(os.path.dirname(__file__), "..", "spokes"))])
    # set some things specially since we're just testing
    flags.testing = True

    # set up ksdata
    ksdata = makeVersion()

    #ksdata.method.method = "url"
    #ksdata.method.url = "http://husky/install/f17/os/"
    #ksdata.method.url = "http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/"

    # set up storage
    storage = blivet.Blivet(ksdata=ksdata)
    storage.reset()

    # set up the payload
    payload = YumPayload(ksdata)
    payload.setup(storage)

    for repo in payload._yum.repos.repos.values():
        print repo.name, repo.enabled

    ksdata.method.method = "url"
    #ksdata.method.url = "http://husky/install/f17/os/"
    ksdata.method.url = "http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/"

    # now switch the base repo to what we set ksdata.method to just above
    payload.updateBaseRepo()
    for repo in payload._yum.repos.repos.values():
        print repo.name, repo.enabled

    # list all of the groups
Beispiel #6
0
    try:
        spokeClass = getattr(spokeModule, spokeClassName)
    except KeyError:
        print("%s %s could not be found in %s" %
              (SpokeText, spokeClassName, spokeModuleName))
        sys.exit(1)

print("Running %s %s from %s" % (spokeText, spokeClass, spokeModule))

ksdata = makeVersion()
storage = Blivet(ksdata=ksdata)
storage.reset()
instclass = DefaultInstall()
app = App("TEST HARNESS", yes_or_no_question=YesNoDialog)

payload = YumPayload(ksdata)
payload.setup(storage)
payload.install_log = sys.stdout

spoke = spokeClass(app, ksdata, storage, payload, instclass)

if not spoke.showable:
    print("This %s is not showable, but I'll continue anyway." % spokeText)

app.schedule_screen(spoke)
app.run()

if hasattr(spoke, "status"):
    print("%s status:\n%s\n" % (SpokeText, spoke.status))
if hasattr(spoke, "completed"):
    print("%s completed:\n%s\n" % (SpokeText, spoke.completed))