Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #173781 > unrolled thread

list installed packages present only in stable

Started bykamaraju kusumanchi <raju.mailinglists@gmail.com>
First post2016-10-24 02:50 +0200
Last post2016-11-03 23:50 +0100
Articles 20 on this page of 32 — 11 participants

Back to article view | Back to linux.debian.user


Contents

  list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-10-24 02:50 +0200
    Re: list installed packages present only in stable Cindy-Sue Causey <butterflybytes@gmail.com> - 2016-10-25 17:30 +0200
      Re: list installed packages present only in stable Michael Lange <klappnase@freenet.de> - 2016-10-25 20:00 +0200
        Re: list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-10-26 05:40 +0200
          Re: list installed packages present only in stable Michael Lange <klappnase@freenet.de> - 2016-10-26 11:20 +0200
            Re: list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-10-26 14:20 +0200
              Re: list installed packages present only in stable Frank <zuiderduin@gmx.com> - 2016-10-26 18:00 +0200
              Re: list installed packages present only in stable Michael Lange <klappnase@freenet.de> - 2016-10-26 18:40 +0200
    Re: list installed packages present only in stable Rick Thomas <rbthomas@pobox.com> - 2016-10-29 18:40 +0200
    Re: list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-11-01 07:20 +0100
    Re: list installed packages present only in stable Jonathan Dowland <jmtd@debian.org> - 2016-11-02 11:20 +0100
      Re: list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-11-03 03:20 +0100
        Re: list installed packages present only in stable Jonathan Dowland <jmtd@debian.org> - 2016-11-03 14:10 +0100
          Re: list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-11-04 02:10 +0100
            Re: list installed packages present only in stable Jörg-Volker Peetz <jvpeetz@web.de> - 2016-11-04 14:50 +0100
              Re: list installed packages present only in stable Jörg-Volker Peetz <jvpeetz@web.de> - 2016-11-04 17:20 +0100
                Re: list installed packages present only in stable Jörg-Volker Peetz <jvpeetz@web.de> - 2016-11-04 19:00 +0100
    Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-02 11:50 +0100
      Re: list installed packages present only in stable kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2016-11-03 03:30 +0100
        Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-03 08:40 +0100
          Re: list installed packages present only in stable Mark Fletcher <mark27q1@gmail.com> - 2016-11-03 10:50 +0100
            Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-03 11:00 +0100
              Re: list installed packages present only in stable <tomas@tuxteam.de> - 2016-11-03 12:50 +0100
                Re: list installed packages present only in stable <tomas@tuxteam.de> - 2016-11-03 14:00 +0100
                  Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-03 14:30 +0100
                    Re: list installed packages present only in stable <tomas@tuxteam.de> - 2016-11-03 14:50 +0100
                      Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-03 15:10 +0100
                      Re: list installed packages present only in stable David Wright <deblis@lionunicorn.co.uk> - 2016-11-03 15:20 +0100
                      Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-03 15:50 +0100
                        Re: list installed packages present only in stable <tomas@tuxteam.de> - 2016-11-03 16:40 +0100
                Re: list installed packages present only in stable steve <dlist@bluewin.ch> - 2016-11-03 14:00 +0100
              Re: list installed packages present only in stable Mark Fletcher <mark27q1@gmail.com> - 2016-11-03 23:50 +0100

Page 1 of 2  [1] 2  Next page →


#173781 — list installed packages present only in stable

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-10-24 02:50 +0200
Subjectlist installed packages present only in stable
Message-ID<svBCG-bd-9@gated-at.bofh.it>
How can I list all the packages installed on my system that are
currently part of the stable distribution but not present in either
testing or sid?

For example, ibkasten2okteta1controllers1abi1 libkasten2okteta1gui1
are currently part of stable, but not present in either testing or
sid. The command should list these packages if they are currently
installed.

If it matters, here are the repos I am tracking.
 % inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://httpredir.debian.org/debian/ stretch main contrib non-free
           deb-src http://httpredir.debian.org/debian/ stretch main
contrib non-free
           deb http://httpredir.debian.org/debian/ stretch-updates
main contrib non-free
           deb-src http://httpredir.debian.org/debian/ stretch-updates
