技术解析

Debian 的包发布机制都是怎样的?每次发布新版本都要把依赖也改到最新的版本?
0
2021-06-23 11:52:17
idczone

比如我当前的版本 network-manager 处理 clone mac 地址有 BUG,我想更新到 testing 试试

$ sudo apt install  --no-install-recommends network-manager/testing
Reading package lists... Done                                                 
Building dependency tree                                                    
Reading state information... Done                                       
Selected version '1.10.6-3' (Debian:testing [amd64]) for 'network-manager'      
Selected version '2.27-3' (Debian:testing [amd64]) for 'libc6' because of 'network-manager'
Selected version '0.52.20-4' (Debian:testing [amd64]) for 'libnewt0.52' because of 'network-manager'
Selected version '1.10.6-3' (Debian:testing [amd64]) for 'libnm0' because of 'network-manager'
Some packages could not be installed. This may mean that you have

我的理解是,如果只是调用 libc6 的 so,不使用新特性的话,用老版本的 so 也是可以兼容的,为什么就一定要依赖到最新的 libc6 呢?

尝试升级 libc6 到 teseting,看到 The following packages were automatically installed and are no longer required 还有 The following packages will be REMOVED:,又是懵逼。

我只不过是想单独更新一个包而已啊。

$ sudo apt install libc6/testing libc6-dev/testing
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Selected version '2.27-3' (Debian:testing [amd64]) for 'libc6'
Selected version '2.27-3' (Debian:testing [amd64]) for 'libc6-dev'
Selected version '2.27-3' (Debian:testing [amd64]) for 'libc-dev-bin' because of 'libc6-dev'
The following packages were automatically installed and are no longer required:
  bc cups-browsed cups-core-drivers cups-daemon cups-filters cups-filters-core-drivers cups-ppdc cups-server-common dc foomatic-db-compressed-ppds
  foomatic-db-engine hp-ppd hplip-data libclang1-5.0 libcupscgi1 libcupsmime1 libcupsppdc1 libfontembed1 libgutenprint2 libhpmud0 liblouisutdml-bin
  liblouisutdml-data liblouisutdml7 libomp-dev libomp5 libqpdf17 libsane-hpaio libsnmp-base libsnmp30 llvm-5.0 llvm-5.0-dev llvm-5.0-runtime mscompress
  openprinting-ppds printer-driver-all printer-driver-brlaser printer-driver-c2050 printer-driver-c2esp printer-driver-cjet printer-driver-dymo
  printer-driver-escpr printer-driver-foo2zjs printer-driver-foo2zjs-common printer-driver-fujixerox printer-driver-hpijs printer-driver-m2300w
  printer-driver-min12xxw printer-driver-pnm2ppa printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi python3-pexpect python3-ptyprocess
  python3-renderpm python3-reportlab python3-reportlab-accel qpdf ssl-cert
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libc-dev-bin
Suggested packages:
  glibc-doc locales
The following packages will be REMOVED:
  clang-5.0 cups hplip lib32gcc1 lib32stdc++6 libc-bin libc6-dbg libc6-i386 libc6-x32 libclang-common-5.0-dev libx32gcc1 locales printer-driver-gutenprint
  printer-driver-hpcups printer-driver-postscript-hp printer-driver-splix task-english task-print-server
The following packages will be upgraded:
  libc-dev-bin libc6 libc6-dev
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  libc-bin
3 upgraded, 0 newly installed, 18 to remove and 0 not upgraded.
Need to get 5,842 kB of archives.
After this operation, 138 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] 

https://raw.githubusercontent.com/Debian/apt/master/debian/control

这跟 debian 没关.
Flatpak 了解下

apt 系的依赖关系的确复杂,有时搞得 apt 都无法自行处理依赖,还要靠 aptitude 提供建议。最糟糕的是,有一次我想从不稳定切换到测试分支,结果依赖关系破坏到 aptitude 也无法给出建议

依赖管理本来就是复杂的 NP 问题,像样点的包管理工具中都有个 SAT solver,即使是这样也只能给出较优解而不是最优解

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服