Qual é o comando similar para “rpm -qp --queryformat”?

2

Eu tenho que analisar muitos pacotes debian e rpm. Eu encontrei o comando dado acima para pacotes de rpm. Isso me permite obter detalhes sobre o conteúdo do pacote sem fazer o download e diretamente através do URI.

Por exemplo. por rpm eu posso dizer

rpm -qp --queryformat "[%{FILENAMES} %{FILEMD5S} \n ] "http://somepath.com/examplePackage.rpm

Isso retorna o nome dos arquivos e sua soma de verificação para cada arquivo em examplePackage.rpm.

Temos um comando similar para os pacotes debian?

Eu olhei para o dpkg-query, apt-file, mas todos eles requerem que o arquivo * deb seja apresentado localmente.

Eu gostaria de evitar o download e a extração de todos os arquivos * deb.

Obrigado por todos os ponteiros e ajuda.

    
por explorer 21.12.2017 / 23:44

1 resposta

3

apt-cache specificly show e showpkg devem atender à maioria das necessidades listadas. O resultado do código a seguir é para um pacote que não está instalado no meu sistema, mas está disponível. apt-cache apenas lê o cache de pacotes locais do APT e pode ser impreciso se não for atualizado recentemente.

apt-cache showpkg 0ad
Package: 0ad
Versions: 
0.0.20-1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages
                  MD5: d943033bedada21853d2ae54a2578a7b
 Description Language: 
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-i386_Packages
                  MD5: d943033bedada21853d2ae54a2578a7b
 Description Language: en
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_universe_i18n_Translation-en
                  MD5: d943033bedada21853d2ae54a2578a7b


Reverse Depends: 
  0ad-dbg,0ad 0.0.20-1
  0ad:i386,0ad
  games-strategy,0ad
  games-finest,0ad
  games-c++-dev,0ad
  0ad-data,0ad
  0ad-data-common,0ad
Dependencies: 
0.0.20-1 - dpkg (2 1.15.6~) 0ad-data (2 0.0.20) 0ad-data (1 0.0.20-1) 0ad-data-common (2 0.0.20) 0ad-data-common (1 0.0.20-1) libboost-filesystem1.58.0 (0 (null)) libc6 (2 2.15) libcurl3-gnutls (2 7.16.2) libenet7 (0 (null)) libgcc1 (2 1:3.4) libgl1-mesa-glx (16 (null)) libgl1 (0 (null)) libgloox13v5 (0 (null)) libicu55 (2 55.1-1~) libminiupnpc10 (2 1.9.20140610) libnspr4 (2 2:4.9.2) libnvtt2 (0 (null)) libopenal1 (2 1.14) libpng12-0 (2 1.2.13-4) libsdl2-2.0-0 (2 2.0.4) libstdc++6 (2 5.2) libvorbisfile3 (2 1.1.2) libwxbase3.0-0v5 (2 3.0.2+dfsg) libwxgtk3.0-0v5 (2 3.0.2+dfsg) libx11-6 (0 (null)) libxcursor1 (4 1.1.2) libxml2 (2 2.9.0) zlib1g (2 1:1.2.0) 0ad:i386 (32 (null)) 
Provides: 
0.0.20-1 - 
Reverse Provides:
apt-cache show 0ad
Package: 0ad
Priority: optional
Section: universe/games
Installed-Size: 17865
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Games Team <[email protected]>
Architecture: amd64
Version: 0.0.20-1
Depends: 0ad-data (>= 0.0.20), 0ad-data (<= 0.0.20-1), 0ad-data-common (>= 0.0.20), 0ad-data-common (<= 0.0.20-1), libboost-filesystem1.58.0, libc6 (>= 2.15), libcurl3-gnutls (>= 7.16.2), libenet7, libgcc1 (>= 1:3.4), libgl1-mesa-glx | libgl1, libgloox13v5, libicu55 (>= 55.1-1~), libminiupnpc10 (>= 1.9.20140610), libnspr4 (>= 2:4.9.2), libnvtt2, libopenal1 (>= 1.14), libpng12-0 (>= 1.2.13-4), libsdl2-2.0-0 (>= 2.0.4), libstdc++6 (>= 5.2), libvorbisfile3 (>= 1.1.2), libwxbase3.0-0v5 (>= 3.0.2+dfsg), libwxgtk3.0-0v5 (>= 3.0.2+dfsg), libx11-6, libxcursor1 (>> 1.1.2), libxml2 (>= 2.9.0), zlib1g (>= 1:1.2.0)
Pre-Depends: dpkg (>= 1.15.6~)
Filename: pool/universe/0/0ad/0ad_0.0.20-1_amd64.deb
Size: 5071640
MD5sum: 205c3197b2a807d2bf455e138f8332a5
SHA1: c64a2e29ebb7cec741c21b703b935ef5ff3c412f
SHA256: 006fa3e766cc601510d78861ac2f15d20de0373404ac26fb95a0e943ee38977f
Description-en: Real-time strategy game of ancient warfare
 0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
 real-time strategy (RTS) game of ancient warfare. In short, it is a
 historically-based war/economy game that allows players to relive or rewrite
 the history of Western civilizations, focusing on the years between 500 B.C.
 and 500 A.D. The project is highly ambitious, involving state-of-the-art 3D
 graphics, detailed artwork, sound, and a flexible and powerful custom-built
 game engine.
Description-md5: d943033bedada21853d2ae54a2578a7b
Homepage: http://play0ad.com/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
    
por J. Starnes 22.12.2017 / 00:09