main contrib non-free
           deb http://security.debian.org/ stretch/updates main contrib non-free
           deb-src http://security.debian.org/ stretch/updates main
contrib non-free

I prefer to use apt-get to aptitude. But if this can only be done in
aptitude, I do not mind using that.

thanks
raju

-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [next] | [standalone]


#173838

FromCindy-Sue Causey <butterflybytes@gmail.com>
Date2016-10-25 17:30 +0200
Message-ID<swbPQ-7oR-23@gated-at.bofh.it>
In reply to#173781
On 10/23/16, kamaraju kusumanchi <raju.mailinglists@gmail.com> wrote:
> How can I list all the packages installed on my system that are
> currently part of the stable distribution but not present in either
> testing or sid?
>
> For example, ibkasten2okteta1controllers1abi1 libkasten2okteta1gui1
> are currently part of stable, but not present in either testing or
> sid. The command should list these packages if they are currently
> installed.
>
> If it matters, here are the repos I am tracking.
>  % inxi -r
> Repos:     Active apt sources in file: /etc/apt/sources.list
>            deb http://httpredir.debian.org/debian/ stretch main contrib
> non-free
>            deb-src http://httpredir.debian.org/debian/ stretch main
> contrib non-free
>            deb http://httpredir.debian.org/debian/ stretch-updates
> main contrib non-free
>            deb-src http://httpredir.debian.org/debian/ stretch-updates
> main contrib non-free
>            deb http://security.debian.org/ stretch/updates main contrib
> non-free
>            deb-src http://security.debian.org/ stretch/updates main
> contrib non-free
>
> I prefer to use apt-get to aptitude. But if this can only be done in
> aptitude, I do not mind using that.


Oooohhh, shiny new toy that I just found because of you. This came via
"man apt-show-versions":

To upgrade all packages in testing:

           apt-get install `apt-show-versions -u -b | grep testing`

Actually having some cognitive abilities functioning today, I further
stepped out on a limb and just ran:

apt-cache show `apt-show-versions -u -b | grep sid`

It gave me some things back! One more test:

apt-cache show `apt-show-versions -u -b | grep jessie`

Returned this error:

E: No packages found

Woohoo!!! (Because it's giving varying answers based on query changes)

Yes, no, I understand that still might not quite be the answer sought
after in this thread, BUT it *is* pulling based on [release versions].
That means at least some of the developer work is already addressed if
this in fact doesn't quite provide the desired results BUT would work
with some flag tweaking.

Cindy :)

-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape (too) *

[toc] | [prev] | [next] | [standalone]


#173850

FromMichael Lange <klappnase@freenet.de>
Date2016-10-25 20:00 +0200
Message-ID<sweb0-mN-7@gated-at.bofh.it>
In reply to#173838
On Tue, 25 Oct 2016 11:24:00 -0400
Cindy-Sue Causey <butterflybytes@gmail.com> wrote:

