Mon, 5 Apr 2010 17:47:36 -0400 <tomh0...@gmail.com> wrote:
> 
> On Mon, Apr 5, 2010 at 5:28 PM, Mike Viau <vi...@sheridanc.on.ca> wrote:
> > I have used aptitude show $(package_name) to list the details of a given
> > package.
> >
> > In the output of the vlan package for example one gets output like:
> >
> > [snip]
> >
> > Priority: extra
> > Section: misc
> >
> > [/snip]
> >
> > How might one determine all packages (installed or not) that fall under a
> > particular "Priority" or "Section" ?
> >
> > I was thinking something pseudo like aptitude show $(all packages) | grep
> > (essential or required or important or standard or optional or extra)
> 
> aptitude search ~s<section>
> aptitude search ~p<priority>
> 

Thanks for the tip. I noticed ~p works with all but the essential priority for 
some reason.

With your tip I was able to find this link:
http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s03s05.html#tableSearchTermQuickGuide

I noticed how terms might be ANDed together but I would appreicated a working 
example of this.

[snip]


                  ?and(term1, term2)
                term1 term2
                  Select any package that matches both
                  term1 and
                  term2.
                
[/snip]

Both "aptitude search ~pextra ~smisc" and "aptitude search ~pextra search 
~smisc" resulted in a list of package which did not necessarily meet both the 
search patterns specified.


Table 2.1. Quick guide to search termsLong formShort formDescription
                  ?=variable
                 
                  Select the package bound to
                  variable; see the section called “Explicit search targets”.
                ?not(pattern)!pattern
                  Select any package that does not match
                  pattern.
                
                  ?action(action)
                ~aaction
                  Select packages that have been marked for the given
                  action (e.g.,
                  “install” or
                  “upgrade”).
                
                  ?all-versions(pattern)
                 
                  Select packages whose versions all match
                  pattern.
                
                  ?and(term1, term2)
                term1 term2
                  Select any package that matches both
                  term1 and
                  term2.
                ?any-version(pattern) 
                  Select packages for which at least one version
                  matches pattern.
                
                  ?archive(archive)
                
                  ~Aarchive
                
                  Select packages from the given archive (such as
                  “unstable”).
                ?automatic~M
                  Select packages that were automatically installed.
                ?bind(variable, pattern)
                  ?variable:term-name[(args)]
                
                  Selects anything if
                  variable matches
                  pattern; see the section called “Explicit search targets”.
                ?broken~b
                  Select packages that have a broken dependency.
                ?broken-depType~BdepType
                  Select package that have a broken dependency of the
                  given depType.
                ?broken-depType(pattern)~DB[depType:]pattern
                  Select packages that have a broken dependency of the
                  given depType matching
                  pattern.
                ?broken-reverse-depType(pattern)~RBdepType:pattern
                  Select packages that a package matching
                  pattern declares a broken
                  dependency of type depType.
                
                  ?conflicts(pattern)
                ~Cpattern
                  Select packages that conflict with a package
                  matching pattern.
                ?config-files~c
                  Select packages that were removed but not purged.
                ?depType(pattern)~D[depType:]pattern
                  Match packages that declare a dependency of type
                  depType on a package
                  matching pattern.
                ?description(description)~ddescription
                  Select packages whose description matches
                  description.
                ?essential~E
                  Select essential packages, those with
                  Essential: yes in their control
                  files.
                ?false~F
                  Select no packages.
                ?for variable: pattern 
                  Select packages that match
                  pattern with
                  variable bound to the
                  package being matched; see the section called “Explicit 
search targets”.
                ?garbage~g
                  Select packages that are not required by any manually
                  installed package.
                ?installed~iSelect installed 
packages.?maintainer(maintainer)~mmaintainer
                  Select packages maintained by
                  maintainer.
                ?narrow(filter, pattern)~S filter pattern
                  Select packages for which a single version matches
                  both filter and
                  pattern.
                ?name(name)~nname, name
                  Select packages with the given name.
                ?new~N
                  Select new packages.
                ?obsolete~o
                  Match installed packages that cannot be downloaded.
                ?or(term1, term2)term1 | term2
                  Select packages that match
                  term1,
                  term2, or both.
                ?origin(origin)~Oorigin
                  Select packages with the given
                  origin.
                ?provides(pattern)~Ppattern
                  Select packages that provide a package matching
                  pattern.
                ?priority(priority)~ppriority
                  Select packages with the given priority.
                ?reverse-depType(pattern)~R[depType:]pattern
                  Select packages that are the targets of a dependency
                  of type depType declared
                  by a package matching
                  pattern.
                ?reverse-broken-depType(pattern)~RBdepType:pattern
                  Select packages that are the targets of a broken
                  dependency of type
                  depType declared by a
                  package matching pattern.
                ?section(section)~ssection
                  Select packages in the given section.
                ?source-package(name) 
                  Select packages whose source package name matches
                  the regular expression
                  name.
                ?source-version(version) 
                  Select packages whose source version matches the
                  regular expression version.
                ?tag(tag)~Gtag
                  Select packages that have the given debtags
                  tag.
                ?true~T
                  Select all packages.
                ?task(task)~ttask
                  Select packages that are in the given
                  task.
                ?upgradable~U
                  Select packages that are installed and can be
                  upgraded.
                ?user-tag 
                  Select packages that are marked with a user-tag
                  matching the regular expression
                  user-tag.
                ?version(version)~Vversion
                  Select packages whose version matches
                  version (special values:
                  CURRENT,
                  CANDIDATE, and
                  TARGET).
                ?virtual~v
                  Select virtual packages.
                ?widen(pattern)~Wpattern
                  Select versions for which
                  pattern matches any version
                  of the corresponding package, discarding local
                  version restrictions.
                


-M

> 
> -- 
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/m2y6d4219cc1004051447t3e9f8772i5616454b9b95d...@mail.gmail.com
> 
                                          
_________________________________________________________________
Got a phone? Get Hotmail & Messenger for mobile!
http://go.microsoft.com/?linkid=9724464

Reply via email to