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

Re: get software list of one software repository





On 9/4/2015 7:33 AM, 慕冬亮 wrote:


> Date: Fri, 4 Sep 2015 10:21:13 +0100
> From: mailinglist@darac.org.uk
> To: debian-user@lists.debian.org
> Subject: Re: get software list of one software repository
>
> On Thu, Sep 03, 2015 at 10:32:35PM +0800, mudongliang wrote:
> > Hello everyone :
> >     There are some software repositories on my computer.
> >     For example , google chrome software repository
> >         deb [1]http://dl.google.com/linux/chrome/deb/ stable main
> >     I also add ubuntu partner in my computer.
> >     What I want to ask is how to get software list of someone software
> > repository through command line!
> >     I can get this information through synaptic graphics.
> >     But I don't know how to do it in command line.
>
> Assuming that you have aptitude installed, try the following:
>
> Start by running "grep Origin: /var/lib/apt/lists/*Release" to see where
> your packages from from. Origin will be "Debian" for official debian
> packages, "Canonical" for official ubuntu packages, etc.
>
> Next, run "aptitude search '?origin(Debian)'" (replacing Debian with any
> of the Origins listed above.
>
> If you need to narrow it down further (for example, you want to list
> only unstable packages from Debian), then you can try something like
> "aptitude search '(!~Atesting ~Aunstable ?origin(Debian))'".
I think you may mistaken my request. I want the reverse information.
For example, the software list of debian testing main software repository is needed.
I don't need in which software repository a software is located.
    
I sounds like aptitude *is* the tool that you want.

I don't use aptitude so I am taking it on faith that the given example is a working
example and you just need adjust it to fit your needs.

If you want a list of software in 'debian testing main' the repository is the origin,
testing is the archive '~A', main is the section.

aptitude search term information is available here.

https://wiki.debian.org/Aptitude#Advanced_search_patterns
https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html

the second link shows this...

--------------------------
?section(section)
, ~ssection

Matches packages whose section matches the regular _expression_ section.
----------------------------

Adding that to the above example..

"aptitude search '(!~Atesting ~Aunstable ~smain ?origin(Debian))'"

So this particular example should then show all the available packages in the
Debian repository that are in the main section of the unstable archive, results
from testing would be filtered out.

I had trouble getting it to work in my earlier attempts, but I think it was probably
because I was missing this part of the equation..

> Start by running "grep Origin: /var/lib/apt/lists/*Release" to see where
> your packages from from.

As opposed to guessing the correct origin base on the way Synaptic shows it to you.

Later, Seeker


Reply to: