Example #1
0
def updates_check(enpkg):
    updates = []
    EPD_update = []
    for key, info in enpkg.query_installed():
        av_infos = enpkg.info_list_name(info['name'])
        if len(av_infos) == 0:
            continue
        av_info = av_infos[-1]
        if comparable_info(av_info) > comparable_info(info):
            if info['name'] == "epd":
                EPD_update.append({'current': info, 'update': av_info})
            else:
                updates.append({'current': info, 'update': av_info})
    return updates, EPD_update
Example #2
0
def whats_new(enpkg):
    print FMT % ('Name', 'installed', 'available')
    print 60 * "="

    something_new = False
    for key, info in enpkg.query_installed():
        av_infos = enpkg.info_list_name(info['name'])
        if len(av_infos) == 0:
            continue
        av_info = av_infos[-1]
        if comparable_info(av_info) > comparable_info(info):
            print FMT % (name_egg(key), VB_FMT % info, VB_FMT % av_info)
            something_new = True

    if not something_new:
        print "no new version of any installed package is available"