Debian
如何通過 cli/script 將 debian 測試包版本與穩定版本區分開來?
如何通過 cli/script 將 debian 測試包版本與穩定包區分開來?Debian 有測試源列表和數據庫,以便僅下載一些測試版本,但如何確保/不同的版本已安裝,因為它屬於穩定版,而另一個屬於測試版,例如
$ sudo apt depends -i libopenimageio2.2 libopenimageio2.2 Depends: libavcodec58 (>= 7:4.2) libavcodec-extra58 Depends: libavformat58 (>= 7:4.1) Depends: libavutil56 (>= 7:4.0) Depends: libboost-filesystem1.74.0 (>= 1.74.0) Depends: libboost-thread1.74.0 (>= 1.74.0) Depends: libc6 (>= 2.29) Depends: libdcmtk15 (>= 3.6.5) Depends: libfreetype6 (>= 2.2.1) Depends: libgcc-s1 (>= 4.0) Depends: libgif7 (>= 5.1) Depends: libheif1 (>= 1.3.2) Depends: libilmbase25 (>= 2.5.3) Depends: libjpeg62-turbo (>= 1.3.1) Depends: libopencolorio1v5 (>= 1.1.1~dfsg0) Depends: libopencv-core4.5 (>= 4.5.1+dfsg) Depends: libopencv-imgproc4.5 (>= 4.5.1+dfsg) Depends: libopencv-videoio4.5 (>= 4.5.1+dfsg) Depends: libopenexr25 (>= 2.5.3) Depends: libopenjp2-7 (>= 2.0.0) Depends: libopenvdb7.1 Depends: libpng16-16 (>= 1.6.2-1) Depends: libraw20 (>= 0.16.0) Depends: libsquish0 Depends: libstdc++6 (>= 9) Depends: libswscale5 (>= 7:4.0) Depends: libtbb2 (>= 2017~U7) Depends: libtiff5 (>= 4.0.3) Depends: libwebp6 (>= 0.5.1)
…
的
$ sudo apt search libopenimageio2.2/testing libopenimageio2.2/testing 2.2.10.1+dfsg-1 amd64
顯然沒有對
apt search
……一一進行比較,至少有 40 個這樣的東西可以工作。請幫忙。
它可以通過管道的結果來
apt depends
完成apt-cache policy
:apt-cache depends -i libopenimageio2.2 |awk '{print $2}' | xargs apt policy
apt depends -i libopenimageio2.2
交叉引用兩個單行
注意:
-i
option 和-cache
apt 命令類別必須準確使用