Você pode ler a versão de um pacote Debian .deb
usando os comandos ar
e tar
que devem estar disponíveis, se não instalados, em quase todos os sistemas.
O seguinte pipeline imprime o arquivo control
do pacote Debian na saída padrão:
ar p mysoftware-unstable.deb control.tar.gz | tar xzOf - ./control
O arquivo control
contém um campo Version
. Este exemplo mostra o arquivo control
do pacote google-chrome-unstable
:
$ wget https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
$ ar p google-chrome-unstable_current_amd64.deb control.tar.gz | tar xzOf - ./control
Package: google-chrome-unstable
Version: 50.0.2638.0-1
Architecture: amd64
Maintainer: Chrome Linux Team <[email protected]>
Installed-Size: 180324
Pre-Depends: dpkg (>= 1.14.0)
Depends: gconf-service, libasound2 (>= 1.0.23), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.12), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.2.14), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.3.9), libgcc1 (>= 1:4.1.1), libgconf-2-4 (>= 2.31.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.26.0), libgtk2.0-0 (>= 2.24.0), libnspr4 (>= 1.8.0.10), libnss3 (>= 3.17.2), libpango1.0-0 (>= 1.14.0), libstdc++6 (>= 4.8.0), libx11-6 (>= 2:1.4.99.1), libxcomposite1 (>= 1:0.3-1), libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxi6 (>= 2:1.2.99.4), libxrandr2 (>= 2:1.2.99.2), libxrender1, libxss1, libxtst6, ca-certificates, fonts-liberation, libappindicator1, libcurl3, lsb-base (>= 4.1), xdg-utils (>= 1.0.2), wget
Provides: www-browser
Section: web
Priority: optional
Description: The web browser from Google
Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.