$87 GRAYBYTE WORDPRESS FILE MANAGER $47

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib/python3.6/site-packages/up2date_client/

HOME
Current File : /usr/lib/python3.6/site-packages/up2date_client//rhnPackageInfo.py
# all the crap that is stored on the rhn side of stuff
# updating/fetching package lists, channels, etc


from up2date_client import up2dateAuth
from up2date_client import up2dateLog
from up2date_client import rhnserver
from up2date_client import pkgUtils


def logDeltaPackages(pkgs):
    log = up2dateLog.initLog()
    log.log_me("Adding packages to package profile: %s" %
               pprint_pkglist(pkgs['added']))
    log.log_me("Removing packages from package profile: %s" %
               pprint_pkglist(pkgs['removed']))

# pylint: disable=unused-argument
def updatePackageProfile(timeout=None):
    """ get a list of installed packages and send it to rhnServer """

    # The endpoint that is called in this function (registration.update_packages)
    # is disabled on the CLN side, and can throw errors if called (CLOS-3032).
    return

    # Original code preserved below in case we ever need to re-enable this function.
    # log = up2dateLog.initLog()
    # log.log_me("Updating package profile")
    # packages = pkgUtils.getInstalledPackageList(getArch=1)
    # s = rhnserver.RhnServer(timeout=timeout)
    # if not s.capabilities.hasCapability('xmlrpc.packages.extended_profile', 2):
    #     # for older satellites and hosted - convert to old format
    #     packages = convertPackagesFromHashToList(packages)
    # s.registration.update_packages(up2dateAuth.getSystemId(), packages)

def pprint_pkglist(pkglist):
    if type(pkglist) == type([]):
        output = ["%s-%s-%s" % (a[0],a[1],a[2]) for a in pkglist]
    else:
        output = "%s-%s-%s" % (pkglist[0], pkglist[1], pkglist[2])
    return output

def convertPackagesFromHashToList(packages):
    """ takes list of hashes and covert it to list of lists
        resulting strucure is:
        [[name, version, release, epoch, arch, cookie], ... ]
    """
    result = []
    for package in packages:
        if 'arch' in package and 'cookie' in package:
            result.append([package['name'], package['version'], package['release'],
                package['epoch'], package['arch'], package['cookie']])
        elif 'arch' in package:
            result.append([package['name'], package['version'], package['release'],
                package['epoch'], package['arch']])
        else:
            result.append([package['name'], package['version'], package['release'], package['epoch']])
    return result

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.25 PM
root / root
0755
__pycache__
--
14 Aug 2025 9.29 PM
root / root
0755
__init__.py
0 KB
29 May 2025 8.37 PM
root / root
0644
capabilities.py
7.277 KB
29 May 2025 8.37 PM
root / root
0644
clientCaps.py
2.156 KB
29 May 2025 8.37 PM
root / root
0644
clpwd.py
3.558 KB
29 May 2025 8.37 PM
root / root
0644
config.py
14.456 KB
29 May 2025 8.37 PM
root / root
0644
debUtils.py
2.764 KB
29 May 2025 8.37 PM
root / root
0644
getMethod.py
4.201 KB
29 May 2025 8.37 PM
root / root
0644
haltree.py
4.533 KB
29 May 2025 8.37 PM
root / root
0644
hardware.py
31.909 KB
29 May 2025 8.37 PM
root / root
0644
hardware_gudev.py
12.906 KB
29 May 2025 8.37 PM
root / root
0644
hardware_hal.py
11.332 KB
29 May 2025 8.37 PM
root / root
0644
hardware_udev.py
12.988 KB
29 May 2025 8.37 PM
root / root
0644
pkgUtils.py
0.288 KB
29 May 2025 8.37 PM
root / root
0644
pkgplatform.py
0.302 KB
29 May 2025 8.47 PM
root / root
0644
pmPlugin.py
2.792 KB
29 May 2025 8.37 PM
root / root
0644
rhnChannel.py
4.913 KB
29 May 2025 8.37 PM
root / root
0644
rhnHardware.py
0.32 KB
29 May 2025 8.37 PM
root / root
0644
rhnPackageInfo.py
2.34 KB
29 May 2025 8.37 PM
root / root
0644
rhncli.py
9.116 KB
29 May 2025 8.37 PM
root / root
0644
rhnreg.py
31.349 KB
29 May 2025 8.37 PM
root / root
0644
rhnreg_constants.py
18.134 KB
29 May 2025 8.37 PM
root / root
0644
rhnserver.py
9.308 KB
29 May 2025 8.37 PM
root / root
0644
rpcServer.py
11.718 KB
29 May 2025 8.37 PM
root / root
0644
rpmUtils.py
5.196 KB
29 May 2025 8.37 PM
root / root
0644
transaction.py
4.095 KB
29 May 2025 8.37 PM
root / root
0644
tui.py
43.7 KB
29 May 2025 8.37 PM
root / root
0644
up2dateAuth.py
10.688 KB
29 May 2025 8.37 PM
root / root
0644
up2dateErrors.py
10.256 KB
29 May 2025 8.37 PM
root / root
0644
up2dateLog.py
2.059 KB
29 May 2025 8.37 PM
root / root
0644
up2dateUtils.py
5.059 KB
29 May 2025 8.47 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF