Ejemplo n.º 1
0
    def _addFingerprint(self):
        import rpm

        iutil.resetRpmDb()
        ts = rpm.TransactionSet(ROOT_PATH)
        # pylint: disable-msg=E1101
        return ts.dbMatch('provides', 'fprintd-pam').count()
Ejemplo n.º 2
0
    def complete(self, anaconda):
        log.debug("called smartinstall.SmartBackend.complete")

        # Remove the local repos that we added for install, they would not
        # available any more after install.
        self.asmart.removeWrlLoclRepo()

        # clean up rpmdb locks so that kickstart %post scripts aren't
        # unhappy (#496961)
        iutil.resetRpmDb(self.instPath)
Ejemplo n.º 3
0
def rpmSetupGraphicalSystem(anaconda):
    import rpm

    iutil.resetRpmDb(anaconda.rootPath)
    ts = rpm.TransactionSet(anaconda.rootPath)

    # Only add "rhgb quiet" on non-s390, non-serial installs
    if iutil.isConsoleOnVirtualTerminal() and \
       ts.dbMatch('provides', 'rhgb').count() or \
       ts.dbMatch('provides', 'plymouth').count():
        anaconda.bootloader.args.append("rhgb quiet")

    if ts.dbMatch('provides', 'service(graphical-login)').count() and \
       anaconda.displayMode == 'g' and not flags.usevnc:
        anaconda.desktop.setDefaultRunLevel(5)
Ejemplo n.º 4
0
def rpmSetupGraphicalSystem(anaconda):
    import rpm

    iutil.resetRpmDb(anaconda.rootPath)
    ts = rpm.TransactionSet(anaconda.rootPath)

    # Only add "rhgb quiet" on non-s390, non-serial installs
    if iutil.isConsoleOnVirtualTerminal() and \
       ts.dbMatch('provides', 'rhgb').count() or \
       ts.dbMatch('provides', 'plymouth').count():
        anaconda.bootloader.args.append("rhgb quiet")

    if ts.dbMatch('provides', 'service(graphical-login)').count() and \
       anaconda.displayMode == 'g' and not flags.usevnc:
        anaconda.desktop.setDefaultRunLevel(5)
Ejemplo n.º 5
0
def rpmSetupGraphicalSystem(anaconda):
    import rpm

    iutil.resetRpmDb(anaconda.rootPath)
    ts = rpm.TransactionSet(anaconda.rootPath)

    if iutil.isConsoleOnVirtualTerminal() and \
       (ts.dbMatch('provides', 'rhgb').count() or \
        ts.dbMatch('provides', 'plymouth').count()):
        anaconda.id.bootloader.args.append("quiet")
        anaconda.id.bootloader.args.append("rhgb")

    if ts.dbMatch('provides', 'service(graphical-login)').count() and \
       ts.dbMatch('provides', 'xorg-x11-server-Xorg').count() and \
       anaconda.id.displayMode == 'g' and not flags.usevnc:
        anaconda.id.desktop.setDefaultRunLevel(5)
Ejemplo n.º 6
0
def rpmSetupGraphicalSystem(anaconda):
    import rpm

    iutil.resetRpmDb()
    ts = rpm.TransactionSet(ROOT_PATH)

    # Only add "rhgb quiet" on non-s390, non-serial installs
    if iutil.isConsoleOnVirtualTerminal() and \
       (ts.dbMatch('provides', 'rhgb').count() or \
        ts.dbMatch('provides', 'plymouth').count()):
        anaconda.bootloader.boot_args.update(["rhgb", "quiet"])

    if ts.dbMatch('provides', 'service(graphical-login)').count() and \
       ts.dbMatch('provides', 'xorg-x11-server-Xorg').count() and \
       anaconda.displayMode == 'g' and not flags.usevnc:
        anaconda.desktop.setDefaultRunLevel(5)
Ejemplo n.º 7
0
def rpmSetupGraphicalSystem(anaconda):
    import rpm

    iutil.resetRpmDb(anaconda.rootPath)
    ts = rpm.TransactionSet(anaconda.rootPath)

    if iutil.isConsoleOnVirtualTerminal() and \
       (ts.dbMatch('provides', 'rhgb').count() or \
        ts.dbMatch('provides', 'plymouth').count()):
        anaconda.id.bootloader.args.append("quiet")
        anaconda.id.bootloader.args.append("rhgb")

    if ts.dbMatch('provides', 'service(graphical-login)').count() and \
       ts.dbMatch('provides', 'xorg-x11-server-Xorg').count() and \
       anaconda.id.displayMode == 'g' and not flags.usevnc:
        anaconda.id.desktop.setDefaultRunLevel(5)
Ejemplo n.º 8
0
    def doBackendSetup(self, anaconda):
        log.debug("called smartinstall.SmartBackend.doBackendSetup")

        if anaconda.dir == DISPATCH_BACK:
            rc = anaconda.intf.messageWindow(
                _("Warning"),
                _("Filesystems have already been activated.  You "
                  "cannot go back past this point.\n\nWould you like to "
                  "continue with the installation?"),
                type="custom",
                custom_icon=["error", "error"],
                custom_buttons=[_("_Exit installer"),
                                _("_Continue")])

            if rc == 0:
                sys.exit(0)
            anaconda.dir = DISPATCH_FORWARD
            return DISPATCH_FORWARD

        if anaconda.upgrade:
            # make sure that the rpmdb doesn't have stale locks
            iutil.resetRpmDb(anaconda.rootPath)
        else:
            self._initRPM()

        self.asmart = AnacondaSmart(anaconda)
        self.asmart.setup()

        # Parse and configure the local repos
        iface.object._progress.windowTitle = "Package Feeds"
        iface.object.showStatus("Configuring package feeds")

        # Configure proxy
        if anaconda.proxy:
            # Setup proxy == anaconda.proxy
            pass

            if anaconda.proxyUsername:
                # Setup username using anaconda.proxyUsername
                pass

            if anaconda.proxyPassword:
                # Setup password using anaconda.proxyPassword
                pass

        iface.object.hideStatus()
