How to use the reprounzip-qt.reprounzip_qt.gui.unpack.ChrootOptions function in reprounzip-qt

To help you get started, we’ve selected a few reprounzip-qt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VIDA-NYU / reprozip / reprounzip-qt / reprounzip_qt / gui / unpack.py View on Github external
options['args'].append('--dont-use-chroot')
            record_usage(vagrant_no_chroot=True)

        if not self.magic_dirs.isChecked():
            options['args'].append('--dont-bind-magic-dirs')
            record_usage(vagrant_magic_dirs=False)

        return options


class UnpackTab(QtGui.QWidget):
    """The unpack window, that sets up a .RPZ file in a directory.
    """
    UNPACKERS = [
        ('directory', DirectoryOptions),
        ('chroot', ChrootOptions),
        ('docker', DockerOptions),
        ('vagrant', VagrantOptions),
    ]

    unpacked = QtCore.pyqtSignal(str, object)

    def __init__(self, package='', **kwargs):
        super(UnpackTab, self).__init__(**kwargs)

        layout = QtGui.QGridLayout()
        layout.addWidget(QtGui.QLabel("RPZ package:"), 0, 0)
        self.package_widget = QtGui.QLineEdit(package, enabled=False)
        layout.addWidget(self.package_widget, 0, 1)
        browse_pkg = QtGui.QPushButton("Browse")
        browse_pkg.clicked.connect(self._browse_pkg)
        layout.addWidget(browse_pkg, 0, 2)
github VIDA-NYU / reprozip / reprounzip-qt / reprounzip_qt / gui / unpack.py View on Github external
def options(self):
        options = super(ChrootOptions, self).options()

        options['root'] = ROOT.INDEX_TO_OPTION[self.root.currentIndex()]

        if self.preserve_owner.checkState() == QtCore.Qt.Unchecked:
            options['args'].append('--dont-preserve-owner')
        elif self.preserve_owner.checkState() == QtCore.Qt.Checked:
            options['args'].append('--preserve-owner')

        if self.magic_dirs.checkState() == QtCore.Qt.Unchecked:
            options['args'].append('--dont-bind-magic-dirs')
        elif self.magic_dirs.checkState() == QtCore.Qt.Checked:
            options['args'].append('--bind-magic-dirs')

        record_usage(
            chroot_preserve_owner=self.preserve_owner.checkState(),
            chroot_magic_dirs=self.magic_dirs.checkState())