dia.run()
        dia.destroy()
    else:
        t.run()

if __name__ == "__main__":
    #logging.basicConfig(level=logging.DEBUG)

    context = GObject.main_context_default()
    c = AptClient()
    for i in range(100):
        
        print "inst: 3dchess"
        t = c.install_packages(["3dchess"], exit_handler=exit_handler)
        run(t)
        active += 1

        print "inst: 2vcard"
        t = c.install_packages(["2vcard"], exit_handler=exit_handler)
        run(t)
        active += 1
        
        print "rm: 3dchess 2vcard"
        t = c.remove_packages(["3dchess","2vcard"], exit_handler=exit_handler)
        run(t)

        while active > MAX_ACTIVE:
            while context.pending():
                context.iteration()
            time.sleep(1)
Exemplo n.º 2
0
        dia.destroy()
    else:
        t.run()


if __name__ == "__main__":
    #logging.basicConfig(level=logging.DEBUG)

    context = GObject.main_context_default()
    c = AptClient()
    for i in range(100):

        print "inst: 3dchess"
        t = c.install_packages(["3dchess"], exit_handler=exit_handler)
        run(t)
        active += 1

        print "inst: 2vcard"
        t = c.install_packages(["2vcard"], exit_handler=exit_handler)
        run(t)
        active += 1

        print "rm: 3dchess 2vcard"
        t = c.remove_packages(["3dchess", "2vcard"], exit_handler=exit_handler)
        run(t)

        while active > MAX_ACTIVE:
            while context.pending():
                context.iteration()
            time.sleep(1)
#!/usr/bin/python
import aptdaemon, sys, gettext
from aptdaemon.client import AptClient

# i18n
gettext.install("tuquito-software-manager", "/usr/share/tuquito/locale")

if len(sys.argv) == 3:
    operation = sys.argv[1]
    package = sys.argv[2]
    aptd_client = AptClient()
    if operation == "install":
        transaction = aptd_client.install_packages([package])
        transaction.set_meta_data(tuquito_label=_("Installing %s") % package)
    elif operation == "remove":
        transaction = aptd_client.remove_packages([package])
        transaction.set_meta_data(tuquito_label=_("Removing %s") % package)
    else:
        print "Invalid operation: %s" % operation
        sys.exit(1)
    transaction.set_meta_data(mintinstall_pkgname=package)
    transaction.run()
Exemplo n.º 4
0
#!/usr/bin/python
import aptdaemon, sys, gettext
from aptdaemon.client import AptClient

# i18n
gettext.install("mintinstall", "/usr/share/linuxmint/locale")

if len(sys.argv) == 3:
    operation = sys.argv[1]
    package = sys.argv[2]
    aptd_client = AptClient()
    if operation == "install":
        transaction = aptd_client.install_packages([package])    
        transaction.set_meta_data(mintinstall_label=_("Installing %s") % package)        
    elif operation == "remove":
        transaction = aptd_client.remove_packages([package])    
        transaction.set_meta_data(mintinstall_label=_("Removing %s") % package)
    else:
        print "Invalid operation: %s" % operation
        sys.exit(1)        
    transaction.set_meta_data(mintinstall_pkgname=package)
    transaction.run()