Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-29 Thread Tom H
On Sun, Jun 27, 2010 at 4:23 PM, giovanni_re john...@fastmail.us wrote:
 Thanks Aaron  Tom -
 That's progress, but not there yet. ;)
 Further suggestion? Thanks :)

You're welcome.

I assumed that you only wanted installed packages because I thought
that dpkg -l was meant for installed packages...

For all packages, run
aptitude -F %a%c %p %v %d search parted
(I have inverted the action and current states of my first post to use
dpkg -l's order)

Or, just with dpkg
dpkg -l *parted*

Or with apt-cache (using Aaron's post)
dpkg -l $(apt-cache search parted | awk '{print $2}' | tr '\n' ' ')

So you could also run, to get the same output as with dpkg -l
dpkg -l $(aptitude search -F %p parted | tr '\n' ' ')

I am not sure that tr ... is needed but I don't have a Debian box at
hand to check.


-- 
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/aanlktilsyk-x6h_nlawu4m2abnbu0ii2jdf3f5ytf...@mail.gmail.com



Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-27 Thread Tom H
On Sat, Jun 26, 2010 at 7:57 PM, giovanni_re john...@fastmail.us wrote:
 Is there a way to mashup apt-cache search SearchTerm  dpkg -l
 - so that given a SearchTerm,
 it would find all the related package names in the cache,
 then do a dpkg -l on those package names?

No need for dpkg.

aptitude -F %c%a %p %v %d search '?narrow(?installed,searchterm)'


-- 
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/aanlktikqfx5zwcqjgrucbrodkwc45coj-tk8278ru...@mail.gmail.com



Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-27 Thread giovanni_re
Thanks Aaron  Tom - 
That's progress, but not there yet. ;)  
Further suggestion? Thanks :)

On Sun, 27 Jun 2010 04:39:41 -0400, Tom H tomh0...@gmail.com said:
 On Sat, Jun 26, 2010 at 7:57 PM, giovanni_re john...@fastmail.us wrote:
  Is there a way to mashup apt-cache search SearchTerm  dpkg -l
  - so that given a SearchTerm,
  it would find all the related package names in the cache,
  then do a dpkg -l on those package names?
 
 No need for dpkg.
 
 aptitude -F %c%a %p %v %d search '?narrow(?installed,searchterm)'

One key point is that the output should include every package returned
by 
apt-cache search SearchTerm
 show whether or not they are installed.


=  Example showing the concept, using package parted:

1)  First, here are all the packages apt-cache returns:

# apt-cache search parted | sort
drobo-utils - manage data robotics storage units (drobos)
fatresize - FAT16/FAT32 filesystem resizer
gnu-fdisk - Linux fdisk replacement based on libparted
gparted - GNOME partition editor
kvpm - LVM frontend for KDE
libparted0debian1-dbg - The GNU Parted disk partitioning library debug
development files
libparted0debian1 - The GNU Parted disk partitioning shared library
libparted0-dev - The GNU Parted disk partitioning library development
files
libparted0-i18n - The GNU Parted disk partitioning library i18n support
libparted0 - The GNU Parted disk partitioning shared library (old name)
parted-doc - The GNU Parted disk partition resizing program
documentation
parted - The GNU Parted disk partition resizing program
partitionmanager - A partition management utility
python-parted-dbg - Python interface for libparted - Debugging symbols
python-parted - Python interface for libparted



2)  But dpkg -l  only shows some of them:

dpkg -l | grep parted
ii  gparted  0.5.1-1ubuntu2 
GNOME partition editor
ii  libparted0   2.2-5ubuntu5   
The GNU Parted disk partitioning shared libr
ii  libparted0debian12.2-5ubuntu5   
The GNU Parted disk partitioning shared libr
ii  parted   2.2-5ubuntu5   
The GNU Parted disk partition resizing progr


