如何获取信息。关于不在 /etc/apt/sources.list 中的不同版本的二进制包?

如何获取信息。关于不在 /etc/apt/sources.list 中的不同版本的二进制包?

我正在使用来自 stable/sid 的一些软件包(我可以用手指数得出来)和一些来自实验性(浏览器)的软件包来运行 Debian testing/jessie。

正如 Faheem 所要求的,这是 apt-cachepolicy 的输出。

$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://debian.ec.as6453.net/debian/ experimental/main Translation-en
 500 http://debian.ec.as6453.net/debian/ experimental/contrib Translation-en
   1 http://debian.ec.as6453.net/debian/ experimental/contrib amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=contrib
     origin debian.ec.as6453.net
   1 http://debian.ec.as6453.net/debian/ experimental/main amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ unstable/non-free Translation-en
 500 http://debian.ec.as6453.net/debian/ unstable/main Translation-en
 500 http://debian.ec.as6453.net/debian/ unstable/contrib Translation-en
   1 http://debian.ec.as6453.net/debian/ unstable/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free
     origin debian.ec.as6453.net
   1 http://debian.ec.as6453.net/debian/ unstable/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib
     origin debian.ec.as6453.net
   1 http://debian.ec.as6453.net/debian/ unstable/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main
     origin debian.ec.as6453.net
 500 http://security.debian.org/ jessie/updates/main Translation-en
 600 http://security.debian.org/ jessie/updates/main amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian-Security,c=main
     origin security.debian.org
 500 http://debian.ec.as6453.net/debian/ jessie-updates/non-free Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie-updates/main Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie-updates/contrib Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie-updates/non-free amd64 Packages
     release o=Debian,a=testing-updates,n=jessie-updates,l=Debian,c=non-free
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ jessie-updates/contrib amd64 Packages
     release o=Debian,a=testing-updates,n=jessie-updates,l=Debian,c=contrib
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ jessie-updates/main amd64 Packages
     release o=Debian,a=testing-updates,n=jessie-updates,l=Debian,c=main
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ jessie/non-free Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie/main Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie/contrib Translation-en
 600 http://debian.ec.as6453.net/debian/ jessie/non-free amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian,c=non-free
     origin debian.ec.as6453.net
 600 http://debian.ec.as6453.net/debian/ jessie/contrib amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian,c=contrib
     origin debian.ec.as6453.net
 600 http://debian.ec.as6453.net/debian/ jessie/main amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian,c=main
     origin debian.ec.as6453.net
Pinned packages:

我知道三个命令来查找包的版本,但这两个命令都了解 my 中的内容/etc/apt/sources.list,然后告诉/共享它。我以wordpress为例来分享和展示:

$ aptitude versions wordpress
Package python-wordpresslib:              
p   1.1-1                                      testing,unstable           600 

Package ruby-omniauth-wordpress:
p   0.2.1-1                                    testing,unstable           600 

Package wordpress:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-l10n:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-openid:
p   3.3.4-1                                    testing,unstable           600 

Package wordpress-shibboleth:
p   1.4-2                                      testing,unstable           600 

Package wordpress-theme-twentyfourteen:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-theme-twentythirteen:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-theme-twentytwelve:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-xrds-simple:
p   1.1-1                         

可以看出,这不是那么准确,所以我们转到另一个命令:-

$ apt-show-versions -a wordpress
wordpress not installed (available for: all)

是的,它还没有安装,所以它没有向我显示所有内容。让我做一个替代示例,安装它来显示信息。它有:-

$ apt-show-versions -a iceweasel
iceweasel:amd64 31.0-3 install ok installed
iceweasel:amd64 31.0-3      jessie       debian.ec.as6453.net
No testing-updates version
iceweasel:amd64 31.1.0esr-1 unstable     debian.ec.as6453.net
iceweasel:amd64 32.0-1      experimental debian.ec.as6453.net
iceweasel:amd64/jessie 31.0-3 uptodate

最后是 apt-cache 策略。

$ apt-cache policy wordpress
wordpress:
  Installed: (none)
  Candidate: 3.9.2+dfsg-1
  Version table:
     4.0+dfsg-1 0
          1 http://debian.ec.as6453.net/debian/ unstable/main amd64 Packages
     3.9.2+dfsg-1 0
        600 http://debian.ec.as6453.net/debian/ jessie/main amd64 Packages

现在这错过了从稳定上市的机会。有谁知道有一个实用程序可以执行相同的工作,只需几秒钟到一分钟的时间即可找出 PTS 中针对哪个版本列出了哪些版本的软件包并共享该信息。

如果没有实用程序,而是需要 shell 脚本来执行相同的操作,那么 shell 脚本的外观/需要如何。它基本上需要获取版本信息。以及他们遵循哪个轨道(稳定、测试、不稳定、实验)并向用户提供答案。

我试图找到一个实用程序或 shell 脚本,但惨遭失败。如果有人有任何想法,请告诉我。

答案1

评论有点长,所以这里...

关于apt-show-versions,我也没有安装 wordpress,但使用相同的命令我得到的信息比你多得多。你粘贴了整个输出吗?

root@orwell:/home/faheem# apt-show-versions -a wordpress
Not installed
wordpress 3.6.1+dfsg-1~deb6u4 squeeze  debian.lcs.mit.edu
wordpress 3.6.1+dfsg-1~deb7u3 wheezy   debian.lcs.mit.edu
wordpress 3.6.1+dfsg-1~deb7u4 wheezy   security.debian.org
No stable-updates version
wordpress 3.9.2+dfsg-1        testing  debian.lcs.mit.edu
wordpress 3.9.2+dfsg-1        unstable debian.lcs.mit.edu
No experimental version
wordpress not installed

你写的是关于apt-cache policy

现在这错过了从稳定上市的机会。

不,事实并非如此。如果它遗漏了某些内容,您将无法获得该信息。我有

root@orwell:/home/faheem# apt-cache policy wordpress
wordpress:
  Installed: (none)
  Candidate: 3.6.1+dfsg-1~deb7u4
  Version table:
     3.9.2+dfsg-1 0
         50 http://debian.lcs.mit.edu/debian/ testing/main amd64 Packages
         50 http://debian.lcs.mit.edu/debian/ unstable/main amd64 Packages
     3.6.1+dfsg-1~deb7u4 0
        500 http://security.debian.org/ wheezy/updates/main amd64 Packages
     3.6.1+dfsg-1~deb7u3 0
        500 http://debian.lcs.mit.edu/debian/ wheezy/main amd64 Packages
     3.6.1+dfsg-1~deb6u4 0
        500 http://debian.lcs.mit.edu/debian/ squeeze/main amd64 Packages

您运行的是哪个版本的 Debian?另外,将内容粘贴apt-cache policy到您的问题中。

相关内容