> Oooohhh, shiny new toy that I just found because of you. This came via
> "man apt-show-versions":
> 
> To upgrade all packages in testing:
> 
>            apt-get install `apt-show-versions -u -b | grep testing`
> 
> Actually having some cognitive abilities functioning today, I further
> stepped out on a limb and just ran:
> 
> apt-cache show `apt-show-versions -u -b | grep sid`
> 
> It gave me some things back! One more test:
> 
> apt-cache show `apt-show-versions -u -b | grep jessie`
> 
> Returned this error:
> 
> E: No packages found
> 
> Woohoo!!! (Because it's giving varying answers based on query changes)
> 
> Yes, no, I understand that still might not quite be the answer sought
> after in this thread, BUT it *is* pulling based on [release versions].
> That means at least some of the developer work is already addressed if
> this in fact doesn't quite provide the desired results BUT would work
> with some flag tweaking.

Nice. After these suggestions I hastily put together a small python
script, that might come close to what Raju wants:

#!/usr/bin/python

from commands import getoutput

allpkgs = getoutput('apt-show-versions -b').splitlines()

jessie = [p for p in allpkgs if 'jessie' in p]
stretch = [p for p in allpkgs if 'stretch' in p]
sid = [p for p in allpkgs if 'sid' in p]

onlyjessie = [p for p in jessie if not p in (stretch+sid)]
for p in onlyjessie:
    print(p.split(':')[0])

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

We'll pivot at warp 2 and bring all tubes to bear, Mr. Sulu!

[toc] | [prev] | [next] | [standalone]


#173855

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-10-26 05:40 +0200
Message-ID<swnei-6rW-19@gated-at.bofh.it>
In reply to#173850
On Tue, Oct 25, 2016 at 1:49 PM, Michael Lange <klappnase@freenet.de> wrote:
>
> Nice. After these suggestions I hastily put together a small python
> script, that might come close to what Raju wants:
>
> #!/usr/bin/python
>
> from commands import getoutput
>
> allpkgs = getoutput('apt-show-versions -b').splitlines()
>
> jessie = [p for p in allpkgs if 'jessie' in p]
> stretch = [p for p in allpkgs if 'stretch' in p]
> sid = [p for p in allpkgs if 'sid' in p]
>
> onlyjessie = [p for p in jessie if not p in (stretch+sid)]
> for p in onlyjessie:
>     print(p.split(':')[0])
>

Thanks for the script. But I do not think it does what I want. For
example, currently there is a python3.4 package installed on my
system.

 % dpkg -l python3.4 | cut -c 1-72
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Tri
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-===========================
ii  python3.4      3.4.2-1      amd64        Interactive high-level obje


The output of apt-show-versions does not contain the word jessie. So
it will not get picked up in the "jessie" variable of your script.

 % apt-show-versions -b | grep "\<python3.4\>"
python3.4:amd64 3.4.2-1 installed: No available version in archive
python3.4-minimal:amd64 3.4.2-1 installed: No available version in archive

I think what I need is something that looks against the repository
itself. For example

 % rmadison python3.4
debian:
 python3.4 | 3.4.2-1 | jessie-kfreebsd | source, kfreebsd-amd64, kfreebsd-i386
 python3.4 | 3.4.2-1 | jessie          | source, amd64, arm64, armel,
armhf, i386, mips, mipsel, powerpc, ppc64el, s390x
new:

which shows that this package is available only in Jessie but no
corresponding version in Stretch or Sid.

But rmadison itself is slow. So I need something that caches this
information on the local computer for all the packages.

raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [prev] | [next] | [standalone]


#173857

FromMichael Lange <klappnase@freenet.de>
Date2016-10-26 11:20 +0200
Message-ID<swsxk-1EJ-9@gated-at.bofh.it>
In reply to#173855
On Tue, 25 Oct 2016 23:36:02 -0400
kamaraju kusumanchi <raju.mailinglists@gmail.com> wrote:


> Thanks for the script. But I do not think it does what I want. For
> example, currently there is a python3.4 package installed on my
> system.
> 
>  % dpkg -l python3.4 | cut -c 1-72
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Tri
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name           Version      Architecture Description
> +++-==============-============-============-===========================
> ii  python3.4      3.4.2-1      amd64        Interactive high-level obje
> 
> 
> The output of apt-show-versions does not contain the word jessie. So
> it will not get picked up in the "jessie" variable of your script.
> 
>  % apt-show-versions -b | grep "\<python3.4\>"
> python3.4:amd64 3.4.2-1 installed: No available version in archive
> python3.4-minimal:amd64 3.4.2-1 installed: No available version in
> archive
> 

Hmmm...
Here I get:
$ apt-show-versions -b | grep "\<python3.4\>"
python3.4:amd64/jessie
python3.4-minimal:amd64/jessie

What does apt-cache say about python3.4? Here I get
$ apt-cache policy python3.4
python3.4:
  Installiert:           3.4.2-1
  Installationskandidat: 3.4.2-1
  Versionstabelle:
 *** 3.4.2-1 0
        500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status

Not sure why this happens. Maybe the package cache needs to be updated
first with apt-cache gencaches ? Or isn't jessie in your sources.list?

Regards

Michael





> I think what I need is something that looks against the repository
> itself. For example
> 
>  % rmadison python3.4
> debian:
>  python3.4 | 3.4.2-1 | jessie-kfreebsd | source, kfreebsd-amd64,
> kfreebsd-i386 python3.4 | 3.4.2-1 | jessie          | source, amd64,
> arm64, armel, armhf, i386, mips, mipsel, powerpc, ppc64el, s390x
> new:
> 
> which shows that this package is available only in Jessie but no
> corresponding version in Stretch or Sid.
> 
> But rmadison itself is slow. So I need something that caches this
> information on the local computer for all the packages.
> 
> raju
> -- 
> Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog
> 
> 



.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

No more blah, blah, blah!
		-- Kirk, "Miri", stardate 2713.6

[toc] | [prev] | [next] | [standalone]


#173861

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-10-26 14:20 +0200
Message-ID<swvlv-3vY-1@gated-at.bofh.it>
In reply to#173857
On Wed, Oct 26, 2016 at 5:15 AM, Michael Lange <klappnase@freenet.de> wrote:
> On Tue, 25 Oct 2016 23:36:02 -0400
>
> Hmmm...
> Here I get:
> $ apt-show-versions -b | grep "\<python3.4\>"
> python3.4:amd64/jessie
> python3.4-minimal:amd64/jessie
>
> What does apt-cache say about python3.4? Here I get
> $ apt-cache policy python3.4
> python3.4:
>   Installiert:           3.4.2-1
>   Installationskandidat: 3.4.2-1
>   Versionstabelle:
>  *** 3.4.2-1 0
>         500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
>         100 /var/lib/dpkg/status
>
> Not sure why this happens. Maybe the package cache needs to be updated
> first with apt-cache gencaches ? Or isn't jessie in your sources.list?
>

Correct. The output of apt-show-versions will depend on what is listed
in /etc/apt/sources.list. I want the output to be independent of that.
>From the man page of apt-cache

       /etc/apt/sources.list
           Locations to fetch packages from. Configuration Item:
Dir::Etc::SourceList.
       /etc/apt/sources.list.d/
           File fragments for locations to fetch packages from.
Configuration Item: Dir::Etc::SourceParts.

A while ago I decided to move from Jessie to Stretch. So I have

 % inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://httpredir.debian.org/debian/ stretch main contrib non-free
           deb-src http://httpredir.debian.org/debian/ stretch main
contrib non-free
           deb http://httpredir.debian.org/debian/ stretch-updates
main contrib non-free
           deb-src http://httpredir.debian.org/debian/ stretch-updates
main contrib non-free
           deb http://security.debian.org/ stretch/updates main contrib non-free
           deb-src http://security.debian.org/ stretch/updates main
contrib non-free

 % apt-cache policy python3.4
python3.4:
  Installed: 3.4.2-1
  Candidate: 3.4.2-1
  Version table:
 *** 3.4.2-1 100
        100 /var/lib/dpkg/status


But now I find that my system has lots of packages from Jessie which
are no longer present in either Stretch or Sid. I would like get a
list of all such packages and decide if I want to remove them.

-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [prev] | [next] | [standalone]


#173867

FromFrank <zuiderduin@gmx.com>
Date2016-10-26 18:00 +0200
Message-ID<swyMp-5PJ-25@gated-at.bofh.it>
In reply to#173861
Op 26-10-16 om 14:16 schreef kamaraju kusumanchi:
> But now I find that my system has lots of packages from Jessie which
> are no longer present in either Stretch or Sid. I would like get a
> list of all such packages and decide if I want to remove them.

This isn't a complete answer to that, because it only looks at the 
packages in Stretch (because that's what's in your sources.list), but 
it's something:

apt-show-versions | sed -n 's/^\(\S*\):.* .* available .*$/\1/p'

With a properly updated cache, apt-show-versions shows a trailing text 
'installed: No available version in archive' for all packages that are 
installed on your system but not installable. If you pipe the output 
through sed like that (checking for just 'available' should suffice), 
the result is a list of installed packages which are not available in 
the archive, using the current state of sources.list. On a multiarch 
system it will show some duplicates.

If you temporarily change your sources.list to Sid and run this as root, 
it should produce a Sid based list (just don't forget to switch back to 
Stretch before doing any upgrading!).

Regards,
Frank

[toc] | [prev] | [next] | [standalone]


#173869

FromMichael Lange <klappnase@freenet.de>
Date2016-10-26 18:40 +0200
Message-ID<swzp8-6mF-37@gated-at.bofh.it>
In reply to#173861
On Wed, 26 Oct 2016 08:16:56 -0400
kamaraju kusumanchi <raju.mailinglists@gmail.com> wrote:


> But now I find that my system has lots of packages from Jessie which
> are no longer present in either Stretch or Sid. I would like get a
> list of all such packages and decide if I want to remove them.

A small change to my first script should list all packages that are
neither in stretch nor sid, not 100% exactly what you are looking for,
but maybe good enough (?):

#!/usr/bin/python

from commands import getoutput

allpkgs = getoutput('apt-show-versions -b').splitlines()
stretch = [p for p in allpkgs if 'stretch' in p]
sid = [p for p in allpkgs if 'sid' in p]

notsidorstretch = [p for p in allpkgs if not p in (stretch+sid)]
for p in notsidorstretch:
    print(p.split(':')[0])

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Phasers locked on target, Captain.

[toc] | [prev] | [next] | [standalone]


#173991

FromRick Thomas <rbthomas@pobox.com>
Date2016-10-29 18:40 +0200
Message-ID<sxEPM-vT-43@gated-at.bofh.it>
In reply to#173781
On Oct 23, 2016, at 5:48 PM, kamaraju kusumanchi <raju.mailinglists@gmail.com> wrote:

> How can I list all the packages installed on my system that are
> currently part of the stable distribution but not present in either
> testing or sid?


try something like this

aptitude -F ‘%p' search '~i' | while read x; do aptitude --disable-columns  versions '^'"$x"'$'; done

This will give you a list of all installed packages with the repositories they are available from.

Here’s a sample

rbthomas@monk:~$ aptitude -F '%p' search '~i' | grep openocd | while read x; do aptitude --disable-columns  versions '^'"$x"'$'; done
Package openocd:                          
ih 0.3.1-1  100
ph 0.8.0-4 stable 500

On this machine, I have an ancient version (0.3.1-1) of openocd installed that is not available in the stable repo.  There is also a version (0.8.0-4) available from the stable repo that does not work in my environment, so I have the older version “held”.

This is indicated by the fact that there is no repo in the line beginning with “ih”.

A small awk or python script processing the output of the above commands should give you what you want.

Enjoy!
Rick

[toc] | [prev] | [next] | [standalone]


#174110

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-11-01 07:20 +0100
Message-ID<syAAq-4XG-5@gated-at.bofh.it>
In reply to#173781
On Sun, Oct 23, 2016 at 8:48 PM, kamaraju kusumanchi
<raju.mailinglists@gmail.com> wrote:
> How can I list all the packages installed on my system that are
> currently part of the stable distribution but not present in either
> testing or sid?
>
> For example, libkasten2okteta1controllers1abi1 libkasten2okteta1gui1
> are currently part of stable, but not present in either testing or
> sid. The command should list these packages if they are currently
> installed.
>
> If it matters, here are the repos I am tracking.
>  % inxi -r
> Repos:     Active apt sources in file: /etc/apt/sources.list
>            deb http://httpredir.debian.org/debian/ stretch main contrib non-free
>            deb-src http://httpredir.debian.org/debian/ stretch main
> contrib non-free
>            deb http://httpredir.debian.org/debian/ stretch-updates
> main contrib non-free
>            deb-src http://httpredir.debian.org/debian/ stretch-updates
> main contrib non-free
>            deb http://security.debian.org/ stretch/updates main contrib non-free
>            deb-src http://security.debian.org/ stretch/updates main
> contrib non-free
>
> I prefer to use apt-get to aptitude. But if this can only be done in
> aptitude, I do not mind using that.
>
> thanks
> raju
>

I ended up writing a python script, grep_install.py [1] to do this.
The idea is to first build a list of available packages in each
distribution of interest and then query them with desired logic. For
example

Step1: Build/update the cache. This only needs to be done once per distribution
 % grep_installed.py --update-cache --include-dists='jessie'
--exclude-dists='stretch,sid'
Processed: http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/jessie/contrib/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/jessie/non-free/binary-amd64/Packages.gz
writing: /home/rajulocal/.cache/grep_insalled/jessie.gz
Processed: http://httpredir.debian.org/debian/dists/stretch/main/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/stretch/contrib/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/stretch/non-free/binary-amd64/Packages.gz
writing: /home/rajulocal/.cache/grep_insalled/stretch.gz
Processed: http://httpredir.debian.org/debian/dists/sid/main/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/sid/contrib/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/sid/non-free/binary-amd64/Packages.gz
writing: /home/rajulocal/.cache/grep_insalled/sid.gz


Step2: Query the cache
 % dpkg -l | grep ^ii | awk '{print $2}' | grep_installed.py
--include-dists='jessie' --exclude-dists='stretch,sid'
/* produces the list of packages in Jessie but not in sid and stretch */


Step3 (optional): Clear the cache
 % grep_installed.py --clear-cache
removing /home/rajulocal/.cache/grep_insalled/jessie.gz
removing /home/rajulocal/.cache/grep_insalled/sid.gz
removing /home/rajulocal/.cache/grep_insalled/stretch.gz
removing /home/rajulocal/.cache/grep_insalled


The script can also work with apt-cache search output. For example, to
filter apt-cache search output and only show information on installed
packages, one can do

 % apt-cache search python apt | grep_installed.py


Finally, it can produce a "matrix" type of report showing the
availability of a given set of packages across different
distributions.

 % echo "python3.4 python3.5" | tr ' ' '\n' | grep_installed.py
--include-dists='jessie' --exclude-dists='stretch,sid' --report matrix
| column -ts ','
data       pkg        is_installed  jessie  stretch  sid
python3.4  python3.4  True          True    False    False
python3.5  python3.5  True          False   True     True

This feature is "apt-cache search" friendly as well! :)

