如何修改 Debian 控制文件构建依赖版本?
有一个简单的控制文件:
Source: my-package
Section: non-free
Priority: extra
Maintainer: Some one <[email protected]>
Uploaders: Some one <[email protected]>
Build-Depends: dh-autoreconf, pkg-config, debhelper, autotools-dev, dh-buildinfo,
dh-systemd,
packageA (>= 1.42),
libpackage-dev (>= 1.5-32), libpackage-dev (<= 1.5-999),
Standards-Version: 1.0.0
Homepage: http://www.google.com
Package: my-package
Section: non-free
Architecture: any
Depends: lib-bla
Description: my awesome package
另外,我有一个 Map<>其中包含: package : version
我需要修改此文件的 Build-Depends 属性(通过 groovy/Jenkins/shell) 并替换每个不包含版本限制的构建依赖项(例如 pkg-config)以包含特定版本:(= 1.0)
修改后的版本应从 Map
文件中获取,应如下所示:
..
..
Build-Depends: dh-autoreconf (= 1.0), pkg-config (= 2.0-10), debhelper(= 10.0-9),
autotools-dev (= 7.2.3-1), dh-buildinfo(= 3.0),
..
..
在底行中,需要某种方法来迭代 Build-Depends 检查是否包含版本限制,如果不包含,则从 Map 中放入版本
有想法吗? 我可以使用文本处理方法来做到这一点,但我寻找更官方的方法来搞乱 Debian 的控制文件修改
There is a simple control file:
Source: my-package
Section: non-free
Priority: extra
Maintainer: Some one <[email protected]>
Uploaders: Some one <[email protected]>
Build-Depends: dh-autoreconf, pkg-config, debhelper, autotools-dev, dh-buildinfo,
dh-systemd,
packageA (>= 1.42),
libpackage-dev (>= 1.5-32), libpackage-dev (<= 1.5-999),
Standards-Version: 1.0.0
Homepage: http://www.google.com
Package: my-package
Section: non-free
Architecture: any
Depends: lib-bla
Description: my awesome package
also, I have a Map<> that contains:package : version
I need to modify this file's Build-Depends property (Via groovy/Jenkins/shell)
and replace each build dependency that doesn't contains version restriction at all (For example pkg-config) to contain a specific version: (= 1.0)
the version should be taken from the Map
file after modification should be like:
..
..
Build-Depends: dh-autoreconf (= 1.0), pkg-config (= 2.0-10), debhelper(= 10.0-9),
autotools-dev (= 7.2.3-1), dh-buildinfo(= 3.0),
..
..
In the bottom line, need some way to iterate over the Build-Depends check if contains version restriction, if no, put the version from the Map
Any idea?
I can do it using text processing method but I search for more official way to mess with Debian's control file modification
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论