pkgbuild.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:packagecore 作者: BytePackager 项目源码 文件源码
def prep(self, container):
        container.execute(["pacman", "-Syy", "--noconfirm", "sudo", "binutils",
                           "fakeroot"])
        uid = os.getuid()
        if uid == 0:
            # if we're running as root, make up a user
            uid = 1000
        container.execute(["useradd", "-m", "-u", str(uid), "packagecore"])
        container.execute(["/bin/bash", "-c",
                           "echo 'packagecore ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"])
        # create our working directory
        self._pkgBuildDir = os.path.join(container.getSharedDir(),
                                         "arch-pkg")
        _makeDir(self._pkgBuildDir)

        self.generatePKGBUILDFile(container)

    ##
    # @brief Build the arch package.
    #
    # @param container The container to build in.
    #
    # @return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号