RPM Format Package

We have released the RPM Format package for all licenses of Cerbero Suite.

The RPM Package Manager (RPM) format is a package management system used primarily in Red Hat-based Linux distributions, including Fedora and CentOS. It is utilized for managing the installation, update, and removal of software on Linux systems. An RPM file contains the software itself, along with metadata about the software such as its version, dependencies, and instructions for installation. This format streamlines the process of software management, providing a standardized approach to handling packages on Linux platforms.

The package is also exposed to the SDK:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
from Pro.Core import *
from Pkg.RPM import *
def parseRPMArchive(fname):
c = createContainerFromFile(fname)
if c.isNull():
return
obj = RPMObject()
if not obj.Load(c) or not obj.ParseArchive():
return
n = obj.GetEntryCount()
for i in range(n):
entry = obj.GetEntry(i)
if entry == None:
break
# skip directories
if not obj.IsFile(entry):
continue
print("file name:", entry.name)
# retrieves the file data as NTContainer
fc = obj.GetEntryData(entry)
from Pro.Core import * from Pkg.RPM import * def parseRPMArchive(fname): c = createContainerFromFile(fname) if c.isNull(): return obj = RPMObject() if not obj.Load(c) or not obj.ParseArchive(): return n = obj.GetEntryCount() for i in range(n): entry = obj.GetEntry(i) if entry == None: break # skip directories if not obj.IsFile(entry): continue print("file name:", entry.name) # retrieves the file data as NTContainer fc = obj.GetEntryData(entry)
from Pro.Core import *
from Pkg.RPM import *

def parseRPMArchive(fname):
    c = createContainerFromFile(fname)
    if c.isNull():
        return
    obj = RPMObject()
    if not obj.Load(c) or not obj.ParseArchive():
        return
    n = obj.GetEntryCount()
    for i in range(n):
        entry = obj.GetEntry(i)
        if entry == None:
            break
        # skip directories
        if not obj.IsFile(entry):
            continue
        print("file name:", entry.name)
        # retrieves the file data as NTContainer
        fc = obj.GetEntryData(entry)

Leave a Reply

Your email address will not be published. Required fields are marked *