{  For reference, here are 2 more dpkg -l searches:

dpkg -l parted
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  
 Description
+++-==-==-
ii  parted 2.2-5ubuntu5 
 The GNU Parted disk partition resizing program

dpkg -l '*parted*'
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  
 Description
+++-==-==-
ii  gparted0.5.1-1ubuntu2   
 GNOME partition editor
un  libparted  none   
 (no description available)
ii  libparted0 2.2-5ubuntu5 
 The GNU Parted disk partitioning shared library (old name)
un  libparted0-dev none   
 (no description available)
un  libparted0-i18nnone   
 (no description available)
ii  libparted0debian1  2.2-5ubuntu5 
 The GNU Parted disk partitioning shared library
un  libparted1 none   
 (no description available)
un  libparted1.4   none   
 (no description available)
un  libparted2 none   
 (no description available)
un  npartednone   
 (no description available)
ii  parted 2.2-5ubuntu5 
 The GNU Parted disk partition resizing program
un  parted-doc none   
 (no description available)
un  parted1.6  none   
 (no description available)

}


3a)  I'd like to get an output list including all the packages from step
1 above,
3b)  Showing the package name,  its installed status (ii, un, etc) like
from step 2.

Note:  One way might be to:
1) Do the apt-cache search packagename
2) For each line
2a) Pull out the 

Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-27 Thread giovanni_re
Thanks Aaron  Tom - 
That's progress, but not there yet. ;)  
Further suggestion? Thanks :)

On Sat, 26 Jun 2010 19:00:20 -0600, Aaron Toponce aaron.topo...@gmail.com 
said:
 On 6/26/2010 6:58 PM, Aaron Toponce wrote:
  On 6/26/2010 6:55 PM, Aaron Toponce wrote:
  On 6/26/2010 5:57 PM, giovanni_re wrote:
  Is there a way to mashup apt-cache search SearchTerm  dpkg -l 
  - so that given a SearchTerm, 
  it would find all the related package names in the cache, 
  then do a dpkg -l on those package names?
 
  dpkg -l $(apt-search iceweasel|grep ^i|awk '{print $2}'|tr '\n' ' ')
  
  Actually, looking at that command, I'm sure I could combine the grep,
  awk and tr in a single awk command. This was just quick and dirty. Of
  course, replace 'iceweasel' with the package(s) you are searching for.
 
 And, I just noticed I used one of my apt aliases.
 
 alias apt-search=aptitude search


: The good result here is that this shows the dpkg -l, which can show 
uninstalled or failed match packages.
: But it doesn't yet get all the packages.


One key point is that the output should include every package returned by 
apt-cache search SearchTerm
 show whether or not they are installed.


=  Example showing the concept, using package parted:

1)  First, here are all the packages apt-cache returns:

# apt-cache search parted | sort
drobo-utils - manage data robotics storage units (drobos)
fatresize - FAT16/FAT32 filesystem resizer
gnu-fdisk - Linux fdisk replacement based on libparted
gparted - GNOME partition editor
kvpm - LVM frontend for KDE
libparted0debian1-dbg - The GNU Parted disk partitioning library debug 
development files
libparted0debian1 - The GNU Parted disk partitioning shared library
libparted0-dev - The GNU Parted disk partitioning library development files
libparted0-i18n - The GNU Parted disk partitioning library i18n support
libparted0 - The GNU Parted disk partitioning shared library (old name)
parted-doc - The GNU Parted disk partition resizing program documentation
parted - The GNU Parted disk partition resizing program
partitionmanager - A partition management utility
python-parted-dbg - Python interface for libparted - Debugging symbols
python-parted - Python interface for libparted



2)  But dpkg -l  only shows some of them:

dpkg -l | grep parted
ii  gparted  0.5.1-1ubuntu2 
 GNOME partition editor
ii  libparted0   2.2-5ubuntu5   
 The GNU Parted disk partitioning shared libr
ii  libparted0debian12.2-5ubuntu5   
 The GNU Parted disk partitioning shared libr
ii  parted   2.2-5ubuntu5   
 The GNU Parted disk partition resizing progr


{  For reference, here are 2 more dpkg -l searches:

dpkg -l parted
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version
Description
+++-==-==-
ii  parted 2.2-5ubuntu5   The 
GNU Parted disk partition resizing program

dpkg -l '*parted*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version
Description
+++-==-==-
ii  gparted0.5.1-1ubuntu2 GNOME 
partition editor
un  libparted  none (no 
description available)
ii  libparted0 2.2-5ubuntu5   The 
GNU Parted disk partitioning shared library (old name)
un  libparted0-dev none (no 
description available)
un  libparted0-i18nnone (no 
description available)
ii  libparted0debian1  2.2-5ubuntu5   The 
GNU Parted disk partitioning shared library
un  libparted1 none (no 
description available)
un  libparted1.4   none (no 
description available)
un  libparted2 none (no 
description available)
un  npartednone (no 
description available)
ii  parted 2.2-5ubuntu5

Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-27 Thread giovanni_re
On Sun, 27 Jun 2010 13:27:14 -0700, giovanni_re john...@fastmail.us said:
 Note:  One way might be to:
 1) Do the apt-cache search packagename
 2) For each line
 2a) Pull out the package name
 2b) Write an apt-cache search for that name only to a temp file

Er, that should have been a dpkg -l command, like this:
 2b) Write a dpkg -l command for that name only to a temp file


 3) Do the dpkg -l 's from the file
 3b)  remove from the output all the dpkg heading info, leaving only the
 package status lines.
 
 Can you get that mashup?  Thanks :)


-- 
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/1277671393.20079.1382141...@webmail.messagingengine.com



Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-27 Thread Mickey Fox
2010/6/27 giovanni_re john...@fastmail.us:
 Is there a way to mashup apt-cache search SearchTerm  dpkg -l
 - so that given a SearchTerm,
 it would find all the related package names in the cache,
 then do a dpkg -l on those package names?


 --
 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/1277596671.10273.1382055...@webmail.messagingengine.com



aptitude install SearchTerm?
or
aptitude install SearchTerm~


-- 
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/aanlktimtegs3potxbztfzkvynzbjmblhqs1omak5_...@mail.gmail.com



Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-26 Thread Aaron Toponce
On 6/26/2010 5:57 PM, giovanni_re wrote:
 Is there a way to mashup apt-cache search SearchTerm  dpkg -l 
 - so that given a SearchTerm, 
 it would find all the related package names in the cache, 
 then do a dpkg -l on those package names?

dpkg -l $(apt-search iceweasel|grep ^i|awk '{print $2}'|tr '\n' ' ')

-- 
. O .   O . O   . . O   O . .   . O .
. . O   . O O   O . O   . O O   . . O
O O O   . O .   . O O   O O .   O O O



signature.asc
Description: OpenPGP digital signature


Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-26 Thread Aaron Toponce
On 6/26/2010 6:55 PM, Aaron Toponce wrote:
 On 6/26/2010 5:57 PM, giovanni_re wrote:
 Is there a way to mashup apt-cache search SearchTerm  dpkg -l 
 - so that given a SearchTerm, 
 it would find all the related package names in the cache, 
 then do a dpkg -l on those package names?
 
 dpkg -l $(apt-search iceweasel|grep ^i|awk '{print $2}'|tr '\n' ' ')

Actually, looking at that command, I'm sure I could combine the grep,
awk and tr in a single awk command. This was just quick and dirty. Of
course, replace 'iceweasel' with the package(s) you are searching for.

-- 
. O .   O . O   . . O   O . .   . O .
. . O   . O O   O . O   . O O   . . O
O O O   . O .   . O O   O O .   O O O



signature.asc
Description: OpenPGP digital signature


Re: mashup apt-cache search SearchTerm dpkg -l - HowTo? ; jor

2010-06-26 Thread Aaron Toponce
On 6/26/2010 6:58 PM, Aaron Toponce wrote:
 On 6/26/2010 6:55 PM, Aaron Toponce wrote:
 On 6/26/2010 5:57 PM, giovanni_re wrote:
 Is there a way to mashup apt-cache search SearchTerm  dpkg -l 
 - so that given a SearchTerm, 
 it would find all the related package names in the cache, 
 then do a dpkg -l on those package names?

 dpkg -l $(apt-search iceweasel|grep ^i|awk '{print $2}'|tr '\n' ' ')
 
 Actually, looking at that command, I'm sure I could combine the grep,
 awk and tr in a single awk command. This was just quick and dirty. Of
 course, replace 'iceweasel' with the package(s) you are searching for.

And, I just noticed I used one of my apt aliases.

alias apt-search=aptitude search

Cheers!

-- 
. O .   O . O   . . O   O . .   . O .
. . O   . O O   O . O   . O O   . . O
O O O   . O .   . O O   O O .   O O O



signature.asc
Description: OpenPGP digital signature