与基于 Debian 的存储库交互的技巧
我计划编写一个与基于 Debian 的存储库交互的小程序 - 即做部分镜像**。我打算用python写它。
使用存储库(包括已构建的“轮子”)(以保存另一个轮子的发明)有哪些技巧?
我已经发现的一些问题
由于它将成为部分镜像,因此我需要重新生成包列表(Release、Contents*、Packages.{bz2,gz})。 (也许 debian-installer 可以为我做到这一点?)
如何获取软件包列表的更改(我已经知道软件包不会更改,但列表仅链接到最新文件)?
** 已经研究了 apt-mirror 和 debmirror。 Debmirror 是最接近我想要的,但缺少一些功能。如果 apt 可以处理多个版本和架构,那么我会考虑 apt。
I am planning on writing a small program that interacts with a debian based repository - namely doing a partial mirror**. I am planning to write it in python.
What are some tips for working with the repository including already constructed 'wheels' (to save the invention of yet another one)?
Some issues I have identified
As it is going to be a partial mirror, I will need to regenerate the package lists (Release,Contents*, Packages.{bz2,gz}). (Maybe debian-installer can do it for me??)
How to get changes to package list (I already know that packages do not change, but that the lists only link to the latest file)?
** Already looked into apt-mirror and debmirror. Debmirror is the closest to what I want, however lacking in some features. If apt can deal with multiple releases and architectures then I will consider apt.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
debian-installer 不会生成存储库元数据。为此,您需要像
reprepro
或mini-dinstall
这样的工具。他们还将处理您提出的第二点。debian-installer doesn't generate repository metadata. For that, you want a tool like
reprepro
ormini-dinstall
. They'll also handle the second point you raised.