[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: packages as per sources



L.V.Gandhi wrote:
On 3/2/06, Chris Bannister <mockingbird@ihug.co.nz> wrote:

On Mon, Feb 27, 2006 at 07:10:02AM -0800, L.V.Gandhi wrote:

May be I was not clear. I wanted to packages installed say from nerim
source. How to get it?

I would like clarify that I would like to get a list of packages
installed from particular source. This I felt as necessary when we do
dpkg --get-selections and store the result to install again or install
in other machine with new sources list.

Not sure about this one.

I also wanted to get list of packages available from a source. As I
use apt, I wanted to use apt-cache as aptitude could not find as
suggested by Mr.Florian Ernst

As already suggested, if the source is already in you /etc/apt/sources.list and you have done apt-get update then there will be a packages file in /var/lib/apt/lists/ for each source.

You can then grep/awk the file to get a list of package names available e.g. for marillat amd64 source spello.sscnet.ucla.edu_marillat_dists_sid_

cd /var/lib/apt/lists
cat spello.sscnet.ucla.edu_marillat_dists_sid_*| grep Package |awk -F : {'print$2'} > marillat.txt

Will give a text file will all the package names in it. Do the same for all your sources. You probably write a simple bash script to compare the output of dpkg -l | grep ii against these files to fins where the package originates from.

Not very elegant but may do what you want

HTH

Wackojacko



Reply to: