Re: aptitude package filtering

2010-03-15 Thread Wolodja Wentland
On Sun, Mar 14, 2010 at 17:23 -0400, Yavuz Yetim wrote:
 I would like to list all packages installed from testing. How can I do
 that? 

The following works pretty well:

dpkg -l | awk '/^.i/ {print $2}' | xargs apt-cache policy
| awk '/^[a-z0-9.\-]+:/ {pkg=$1}; /\*\*\*/ {OFS=\t; ver=$2;
getline; print pkg,ver,$2,$3}'

That is all in one line and produces the following output:

acl: 2.2.49-2http://ftp.de.debian.orgsqueeze/main
acpi:   1.4-2   http://ftp.de.debian.orgsqueeze/main
acpi-support:   0.132-2 http://ftp.de.debian.orgsqueeze/main
acpi-support-base:  0.132-2 http://ftp.de.debian.orgsqueeze/main
acpid:  1:2.0.2-1   http://ftp.de.debian.orgsqueeze/main
adduser:3.112   http://ftp.de.debian.orgsqueeze/main
alacarte:   0.12.4-2http://ftp.de.debian.orgsqueeze/main
alsa-base:  1.0.21+dfsg-2   http://ftp.de.debian.orgsqueeze/main
alsa-utils: 1.0.22-1http://ftp.de.debian.orgsqueeze/main
anacron:2.3-14  http://ftp.de.debian.orgsqueeze/main 

You can then use grep to search for whatever you want to search for. 
Alternatively you can take a look at apt-listrepository [1], but I
haven't used that and can't comment on its capabilities.

[1] http://svn.noreply.org/svn/weaselutils/trunk/apt-listrepository
-- 
  .''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de 
 : :'  :
 `. `'` 4096R/CAF14EFC 
   `-   081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


signature.asc
Description: Digital signature


Re: aptitude package filtering

2010-03-14 Thread Ron Johnson

On 2010-03-14 16:23, Yavuz Yetim wrote:

Hi,

I would like to list all packages installed from testing. How can I do
that? First limiting to ~installed and then searching ~archive(testing)
gives me packages that are installed and available in testing and that's
not what I want. For example, I have evolution 2.22 from stable. So,
~installed matches evolution 2.22, so package evolution is in the list
and ~archive(testing) matches evolution because evolution 2.28 is in
testing. However, I don't want to see evolution in the list because I
want only the packages that are installed from testing (not the ones
that are installed and available in testing). If it is not installed
from testing, I don't want to see it. How can I do that? I hope the
explanation was clear.



I'd do something like:
  $ apt-show-versions | grep testing | egrep uptodate|upgradeable

I'm an apt-get guy, though, and it might not match the aptitude 
database.


--
Ron Johnson, Jr.
Jefferson LA  USA

If God had wanted man to play soccer, he wouldn't have given
us arms.  Mike Ditka


--
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/4b9d581c.6050...@cox.net



Re: aptitude package filtering

2010-03-14 Thread Johan Grönqvist

Yavuz Yetim skrev:

I would like to list all packages installed from testing. How can I do
that? First limiting to ~installed and then searching ~archive(testing)
gives me packages that are installed and available in testing and that's
not what I want. 



I was going to suggest the command

aptitude search ?narrow(?archive(testing), ?installed)

but then I realized that in some cases it does not work as I expected, 
so I will just suggest looking at narrow in the documentation [0], and 
then deciding for yourself if it does what you want.


[0]: 
http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s03s05.html



/ johan


--
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/hnjljd$oq...@dough.gmane.org



Re: aptitude package filtering

2010-03-14 Thread Florian Kulzer
On Sun, Mar 14, 2010 at 17:23:11 -0400, Yavuz Yetim wrote:
 Hi,
 
 I would like to list all packages installed from testing. How can I do
 that? First limiting to ~installed and then searching ~archive(testing)
 gives me packages that are installed and available in testing and that's
 not what I want. For example, I have evolution 2.22 from stable. So,
 ~installed matches evolution 2.22, so package evolution is in the list
 and ~archive(testing) matches evolution because evolution 2.28 is in
 testing. However, I don't want to see evolution in the list because I
 want only the packages that are installed from testing (not the ones
 that are installed and available in testing). If it is not installed
 from testing, I don't want to see it. How can I do that? I hope the
 explanation was clear.

If I understand you correctly then I think the narrowing search
pattern/operator is what you want:

aptitude search '~S ~i ~Atesting'

file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#searchNarrow

-- 
Regards,|
  Florian   |


-- 
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/20100314213520.ga6...@isar.localhost



Re: aptitude package filtering

2010-03-14 Thread Freeman
On Sun, Mar 14, 2010 at 05:23:11PM -0400, Yavuz Yetim wrote:
 Hi,
 
 I would like to list all packages installed from testing. How can I do
 that? First limiting to ~installed and then searching ~archive(testing)
 gives me packages that are installed and available in testing and that's
 not what I want. For example, I have evolution 2.22 from stable. So,
 ~installed matches evolution 2.22, so package evolution is in the list
 and ~archive(testing) matches evolution because evolution 2.28 is in
 testing. However, I don't want to see evolution in the list because I
 want only the packages that are installed from testing (not the ones
 that are installed and available in testing). If it is not installed
 from testing, I don't want to see it. How can I do that? I hope the
 explanation was clear.
 

I think you'd be better off with something like

 $ apt-show-versions | gerp testing  

-- 
Kind Regards,
Freeman

http://bugs.debian.org/release-critical/


-- 
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/20100314215425.ga19...@europa.office



Re: aptitude package filtering

2010-03-14 Thread Johan Grönqvist

Florian Kulzer skrev:

On Sun, Mar 14, 2010 at 17:23:11 -0400, Yavuz Yetim wrote:



If I understand you correctly then I think the narrowing search
pattern/operator is what you want:

aptitude search '~S ~i ~Atesting'



I thought so too, but when I tested, aptitude lists acpi as installed 
from stable, although it is not the version form stable. Have I missed 
something?



johan-laptop:/home/johan# aptitude search '~S ~i ~Astable' | grep acpi
i   acpi- displays information on ACPI 
devices
i A acpid   - Advanced Configuration and Power 
Interface

johan-laptop:/home/johan# apt-cache policy acpi
acpi:
  Installerad: 1.4-2
  Kandidat: 1.4-2
  Versionstabell:
 *** 1.4-2 0
850 http://ftp.se.debian.org squeeze/main Packages
650 http://ftp.se.debian.org sid/main Packages
100 /var/lib/dpkg/status
 1.1-2 0
750 http://ftp.se.debian.org lenny/main Packages
johan-laptop:/home/johan#



/ johan


--
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/hnjms7$s1...@dough.gmane.org



Re: aptitude package filtering

2010-03-14 Thread John Hasler
Ron Johnson writes:
 I'm an apt-get guy, though, and it might not match the aptitude
 database.

Both apt-get and aptitude are front-ends for apt.  There is no seperate
aptitude database.
-- 
John Hasler


-- 
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/87vdcyv9nj@thumper.dhh.gt.org



Re: aptitude package filtering

2010-03-14 Thread Ron Johnson

On 2010-03-14 17:08, John Hasler wrote:

Ron Johnson writes:

I'm an apt-get guy, though, and it might not match the aptitude
database.


Both apt-get and aptitude are front-ends for apt.  There is no seperate
aptitude database.


There was a time when you were recommended *not* to use them 
interchangeably.  Why?


--
Ron Johnson, Jr.
Jefferson LA  USA

If God had wanted man to play soccer, he wouldn't have given
us arms.  Mike Ditka


--
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/4b9d67f3.2040...@cox.net



Re: aptitude package filtering

2010-03-14 Thread Freeman
On Sun, Mar 14, 2010 at 05:08:32PM -0500, John Hasler wrote:
 Ron Johnson writes:
  I'm an apt-get guy, though, and it might not match the aptitude
  database.
 
 Both apt-get and aptitude are front-ends for apt.  There is no seperate
 aptitude database.
 -- 

So /var/lib/aptitude/pkgstates is aptitudes sole differentiating resource?

-- 
Kind Regards,
Freeman

http://bugs.debian.org/release-critical/


-- 
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/20100314231258.gd19...@europa.office



Re: aptitude package filtering

2010-03-14 Thread Andrew Reid
On Sunday 14 March 2010 17:54:25 Freeman wrote:
 On Sun, Mar 14, 2010 at 05:23:11PM -0400, Yavuz Yetim wrote:
  Hi,
 
  I would like to list all packages installed from testing. How can I do
  that? First limiting to ~installed and then searching ~archive(testing)
  gives me packages that are...

 I think you'd be better off with something like

  $ apt-show-versions | gerp testing

  I love this list -- I've been mucking about with Debian for
years, and had never run across apt-show-versions.

  I even discovered that there's an update for my lenny-backports
version of OpenOffice.

  On my system, packages show up with the distro name, not the 
distro status (i.e. squeeze and lenny, not testing or stable),
but aside from that it works as described.

-- A.
-- 
Andrew Reid / rei...@bellatlantic.net


-- 
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/201003141819.37071.rei...@bellatlantic.net



Re: aptitude package filtering

2010-03-14 Thread Yavuz Yetim
I tested both of apt-show-versions and aptitude limit approach. There
are differences. apt-show-versions shows which packages are installed
from what archive. The list aptitude shows is, the packages which are
installed and they exists in the given archive. apt-show-versions is
more like what I wanted. 

for example if package X is installed from stable and the same version
is available in testing, apt-show-versions doesn't show it but aptitude
shows. 

Thanks,
Yavuz

On Sun, 2010-03-14 at 22:35 +0100, Florian Kulzer wrote:
 On Sun, Mar 14, 2010 at 17:23:11 -0400, Yavuz Yetim wrote:
  Hi,
  
  I would like to list all packages installed from testing. How can I do
  that? First limiting to ~installed and then searching ~archive(testing)
  gives me packages that are installed and available in testing and that's
  not what I want. For example, I have evolution 2.22 from stable. So,
  ~installed matches evolution 2.22, so package evolution is in the list
  and ~archive(testing) matches evolution because evolution 2.28 is in
  testing. However, I don't want to see evolution in the list because I
  want only the packages that are installed from testing (not the ones
  that are installed and available in testing). If it is not installed
  from testing, I don't want to see it. How can I do that? I hope the
  explanation was clear.
 
 If I understand you correctly then I think the narrowing search
 pattern/operator is what you want:
 
 aptitude search '~S ~i ~Atesting'
 
 file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#searchNarrow
 
 -- 
 Regards,|
   Florian   |
 
 


-- 
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/1268614083.3446.14.ca...@dynamic-oit-pu-dormnet-bb-c-102.princeton.edu.princeton.edu



Re: aptitude package filtering

2010-03-14 Thread Freeman
On Sun, Mar 14, 2010 at 06:19:36PM -0400, Andrew Reid wrote:
 On Sunday 14 March 2010 17:54:25 Freeman wrote:
  On Sun, Mar 14, 2010 at 05:23:11PM -0400, Yavuz Yetim wrote:
   Hi,
  
   I would like to list all packages installed from testing. How can I do
   that? First limiting to ~installed and then searching ~archive(testing)
   gives me packages that are...
 
  I think you'd be better off with something like
 
   $ apt-show-versions | gerp testing
 
   I love this list -- I've been mucking about with Debian for
 years, and had never run across apt-show-versions.
 
   I even discovered that there's an update for my lenny-backports
 version of OpenOffice.
 
   On my system, packages show up with the distro name, not the 
 distro status (i.e. squeeze and lenny, not testing or stable),
 but aside from that it works as described.
 
   -- A.

[OMG look at my ugly typo and that on top of turning up really late.]

Interesting. I doubt it has to do with the designation in sources.list.
Could be wrong. Squeeze shows up in lines of my testing results but only by
happenstance.

free...@europa:~$ apt-show-versions | grep squeeze
linux-headers-2.6.30-2-686/testing uptodate 2.6.30-8squeeze1
linux-headers-2.6.30-2-common/testing uptodate 2.6.30-8squeeze1
linux-image-2.6.30-2-686/testing uptodate 2.6.30-8squeeze1
free...@europa:~$

-- 
Kind Regards,
Freeman

http://bugs.debian.org/release-critical/


-- 
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/20100315033413.ga15...@europa.office