【问题标题】:How to list/download the recursive BUILD dependencies of a debian package?如何列出/下载 debian 包的递归 BUILD 依赖项?
【发布时间】:2022-01-26 04:55:04
【问题描述】:

我最近了解到,可以使用apt 下载源代码并轻松地从Cinnamon volume step and media keys 在本地修改、重新构建和安装包。

# Download the sources
apt source cinnamon-settings-daemon
cd cinnamon-settings-daemon-4.4.0+tricia
# Then install the build dependencies
apt build-dep cinnamon-settings-daemon
#Then build from the modified sources
apt build
Install the modified deb file (again note the version string may differ for different Cinnamon versions)
apt deb ~/cinnamon-settings-daemon_4.4.0+tricia_amd64.deb

我现在还希望能够下载 apt build-dep 所需的所有软件包,就像二进制软件包安装 How to list/download the recursive dependencies of a debian package? 一样。但是,当我尝试使用 --download-only 然后安装 debs 文件时,导致需要其他几个文件:

The following additional packages will be installed:
  libarchive-cpio-perl libcupsfilters-dev libicu66:i386 libltdl-dev
  libmail-sendmail-perl libpng-tools libpulse0:i386 libsys-hostname-long-perl

即使$ apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances cinnamon-settings-daemon | grep "^\w" | sort -u 也没有列出例如libarchive-cpio-perl--download-only 当我尝试替换空的 dmkg 状态文件 ($(apt-config shell STATUS Dir::State::status)) 并下载了 ~500 个文件而不是 ~100 个文件时,“附加”文件仍然丢失。

添加了 1:
我将--no-install-recommends 添加到apt install debs,现在只剩下两个i386 未下载:

The following additional packages will be installed:
  libicu66:i386 libpulse0:i386

知道它们有什么特别之处吗?这些是唯一提到的i386,是上面apt cache 中列出的第一个。第 2 个未列出,因此组合两个 deb 集不是解决方法。

【问题讨论】:

    标签: package dependencies debian apt


    【解决方案1】:

    我下载了带有 dpkg 状态文件的 debs,该文件对应的系统安装的软件包少于我稍后尝试安装的软件包。我认为它可以确保下载所有必需的内容。但是,当我在遇到与常规(不是构建,源)包相同的问题后收到答案时,事实并非如此:https://unix.stackexchange.com/a/684975/446998。另外安装的包包括一些i386架构的包和下载的deb中对应的amd64包,所以在安装amd64的时候i386也需要升级,需要保持同步。

    【讨论】:

      猜你喜欢
      • 2014-03-27
      • 2013-07-20
      • 1970-01-01
      • 2016-07-19
      • 2017-01-31
      • 2020-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多