Ejemplo n.º 9
0
def rpmKernelVersionList(rootPath="/"):
    import rpm

    def get_version(header):
        for f in header["filenames"]:
            if f.startswith("/boot/vmlinuz-"):
                return f[14:]
            elif f.startswith("/boot/efi/EFI/redhat/vmlinuz-"):
                return f[29:]
        return ""

    def get_tag(header):
        if header["name"] == "kernel":
            return "base"
        elif header["name"].startswith("kernel-"):
            return header["name"][7:]
        return ""

    versions = []

    iutil.resetRpmDb(rootPath)
    ts = rpm.TransactionSet(rootPath)

    mi = ts.dbMatch("provides", "kernel")
    for h in mi:
        v = get_version(h)
        tag = get_tag(h)
        if v == "" or tag == "":
            log.warning(
                "Unable to determine kernel type/version for %s-%s-%s.%s"
                % (h["name"], h["version"], h["release"], h["arch"])
            )
            continue
        # rpm really shouldn't return the same kernel more than once... but
        # sometimes it does (#467822)
        if (v, h["arch"], tag) in versions:
            continue
        versions.append((v, h["arch"], tag))

    return versions
Ejemplo n.º 10
0
def rpmKernelVersionList(rootPath="/"):
    import rpm

    def get_version(header):
        for f in header['filenames']:
            if f.startswith('/boot/vmlinuz-'):
                return f[14:]
            elif f.startswith('/boot/efi/EFI/redhat/vmlinuz-'):
                return f[29:]
        return ""

    def get_tag(header):
        if header['name'] == "kernel":
            return "base"
        elif header['name'].startswith("kernel-"):
            return header['name'][7:]
        return ""

    versions = []

    iutil.resetRpmDb(rootPath)
    ts = rpm.TransactionSet(rootPath)

    mi = ts.dbMatch('provides', 'kernel')
    for h in mi:
        v = get_version(h)
        tag = get_tag(h)
        if v == "" or tag == "":
            log.warning(
                "Unable to determine kernel type/version for %s-%s-%s.%s" %
                (h['name'], h['version'], h['release'], h['arch']))
            continue
        # rpm really shouldn't return the same kernel more than once... but
        # sometimes it does (#467822)
        if (v, h['arch'], tag) in versions:
            continue
        versions.append((v, h['arch'], tag))

    return versions
Ejemplo n.º 11
0
def rpmSetupGraphicalSystem(anaconda):
    import rpm

    iutil.resetRpmDb(anaconda.rootPath)
    ts = rpm.TransactionSet(anaconda.rootPath)

    # Only add "rhgb quiet" on non-s390, non-serial installs
    if iutil.isConsoleOnVirtualTerminal() and (
        ts.dbMatch("provides", "rhgb").count() or ts.dbMatch("provides", "plymouth").count()
    ):
        anaconda.id.bootloader.args.append("rhgb")
        anaconda.id.bootloader.args.append("quiet")

    if (
        ts.dbMatch("provides", "service(graphical-login)").count()
        and ts.dbMatch("provides", "xorg-x11-server-Xorg").count()
        and anaconda.id.displayMode == "g"
        and not flags.usevnc
    ):
        anaconda.id.desktop.setDefaultRunLevel(5)

    if ts.dbMatch("provides", "vclient").count():
        anaconda.id.desktop.setDefaultRunLevel(5)
Ejemplo n.º 12
0
def rpmKernelVersionList():
    import rpm

    def get_version(header):
        for f in header['filenames']:
            if f.startswith('/boot/vmlinuz-'):
                return f[14:]
            elif f.startswith('/boot/efi/EFI/redhat/vmlinuz-'):
                return f[29:]
        return ""

    def get_tag(header):
        if header['name'] == "kernel":
            return "base"
        elif header['name'].startswith("kernel-"):
            return header['name'][7:]
        return ""

    versions = []

    iutil.resetRpmDb()
    ts = rpm.TransactionSet(ROOT_PATH)

    mi = ts.dbMatch('provides', 'kernel')
    for h in mi:
        v = get_version(h)
        tag = get_tag(h)
        if v == "" or tag == "":
            log.warning("Unable to determine kernel type/version for %s-%s-%s.%s" %(h['name'], h['version'], h['release'], h['arch'])) 
            continue
        # rpm really shouldn't return the same kernel more than once... but
        # sometimes it does (#467822)
        if (v, h['arch'], tag) in versions:
            continue
        versions.append( (v, h['arch'], tag) )

    return versions
Ejemplo n.º 13
0
    def _addFingerprint(self):
        import rpm

        iutil.resetRpmDb(self.anaconda.rootPath)
        ts = rpm.TransactionSet(self.anaconda.rootPath)
        return ts.dbMatch('provides', 'fprintd-pam').count()
Ejemplo n.º 14
0
    def _addFingerprint(self):
        import rpm

        iutil.resetRpmDb(self.anaconda.rootPath)
        ts = rpm.TransactionSet(self.anaconda.rootPath)
        return ts.dbMatch('provides', 'fprintd-pam').count()