% apt-cache search idle-python | grep_installed.py
--include-dists='jessie' --exclude-dists='stretch,sid' --report matrix
| column -ts ','
data                                                  pkg
is_installed  jessie  stretch  sid
idle-python2.7 - IDE for Python (v2.7) using Tkinter  idle-python2.7
True          True    True     True
idle-python3.5 - IDE for Python (v3.5) using Tkinter  idle-python3.5
False         False   True     True

Appendix:
[1] - The code for grep_installed.py can be found in
https://gitlab.com/d3k2mk7/rutils/blob/master/bin/grep_installed.py

Please let me know if you find any bugs or have suggestions for
improvement (no matter how small you think they are).

thanks
raju

-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [prev] | [next] | [standalone]


#174128

FromJonathan Dowland <jmtd@debian.org>
Date2016-11-02 11:20 +0100
Message-ID<sz0Oe-4WT-11@gated-at.bofh.it>
In reply to#173781

[Multipart message — attachments visible in raw view] — view raw

On Sun, Oct 23, 2016 at 08:48:46PM -0400, kamaraju kusumanchi wrote:
> How can I list all the packages installed on my system that are
> currently part of the stable distribution but not present in either
> testing or sid?

This is a good question (sorry I don't have the answer here). I recently
hit a similar situation with mediawiki, which exists in everything except
stable. I realised that if you have upgraded between Debian versions at
some point, you might have some packages installed from the former release
(now oldstable) that are not in current release, and so you might not get
security updates for those packages (once security updates cease for
oldstable).

In the case of mediawiki there is a version in jessie-backports, but default
pining rules / apt preferences would not upgrade the package automatically in
this situation.

[toc] | [prev] | [next] | [standalone]


#174137

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-11-03 03:20 +0100
Message-ID<szfNf-65A-1@gated-at.bofh.it>
In reply to#174128
On Wed, Nov 2, 2016 at 6:16 AM, Jonathan Dowland <jmtd@debian.org> wrote:
> On Sun, Oct 23, 2016 at 08:48:46PM -0400, kamaraju kusumanchi wrote:
>> How can I list all the packages installed on my system that are
>> currently part of the stable distribution but not present in either
>> testing or sid?
>
> This is a good question (sorry I don't have the answer here). I recently
> hit a similar situation with mediawiki, which exists in everything except
> stable. I realised that if you have upgraded between Debian versions at
> some point, you might have some packages installed from the former release
> (now oldstable) that are not in current release, and so you might not get
> security updates for those packages (once security updates cease for
> oldstable).
>
> In the case of mediawiki there is a version in jessie-backports, but default
> pining rules / apt preferences would not upgrade the package automatically in
> this situation.

Hi Jonathan,

Not sure if you read the entire thread, I ended up writing a script to
do this now. So, if you want to see packages that are currently
installed on your system but not part of jessie, you can do the
following.

Step 1: Update the cache
 % grep_installed.py --exclude-dists 'jessie' --update-cache
Processed: http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/jessie/contrib/binary-amd64/Packages.gz
Processed: http://httpredir.debian.org/debian/dists/jessie/non-free/binary-amd64/Packages.gz
writing: /home/rajulocal/.cache/grep_insalled/jessie.gz

Step 2: Query the cache on the list of installed packages
 % dpkg -l  | grep '^ii' | awk '{print $2}' | grep_installed.py
--exclude-dists 'jessie'

Could you give it a try and let me know what you think?
The script can be downloaded from
https://gitlab.com/d3k2mk7/rutils/blob/master/bin/grep_installed.py .
Running it with -h option gives the set of options and some sample
commands.

thanks
raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [prev] | [next] | [standalone]


#174146

FromJonathan Dowland <jmtd@debian.org>
Date2016-11-03 14:10 +0100
Message-ID<szpWi-4jL-13@gated-at.bofh.it>
In reply to#174137

[Multipart message — attachments visible in raw view] — view raw

On Wed, Nov 02, 2016 at 10:16:03PM -0400, kamaraju kusumanchi wrote:
> Not sure if you read the entire thread, I ended up writing a script to
> do this now. So, if you want to see packages that are currently
> installed on your system but not part of jessie, you can do the
> following.

Thanks, I hadn't finished reading all the thread, but I'll be sure to look at
your script closely.

my idle thoughts are we should make sure that this is something that can easily
be determined using the standard tools on a Debian system, so I'm thinking about
what enhancements to propose and to which tools.

-- 
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

[toc] | [prev] | [next] | [standalone]


#174165

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-11-04 02:10 +0100
Message-ID<szBb3-39R-3@gated-at.bofh.it>
In reply to#174146
On Thu, Nov 3, 2016 at 9:08 AM, Jonathan Dowland <jmtd@debian.org> wrote:
> On Wed, Nov 02, 2016 at 10:16:03PM -0400, kamaraju kusumanchi wrote:
>> Not sure if you read the entire thread, I ended up writing a script to
>> do this now. So, if you want to see packages that are currently
>> installed on your system but not part of jessie, you can do the
>> following.
>
> Thanks, I hadn't finished reading all the thread, but I'll be sure to look at
> your script closely.
>
> my idle thoughts are we should make sure that this is something that can easily
> be determined using the standard tools on a Debian system, so I'm thinking about
> what enhancements to propose and to which tools.
>

Yes, I agree. If standard tools can do it, it will be better. But
based on my experience with [1] , I decided to write one myself to get
things going.

[1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775771

-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [prev] | [next] | [standalone]


#174171

FromJörg-Volker Peetz <jvpeetz@web.de>
Date2016-11-04 14:50 +0100
Message-ID<szN2x-2k4-15@gated-at.bofh.it>
In reply to#174165
Maybe, this "one-liner" does what you want?

aptitude -F "%p" search ~Astable| sort | \
    (aptitude -F "%p" search ~Aunstable ~Atesting | sort -u | \
     comm -23 --nocheck-order /dev/fd/3 -) 3<&0

All three archives have to be present with the names used above in your
sources.list file (that is, e.g., "unstable" and not "sid").

Regards,
jvp.

[toc] | [prev] | [next] | [standalone]


#174173

FromJörg-Volker Peetz <jvpeetz@web.de>
Date2016-11-04 17:20 +0100
Message-ID<szPnI-483-23@gated-at.bofh.it>
In reply to#174171
Jörg-Volker Peetz wrote on 11/04/16 14:39:
> Maybe, this "one-liner" does what you want?
> 
> aptitude -F "%p" search ~Astable| sort | \
>     (aptitude -F "%p" search ~Aunstable ~Atesting | sort -u | \
>      comm -23 --nocheck-order /dev/fd/3 -) 3<&0
> 
This needs a correction, if I'm not mistaken:

aptitude -F "%p" search ~i | sort | \
    (aptitude -F "%p" search ~Aunstable ~Atesting | sort -u | \
     comm -23 --nocheck-order /dev/fd/3 -) 3<&0

All installed packages should be checked, not all available from stable.

> All three archives have to be present with the names used above in your
> sources.list file (that is, e.g., "unstable" and not "sid").

Regards,
jvp.

[toc] | [prev] | [next] | [standalone]


#174176

FromJörg-Volker Peetz <jvpeetz@web.de>
Date2016-11-04 19:00 +0100
Message-ID<szQWu-4TL-17@gated-at.bofh.it>
In reply to#174173
Jörg-Volker Peetz wrote on 11/04/16 17:17:
> Jörg-Volker Peetz wrote on 11/04/16 14:39:
>> Maybe, this "one-liner" does what you want?
>>
>> aptitude -F "%p" search ~Astable| sort | \
>>     (aptitude -F "%p" search ~Aunstable ~Atesting | sort -u | \
>>      comm -23 --nocheck-order /dev/fd/3 -) 3<&0
>>
> This needs a correction, if I'm not mistaken:
> 
> aptitude -F "%p" search ~i | sort | \
>     (aptitude -F "%p" search ~Aunstable ~Atesting | sort -u | \
>      comm -23 --nocheck-order /dev/fd/3 -) 3<&0
> 
> All installed packages should be checked, not all available from stable.

Or just with aptitude:

aptitude -F "%p" search '!~Atesting!~Aunstable~i'

At least on my system it produces the same list of packages.

> 
>> All three archives have to be present with the names used above in your
>> sources.list file (that is, e.g., "unstable" and not "sid").

Regards,
jvp.

[toc] | [prev] | [next] | [standalone]


#174129

Fromsteve <dlist@bluewin.ch>
Date2016-11-02 11:50 +0100
Message-ID<sz1hf-56k-15@gated-at.bofh.it>
In reply to#173781
Hi Kamaraju,

Le 23-10-2016, à 20:48:46 -0400, kamaraju kusumanchi a écrit :

>How can I list all the packages installed on my system that are
>currently part of the stable distribution but not present in either
>testing or sid?

does

aptitude search ~Ajessie~i

meet your needs?

[toc] | [prev] | [next] | [standalone]


#174138

Fromkamaraju kusumanchi <raju.mailinglists@gmail.com>
Date2016-11-03 03:30 +0100
Message-ID<szfWV-68P-5@gated-at.bofh.it>
In reply to#174129
On Wed, Nov 2, 2016 at 6:45 AM, steve <dlist@bluewin.ch> wrote:
> Hi Kamaraju,
>
> Le 23-10-2016, à 20:48:46 -0400, kamaraju kusumanchi a écrit :
>
>> How can I list all the packages installed on my system that are
>> currently part of the stable distribution but not present in either
>> testing or sid?
>
>
> does
>
> aptitude search ~Ajessie~i
>
> meet your needs?
>

No, it does not. When I ran that command it did not produce any
output. What is it supposed to do?

I now believe that aptitude, apt-get cannot do what I am looking for
unless the /etc/apt/sources.list is modified accordingly. But updating
/etc/apt/sources.list is not the "correct" way to address my ask.

thanks
raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

[toc] | [prev] | [next] | [standalone]


#174139

Fromsteve <dlist@bluewin.ch>
Date2016-11-03 08:40 +0100
Message-ID<szkMW-R5-15@gated-at.bofh.it>
In reply to#174138
Le 02-11-2016, à 22:25:53 -0400, kamaraju kusumanchi a écrit :

>> does
>>
>> aptitude search ~Ajessie~i
>>
>> meet your needs?
>>
>
>No, it does not. When I ran that command it did not produce any
>output. What is it supposed to do?

I get this as an output (first few in French, sorry):

i   ant             - Outil de construction "à la make" basé sur Java                             
i   ant-optional    - compilateur analogue à make fondé sur Java - bibliothèques optionnelles     
i A bundler         - Manage Ruby application dependencies                                        
i   conky-all       - highly configurable system monitor (all features enabled)  

etc…

Which are all the package installed in my Jessie system. If it's not
what you are looking for, I guess I have not understand your question.

Steve

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.user


csiph-web