def PACKAGESETCHANGED(self, headers, body):
     try:
         rhnPackageInfo.updatePackageProfile()
     except:
         self.error({"message": "Error refreshing package list"}, traceback.format_exc())
         return
     self.ack()
示例#2
0
def refresh_list(rhnsd=None, cache_only=None):
    """ push again the list of rpm packages to the server """
    if cache_only:
        return (0, "no-ops for caching", {})
    log.log_debug("Called refresh_rpmlist")

    try:
        rhnPackageInfo.updatePackageProfile()
    except:
        print("ERROR: refreshing remote package list for System Profile")
        return (20, "Error refreshing package list", {})

    touch_time_stamp()
    return (0, "rpmlist refreshed", {})
示例#3
0
    def main(self):
        if not up2dateAuth.getSystemId():
            needToRegister = \
                _("You need to register this system by running " \
                "`rhn_register` before using this option")
            print(needToRegister)
            sys.exit(1)

        if not self._testRhnLogin():
            sys.exit(1)

        print(_("Updating package profile..."))
        rhnPackageInfo.updatePackageProfile()

        print(_("Updating hardware profile..."))
        rhnHardware.updateHardware()

        if support is not None:
            print(_("Updating virtualization profile..."))
            support.refresh(True)
示例#4
0
    def main(self):
        if not up2dateAuth.getSystemId():
            needToRegister = \
                _("You need to register this system by running " \
                "`rhn_register` before using this option")
            print(needToRegister)
            sys.exit(1)

        if not self._testRhnLogin():
            sys.exit(1)

        print(_("Updating package profile..."))
        rhnPackageInfo.updatePackageProfile()

        print(_("Updating hardware profile..."))
        rhnHardware.updateHardware()

        if support is not None:
            print(_("Updating virtualization profile..."))
            support.refresh(True)