pbuilder 存储依赖项
我只构建有限数量的包,这些包在每个构建上都设置相同的依赖项。不幸的是,例如,pbuilder 尝试在每次重建时安装依赖项,而不是存储准备好的映像并每次重用它。
有没有办法启用这样的功能?如果它们在后续构建之间没有改变,我可以以某种方式跳过安装构建依赖项的漫长步骤吗?
I'm building only a limited number of packages, which have the same dependency set on every build. Unfortunately, pbuilder tries to install the dependencies on every rebuild instead of storing a prepared image and reusing it every time, for example.
Is there a way to enable such functionality? Can I somehow skip the long step of installing build dependencies if they didn't change between subsequent builds?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。您可以使用
pbuilder --login
chroot 进入解压的 pbuilder 环境并安装您喜欢的任何软件包。通常,一旦您注销,您所做的所有更改都会再次被丢弃,但也恰好有一个--save-after-login
开关,这将导致所做的所有更改都包含在您登录的 pbuilder chroot。执行此操作时,我强烈建议首先复制您要编辑的环境,然后仅编辑副本。这样,您仍然拥有一个“干净”的环境,您可以使用它来检查您的包在将其上传到某个存档之前是否正确声明了所有构建依赖项。您可以使用pbuilder的
--basetgz
选项(或使用cowbuilder时的--basepath
)在不同的chroot之间切换。Yes. You can chroot into your unpacked pbuilder environment using
pbuilder --login
and install whatever packages you like. Normally, all the changes you make there are thrown away again once you log out, but there also happens to be a--save-after-login
switch which will cause all changes made to be included in the pbuilder chroot you logged into.When doing that, I highly recommend to first copy the environment you'll be editing and only edit the copy. That way you'll still have a "clean" environment around that you can use to check that your packages correctly declared all their build-dependencies before uploading them to some archive. You can use pbuilder's
--basetgz
option (or--basepath
when using cowbuilder) to switch between different chroots.