Re: question regarding post-installed packages

2021-06-23 Thread David Wright
On Wed 23 Jun 2021 at 08:49:42 (+0100), mick crane wrote:
> On 2021-06-23 08:22, to...@tuxteam.de wrote:
> > On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:
> > 
> > [...]
> > 
> > >   comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> > > /var/log/installer/initial-status.gz | sed -n 's/^Package:
> > > //p' | sort -u)
> > 
> > > Command substitution without '$'? I must be missing something
> > > and would
> > > appreciate a pointer.
> > 
> > As David pointed out (as a pointer), the <(...) is a bashism for
> > "pretend this is
> > a file name whose content is provided by the enclosed command's
> > output".
> > 
> > Perhaps more readable in the symmetrical variant
> > 
> >   diff -u <(ls dir1) <(ls dir2)
> > 
> > Very handy.
> > 
> does not the excellent guide also say not to try to do anything with
> the output of "ls" ?

That would make ls effectively useless. No, the output from ls is for
parsing by eyeball, not by scripts. That's what's important.
In the example, diff doesn't parse the output, it just presents the
differences between two slabs of text for your eyeball to parse.

Cheers,
David.



Re: question regarding post-installed packages

2021-06-23 Thread Andrei POPESCU
On Mi, 23 iun 21, 16:49:28, David wrote:
> On Wed, 23 Jun 2021 at 13:52, Andrei POPESCU  wrote:
> > On Ma, 22 iun 21, 10:57:39, Greg Wooledge wrote:
> 
> > Mistery solved by looking at the html part (the '/' are meant to denote
> > italic), the correct command is:
> >  comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
> > /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
> 
> > > It looks like a bash command, if you make the following changes:
> > > 1) Join the two lines into one.
> > > 2) Remove leading / and trailing / characters.
> 
> > Command substitution without '$'? I must be missing something and would
> > appreciate a pointer.
> 
> http://mywiki.wooledge.org/BashGuide/InputAndOutput#Process_Substitution
 
Thank you, I searched for 'substitution' in the bash manpage and stopped 
at 'Command Substitution'. 

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: question regarding post-installed packages

2021-06-23 Thread Andrei POPESCU
On Mi, 23 iun 21, 09:22:24, to...@tuxteam.de wrote:
> On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:
> 
> [...]
> 
> > comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
> > /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
> 
> > Command substitution without '$'? I must be missing something and would 
> > appreciate a pointer.
> 
> As David pointed out (as a pointer), the <(...) is a bashism for "pretend 
> this is
> a file name whose content is provided by the enclosed command's output".
> 
> Perhaps more readable in the symmetrical variant
> 
>   diff -u <(ls dir1) <(ls dir2)
> 
> Very handy.

It certainly appears to be very handy, though I generally try to steer 
away from bashims in scripts, and for interactive use my primary shell 
is now fish.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: question regarding post-installed packages

2021-06-23 Thread tomas
On Wed, Jun 23, 2021 at 08:49:42AM +0100, mick crane wrote:
> On 2021-06-23 08:22, to...@tuxteam.de wrote:

[...]

> >Perhaps more readable in the symmetrical variant
> >
> >  diff -u <(ls dir1) <(ls dir2)
> >
> >Very handy.
> >
> does not the excellent guide also say not to try to do anything with
> the output of "ls" ?

It was just intended as a minimal example. I wouldn't bury the
above deep in a script working quietly in some machine room,
definitely not.

But then, I'd consider it twice to use a bashism down there; in
the quick command line, where you can deal with the fallout should
things move, it seems OK.

So I'd say "it depends" :)

Cheers
 - t


signature.asc
Description: Digital signature


Re: question regarding post-installed packages

2021-06-23 Thread mick crane

On 2021-06-23 08:22, to...@tuxteam.de wrote:

On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:

[...]

	comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort 
-u)


Command substitution without '$'? I must be missing something and 
would

appreciate a pointer.


As David pointed out (as a pointer), the <(...) is a bashism for
"pretend this is
a file name whose content is provided by the enclosed command's 
output".


Perhaps more readable in the symmetrical variant

  diff -u <(ls dir1) <(ls dir2)

Very handy.

does not the excellent guide also say not to try to do anything with the 
output of "ls" ?

mick

--
Key ID4BFEBB31



Re: question regarding post-installed packages

2021-06-23 Thread tomas
On Wed, Jun 23, 2021 at 06:51:39AM +0300, Andrei POPESCU wrote:

[...]

>   comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

> Command substitution without '$'? I must be missing something and would 
> appreciate a pointer.

As David pointed out (as a pointer), the <(...) is a bashism for "pretend this 
is
a file name whose content is provided by the enclosed command's output".

Perhaps more readable in the symmetrical variant

  diff -u <(ls dir1) <(ls dir2)

Very handy.

Cheers
 - t


signature.asc
Description: Digital signature


Re: question regarding post-installed packages

2021-06-23 Thread David
On Wed, 23 Jun 2021 at 13:52, Andrei POPESCU  wrote:
> On Ma, 22 iun 21, 10:57:39, Greg Wooledge wrote:

> Mistery solved by looking at the html part (the '/' are meant to denote
> italic), the correct command is:
>  comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

> > It looks like a bash command, if you make the following changes:
> > 1) Join the two lines into one.
> > 2) Remove leading / and trailing / characters.

> Command substitution without '$'? I must be missing something and would
> appreciate a pointer.

http://mywiki.wooledge.org/BashGuide/InputAndOutput#Process_Substitution



Re: question regarding post-installed packages

2021-06-22 Thread Andrei POPESCU
On Ma, 22 iun 21, 10:57:39, Greg Wooledge wrote:
> On Tue, Jun 22, 2021 at 05:44:50PM +0300, Andrei POPESCU wrote:
> > On Ma, 22 iun 21, 15:30:35, Christian wrote:
> > > 
> > > /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> > > /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort 
> > > -u)/
> > 
> > It's unclear what exactly '/comm -23' is supposed to be and it seems 
> > your mail program messed with line breaks.

Mistery solved by looking at the html part (the '/' are meant to denote 
italic), the correct command is:

comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)


> > Also, guessing from the command, this is supposed to be run under 
> > fish (the shell). The default shell in Debian is bash, which needs 
> > slightly different syntax for what you want to do.
> 
> It looks like a bash command, if you make the following changes:
> 
> 1) Join the two lines into one.
> 2) Remove leading / and trailing / characters.

Command substitution without '$'? I must be missing something and would 
appreciate a pointer.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: question regarding post-installed packages

2021-06-22 Thread Andrei POPESCU
On Ma, 22 iun 21, 11:25:00, Greg Wooledge wrote:
> On Tue, Jun 22, 2021 at 05:08:35PM +0200, Christian wrote:
> > Hi Andrei,
> > 
> > thanks a lot for your reply. 
> > 
> > > It's unclear what exactly '/comm -23' is supposed to be
> > 
> > Well, from the man pages (man comm) :
> > 
> > /comm [OPTION]... FILE1 FILE2//
> 
> Your mail user agent (or your editor) appears to be adding forward slash
> characters to lines, perhaps to represent "this is terminal input/output",
> or "use a fixed-width font", or something similar.
> 
> These slash characters are causing some confusion.
> 
> > //
> > //DESCRIPTION//
> > //   Compare sorted files FILE1 and FILE2 line by line.
> 
> They're a bit messy.  It takes some guesswork to extract the valid shell
> command from inside the slashed-up text, especially when the number of
> slashes added per line is variable.
 
It seems to be due to this particular mail client's attempt to generate 
a plain text version of a message originally composed as html.

Christian, please post only in plain text to debian-user, especially 
when copy-pasting shell commands (or output).

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: question regarding post-installed packages

2021-06-22 Thread Greg Wooledge
On Tue, Jun 22, 2021 at 05:08:35PM +0200, Christian wrote:
> Hi Andrei,
> 
> thanks a lot for your reply. 
> 
> > It's unclear what exactly '/comm -23' is supposed to be
> 
> Well, from the man pages (man comm) :
> 
> /comm [OPTION]... FILE1 FILE2//

Your mail user agent (or your editor) appears to be adding forward slash
characters to lines, perhaps to represent "this is terminal input/output",
or "use a fixed-width font", or something similar.

These slash characters are causing some confusion.

> //
> //DESCRIPTION//
> //   Compare sorted files FILE1 and FILE2 line by line.

They're a bit messy.  It takes some guesswork to extract the valid shell
command from inside the slashed-up text, especially when the number of
slashes added per line is variable.



Re: question regarding post-installed packages

2021-06-22 Thread Christian

Hi Andrei,

thanks a lot for your reply. 

> It's unclear what exactly '/comm -23' is supposed to be

Well, from the man pages (man comm) :

/comm [OPTION]... FILE1 FILE2//
//
//DESCRIPTION//
//   Compare sorted files FILE1 and FILE2 line by line.

  -1 suppress column 1 (lines unique to FILE1)

   -2 suppress column 2 (lines unique to FILE2)
/
So I think the comm-command should be for comparison of files.

I´ve always used *bash* for executing the command, so this shouldn´t be 
the problem.


> [initial-status.gz-file] I'm guessing it is created by the Ubuntu 
installer.


Yes, I think so as well. Thanks for confirming that.

> If you show us an example [...]

Sorry, Andrei, I´m not quite sure what you mean by that.

Thanks anyway for your kind help.

All the best.
Rosika


Am 22.06.21 um 16:44 schrieb Andrei POPESCU:

On Ma, 22 iun 21, 15:30:35, Christian wrote:

/comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/

It's unclear what exactly '/comm -23' is supposed to be and it seems
your mail program messed with line breaks.

Also, guessing from the command, this is supposed to be run under fish
(the shell). The default shell in Debian is bash, which needs slightly
different syntax for what you want to do.

In any case, 'apt-mark showmanual' definitely exists and works in Debian
and is one way to achieve what you need (aptitude is another).

The file /var/log/installer/initial-status.gz doesn't exist on a fairly
recent install of Debian bullseye (soon to be Debian 11). I'm guessing
it is created by the Ubuntu installer.

If you show us an example (attaching it might work, if it's not too big)
we might come up with methods to recreate the information on a fresh
Debian install.

Hope this helps,
Andrei




Re: question regarding post-installed packages

2021-06-22 Thread Greg Wooledge
On Tue, Jun 22, 2021 at 05:44:50PM +0300, Andrei POPESCU wrote:
> On Ma, 22 iun 21, 15:30:35, Christian wrote:
> > 
> > /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> > /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/
> 
> It's unclear what exactly '/comm -23' is supposed to be and it seems 
> your mail program messed with line breaks.
> 
> Also, guessing from the command, this is supposed to be run under fish 
> (the shell). The default shell in Debian is bash, which needs slightly 
> different syntax for what you want to do.

It looks like a bash command, if you make the following changes:

1) Join the two lines into one.
2) Remove leading / and trailing / characters.

Also, I don't have a /var/log/installer/initial-status.gz file, but I
do have a /var/log/installer/status file, which looks like it contains
what the command is expecting (minus the compression).  So, one might
need to adjust the second process substitution.



Re: question regarding post-installed packages

2021-06-22 Thread Christian

Dear Hans, 


thanks again for your help.

> if you can see in this file, which packages are postinstalled or 
dependent [...]


Alas that doesn´t seem to be the case.

As an example I post-installed the fish-shell and the respective entry 
simply is:


/fish    install/

, so basically like all the other entries as well.

But your suggestion of making two files - one after the initial OS setup 
and then another one after having done my post-installs - and then

comparing these two files really makes sense. Thanks for pointing that out.

Thanks also for your personal suggestion referring to a minimal install 
which is very good indeed and seems to be best suited for my purposes.


Your help is highly appreciated; thanks so much again.  

Many greetings
Rosika


Am 22.06.21 um 16:31 schrieb Hans:

Am Dienstag, 22. Juni 2021, 16:17:15 CEST schrieb Christian:
Hi Christian,

I looked not further into te result file. However, if you can see in this
file, which packages are postinstalled or dependent, you can just filter this
file with tools like cat, grep or even sort.

On the other hand, you can make two result files. One at the first
installation, the second one after you installed your packages. After that,
you will see the difference of both.

In fact, my personal suggestion is, just install a minimal system, one as
small as possible. When this is up, install all the tools and packages you
really need. So you will always install only the stuff, you REALLY need,
verything else ist just crap (and may be misused).

Hope this helps either.

Best regards

Hans



Re: question regarding post-installed packages

2021-06-22 Thread Andrei POPESCU
On Ma, 22 iun 21, 15:30:35, Christian wrote:
> 
> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/

It's unclear what exactly '/comm -23' is supposed to be and it seems 
your mail program messed with line breaks.

Also, guessing from the command, this is supposed to be run under fish 
(the shell). The default shell in Debian is bash, which needs slightly 
different syntax for what you want to do.

In any case, 'apt-mark showmanual' definitely exists and works in Debian 
and is one way to achieve what you need (aptitude is another).

The file /var/log/installer/initial-status.gz doesn't exist on a fairly 
recent install of Debian bullseye (soon to be Debian 11). I'm guessing 
it is created by the Ubuntu installer.

If you show us an example (attaching it might work, if it's not too big) 
we might come up with methods to recreate the information on a fresh 
Debian install.

Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: question regarding post-installed packages

2021-06-22 Thread Hans
Am Dienstag, 22. Juni 2021, 16:17:15 CEST schrieb Christian:
Hi Christian,

I looked not further into te result file. However, if you can see in this 
file, which packages are postinstalled or dependent, you can just filter this 
file with tools like cat, grep or even sort.

On the other hand, you can make two result files. One at the first 
installation, the second one after you installed your packages. After that, 
you will see the difference of both.

In fact, my personal suggestion is, just install a minimal system, one as 
small as possible. When this is up, install all the tools and packages you 
really need. So you will always install only the stuff, you REALLY need, 
verything else ist just crap (and may be misused). 

Hope this helps either.

Best regards

Hans


> Hello Hans,
> 
> 
> thanks so much for your very quick reply.
> 
> I just tried out the command you provided and it seems to produce quite
> an extensive list beginning with "acl" and ending with "zlib1g:amd64".
> So it´s basically a list with all the packages which are installed by 
> default plus the packages I installed afterwards.
> 
> I was hoping for a list that provides just my post-installed packages.
> But I assume that in view of the fact that the /i*nitial-status.gz
> */doesn´t seem to exist on Debian there´s no way of achieving this goal.
> 
> Never mind. Your command will certainly be of great assistance when
> setting up a new system.
> 
> Thank you very much for that, Hans.
> 
> Many greetings and keep safe.
> 
> Rosika
> 
> Am 22.06.21 um 15:52 schrieb Hans:
> > Am Dienstag, 22. Juni 2021, 15:30:35 CEST schrieb Christian:
> > Hi,
> > 
> > maybe this is the command you need? From an older doku:
> > -
> > 
> > 3.3.10 Record/copy system configuration
> > 
> > To make a local copy of the package selection states:
> > 
> > $ dpkg --get-selections "*" > myselections
> > 
> >   # or use \*
> > 
> > “*” makes myselections include package entries for “purge” too.
> > 
> > You can transfer this file to another computer, and install it there with:
> > 
> > dselect update
> > dpkg --set-selections  > apt-get -u dselect-upgrade
> > or dselect install
> > --
> > 
> > Hope this helps.
> > 
> > Best
> > 
> > Hans






Re: question regarding post-installed packages

2021-06-22 Thread Christian

Hello Hans,


thanks so much for your very quick reply.

I just tried out the command you provided and it seems to produce quite 
an extensive list beginning with "acl" and ending with "zlib1g:amd64".
So it´s basically a list with all the packages which are installed by  
default plus the packages I installed afterwards.


I was hoping for a list that provides just my post-installed packages.
But I assume that in view of the fact that the /i*nitial-status.gz 
*/doesn´t seem to exist on Debian there´s no way of achieving this goal.


Never mind. Your command will certainly be of great assistance when 
setting up a new system.


Thank you very much for that, Hans.

Many greetings and keep safe.

Rosika


Am 22.06.21 um 15:52 schrieb Hans:

Am Dienstag, 22. Juni 2021, 15:30:35 CEST schrieb Christian:
Hi,

maybe this is the command you need? From an older doku:
-

3.3.10 Record/copy system configuration

To make a local copy of the package selection states:

$ dpkg --get-selections "*" > myselections

  # or use \*

“*” makes myselections include package entries for “purge” too.

You can transfer this file to another computer, and install it there with:

dselect update
dpkg --set-selections 

Re: question regarding post-installed packages

2021-06-22 Thread Hans
Am Dienstag, 22. Juni 2021, 15:30:35 CEST schrieb Christian:
Hi, 

maybe this is the command you need? From an older doku:
-

3.3.10 Record/copy system configuration

To make a local copy of the package selection states:

$ dpkg --get-selections "*" > myselections

 # or use \*

“*” makes myselections include package entries for “purge” too.

You can transfer this file to another computer, and install it there with:

dselect update
dpkg --set-selections  Hi altogether,
> 
> I'm new to *Debian* and so far I like it very much.
> 
> I´ve some (basic) knowledge regarding Linux-distros but this knowledge
> is based on the fact that I´ve been using Lubuntu (ubuntu derivative)
> for some time now.
> 
> I appreciate there are some differences between Ubuntu and Debian so I
> installed *Debian10 buster* as a VM - in order to gather some experience
> with it.
> 
> Up and until now I seem to be getting along with it just fine and I like
> the fact that it´s really lightweight.
> 
> I´ve got one question though:
> 
> Using (L)Ubuntu I had a certain _command_ at hand which helped me with
> fresh/clean installs.
> 
> Before converting to a new version I entered the following command (on
> the old OS) in the terminal:
> 
> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/
> 
> This gave me list of all packages which were post-installed after the
> initial setup.
> All I had to do was putting the results of the command in a text file,
> say "*result.txt*".
> 
> The beauty of this command is that it produces the packages (programmes
> that I installed with apt) *without* any dependencies.
> 
> After installing the new system I used the command
> 
> /xargs -a /path-to-result.txt sudo apt-get install/
> 
> and my new system was on the same level as my old one before.
> 
> Trying out that very command in Debian however didn´t work as desired:
> 
> /comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc
> /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)//
> //gzip: /var/log/installer/initial-status.gz: No such file or directory//
> //adduser//
> //anydesk//
> //apt//
> //...//
> //zlib1g/
> 
> So there was some output but not the one I was looking for.
> 
> The file "*initial-status.gz*" indeed doesn´t exist in /var/log/installer.
> 
> Here are the contents of /var/log/installer in Debian:
> 
> /rosika2@debian ~> ll /var/log/installer///
> //insgesamt 1,4M//
> //drwxr-xr-x 2 root root 4,0K Jun 16 16:59 cdebconf///
> //-rw-r--r-- 1 root root  20K Jun 16 16:59 hardware-summary//
> //-rw-r--r-- 1 root root  160 Jun 16 16:59 lsb-release//
> //-rw--- 1 root root 107K Jun 16 16:59 partman//
> //-rw-r--r-- 1 root root  72K Jun 16 16:59 status//
> //-rw--- 1 root root 1,2M Jun 16 16:59 syslog//
> //-rw--- 1 root root  41K Jun 16 16:59 Xorg.0.log/
> 
> So my question is: Does this file exist at all (possibly using another
> path)?
> Or is there another preferred way of getting info concerning all
> post-installed packages (without their dependencies)?
> 
> Thanks a lot for your help in advance.
> 
> Many greetings.
> Rosika



signature.asc
Description: This is a digitally signed message part.


question regarding post-installed packages

2021-06-22 Thread Christian

Hi altogether,

I'm new to *Debian* and so far I like it very much.

I´ve some (basic) knowledge regarding Linux-distros but this knowledge 
is based on the fact that I´ve been using Lubuntu (ubuntu derivative) 
for some time now.


I appreciate there are some differences between Ubuntu and Debian so I 
installed *Debian10 buster* as a VM - in order to gather some experience 
with it.


Up and until now I seem to be getting along with it just fine and I like 
the fact that it´s really lightweight.


I´ve got one question though:

Using (L)Ubuntu I had a certain _command_ at hand which helped me with 
fresh/clean installs.


Before converting to a new version I entered the following command (on 
the old OS) in the terminal:


/comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)/


This gave me list of all packages which were post-installed after the 
initial setup.
All I had to do was putting the results of the command in a text file, 
say "*result.txt*".


The beauty of this command is that it produces the packages (programmes 
that I installed with apt) *without* any dependencies.


After installing the new system I used the command

/xargs -a /path-to-result.txt sudo apt-get install/

and my new system was on the same level as my old one before.

Trying out that very command in Debian however didn´t work as desired:

/comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc 
/var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)//

//gzip: /var/log/installer/initial-status.gz: No such file or directory//
//adduser//
//anydesk//
//apt//
//...//
//zlib1g/

So there was some output but not the one I was looking for.

The file "*initial-status.gz*" indeed doesn´t exist in /var/log/installer.

Here are the contents of /var/log/installer in Debian:

/rosika2@debian ~> ll /var/log/installer///
//insgesamt 1,4M//
//drwxr-xr-x 2 root root 4,0K Jun 16 16:59 cdebconf///
//-rw-r--r-- 1 root root  20K Jun 16 16:59 hardware-summary//
//-rw-r--r-- 1 root root  160 Jun 16 16:59 lsb-release//
//-rw--- 1 root root 107K Jun 16 16:59 partman//
//-rw-r--r-- 1 root root  72K Jun 16 16:59 status//
//-rw--- 1 root root 1,2M Jun 16 16:59 syslog//
//-rw--- 1 root root  41K Jun 16 16:59 Xorg.0.log/

So my question is: Does this file exist at all (possibly using another 
path)?
Or is there another preferred way of getting info concerning all 
post-installed packages (without their dependencies)?


Thanks a lot for your help in advance.

Many greetings.
Rosika


Re: Goal: a specialized inventory of installed packages

2020-04-06 Thread David Wright
On Sun 05 Apr 2020 at 13:17:37 (-0500), Richard Owlett wrote:
> On 04/05/2020 12:00 PM, David Wright wrote:
> > On Sun 05 Apr 2020 at 10:30:41 (-0500), Richard Owlett wrote:
> > 
> > > I currently have a configuration of Stretch that meets most of my needs.
> > 
> > > I'm setting out to do an _extremely_ custom *minimal* install of Buster.
> > > The desired inventory shall list *ONLY* top level packages.
> > > [ E.G. if gfortran was purposely installed, the ~dozen packages
> > > installed because they were tagged as depends, recommends, or suggests
> > > wold *NOT* be listed. ]
> > > 
> > > Is there a suitable tool? [Synaptic's History menu item is closest
> > > I've found].
> > 
> > I assume that what you're after is a command like
> >apt-get install a b c d …
> > where the list is the shortest that would install the said system.
> > 
> > In which case, I would presume the answer is no.
> > 
> > But it's not too onerous to write a script to parse the status file
> > (dpkg-query does the grunt work) and determine which packages are
> > not a [pre-]depends/recommends/suggests of any other. You may or
> > may not want to prune the resulting list, removing the names of any
> > packages that the d-i has no option but to install itself.
> > 
> > How kindly apt will take to be presented with such a list of packages
> > for installation at one sitting, I don't know.
> 
> I wasn't aiming for tool to automajically recreate an existing system.
> I was going more for a tool to allow me to visualize specifying what
> my new system would/should look like.
> 'apt-mark ...' seems to be aimed at my goals.
> Thanks.

Well, it does appear from your response, "I'll just do what the
installer thinks is an absolute minimal install and run 'apt-mark
showmanual' against it", that you're still enjoying doing installs,
so you can probably iterate towards a solution by by trying your
minimal list and seeing what results (comparing it with your
"reference" installation).

And it does appear from your other response that minimalism is more
important than function, if you exclude Recommends.

But in any case, I was assuming you wanted a reverse tool, to work out
which packages on your system are top-level, in the sense that they
are not dependent on any other package that you've installed.

I've just cannibalised a function that I use for kind of similar
purposes, because with being kept at home it seemed a good time to try
out bash's associative arrays. (I've always dropped into Python in the
past.) You might want to try it out: its default is to include
Recommends, but you can generate a longer list by using strict Depends.

It doesn't handle alternatives ( | is treated as , ) and it ignores
Pre-Depends. It also works ab initio, as if you had to drive the
d-i selection yourself. But one could modify it to merge in a
dpkg-query listing from a system that's untouched post-install.

It uses trash files (as I often do) rather than pipes so that you can
inspect partial results. As I say, it was just to get my hands dirty
with bash associative arrays. Strictly, they're not functionally
required here, but they're meant to be fast to search than a list
of an indexed array. Anyway:

function my-packages-toplevels {
[ "$1" = "-?" ] && printf '%s\n' "Usage:$FUNCNAME [Depends-only]
lists the packages installed on this system that are not dependent (and,
if lacking any argument, not recommended) by any other package." >&2 && 
return 1
local -A Depsrecs
local Pkg Format=' ${Depends} ${Recommends} \n'
[ -n "$1" ] && Format=' ${Depends} \n'
local Unique1="$(mktemp ${Uniquetrash:-/tmp}/$FUNCNAME-"$(date 
+%s)"-1some-)"
local Unique2="$(mktemp ${Uniquetrash:-/tmp}/$FUNCNAME-"$(date 
+%s)"-2all-)"
dpkg-query -W --showformat "$Format" | sed -e 's/([^)]\+)//g;s/,/ /g;s/|/ 
/g;s/[ ]\+/ /g;s/ /\n/g;' | sort -u | tail -n +2 >| "$Unique1"
while IFS=$'\n' read -r Pkg; do
Depsrecs["$Pkg"]="yes"
done < "$Unique1"
dpkg-query -W --showformat '${Package}\n' | sort >| "$Unique2"
while IFS=$'\n' read Pkg; do
[[ ! -n "${Depsrecs[$Pkg]}" ]] && printf '%s\n' "$Pkg"
done < "$Unique2"
return 0
}

Cheers,
David.



Re: Goal: a specialized inventory of installed packages

2020-04-06 Thread Andrei POPESCU
On Du, 05 apr 20, 11:59:17, Richard Owlett wrote:
> 
> I did a test run. I think I see the pattern of which packages it marks as
> manual.
> E.G. It shows systemd related items as "manual". But for *MY* purposes I
> would class them as "auto". That will not be a problem in practice. I'll
> just do what the installer thinks is an absolute minimal install and run
> 'apt-mark showmanual' against it. I'll save that list. Then create a script
> to ignore those lines when 'apt-mark showmanual' is run against my actual
> system.

Something I used to do for similar purposes[1] was to mark everything as 
auto installed and then mark as manual the packages I was actually using 
(typically things like mutt, GUI/TUI browser, etc.).

This was done using aptitude's interactive mode (not sure if apt-mark 
even existed at the time), as I could easily see what aptitude wanted to 
keep or remove.

If you intend to also *remove* packages based on this approach do mind 
the settings for "APT::AutoRemove::RecommendsImportant" and 
"APT::AutoRemove::SuggestsImportant".

[1] I stopped doing this because I found the optimization was not worth 
the time spent.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Goal: a specialized inventory of installed packages

2020-04-06 Thread Andrei POPESCU
On Du, 05 apr 20, 11:52:32, The Wanderer wrote:
> 
> From what I've seen, it looks as if debian-installer also flags some
> packages as manually installed, during initial install of the Debian
> system. I don't know which ones do and don't get that treatment.

At least the packages installed during the 'debootstrap' phase. Possibly 
also those installed by tasks (if one is selected) as well as linux 
image(s) and bootloader (grub).

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Goal: a specialized inventory of installed packages

2020-04-05 Thread Richard Owlett

On 04/05/2020 01:29 PM, Marco Möller wrote:
Once you have your list of packages in a text file, for each package one 
line, you could apply the list like this:


     apt install $(< mylist.txt)


Good to know that is known to work.



Consider to first do a simulation run for finding problems in the list:
     -s

Consider to use the following flag in order to not draw in a maybe 
gigantic tail of not really wanted stuff:

     --no-install-recommends


That had been my intention for that reason.
A few years ago someone suggested additional methods to install a 
minimum number of packages. I'll have to search my old emails - possibly 
on a semi-retired machine.




If you from time to time would like to include some package from the 
maybe gigantic tail of recommends, then simply add it individually to 
the list!


I maintain manually the list, which you are about to generate now, and 
have very good experience starting with the following complete command:

     apt install -s --no-install-recommends $(< mylist.txt)

When installing the basic Debian system from the official media,
you may want to do this in mode "expert install",


That has been my procedure.

and you may want to 
know that all offered graphical Desktop Environments are full fledged 
installs coming with many (IMHO too much!) applications,


You're preaching to the choir ;/

while 
afterwards going for a manual install of the desktop environment outside 
of the Debian installer will allow you to go for a fine grained 
"minimal" Desktop Environment installation only coming with the really 
needed functionality and without the applications.
I therefore recommend to have your personally selected packages for the 
wished Desktop Environment (KDE, Gnome, XFCE, etc.) included in your 
personal list, and when arriving at the Debian installer's "tasksel" 
menu do not only deactivate all the listed Desktop Environments, which 
become offered, but even do deactivate the head entry “Debian desktop 
environment” itself, otherwise this would install a full featured GNOME 
desktop although below in the list you have had deactivated GNOME. I 
usually only select here “standard system utilities” and “print server”, 
and then have all the needed packages for "my" Desktop Environment in my 
list.


I've a collection of experimental preseed.cfg files aimed at that.

If following this path, then be aware that for a laptop essential or 
nice to have tools like wpasupplicant or network-manager (and many 
more!) will not become automatically installed for you! Setting up your 
personal list also concerning the Desktop Environment manually will thus 
require some extended effort. Unfortunately, the Debian installer is 
only offering to install full fledged Desktop Environments, but not 
minimal versions of it.


Since I saw a site that would create a custom preseed.cfg in response to 
a series of questions resembling those the standard installer asks. That 
site is obsolete as it predates Squeeze IIRC. In any case I would do it 
in TCL/Tk as a educational coding exercise.




Good luck! Marco.





Thank you.





Re: Goal: a specialized inventory of installed packages

2020-04-05 Thread Marco Möller
Once you have your list of packages in a text file, for each package one 
line, you could apply the list like this:


apt install $(< mylist.txt)

Consider to first do a simulation run for finding problems in the list:
-s

Consider to use the following flag in order to not draw in a maybe 
gigantic tail of not really wanted stuff:

--no-install-recommends

If you from time to time would like to include some package from the 
maybe gigantic tail of recommends, then simply add it individually to 
the list!


I maintain manually the list, which you are about to generate now, and 
have very good experience starting with the following complete command:

apt install -s --no-install-recommends $(< mylist.txt)

When installing the basic Debian system from the official media,
you may want to do this in mode "expert install", and you may want to 
know that all offered graphical Desktop Environments are full fledged 
installs coming with many (IMHO too much!) applications, while 
afterwards going for a manual install of the desktop environment outside 
of the Debian installer will allow you to go for a fine grained 
"minimal" Desktop Environment installation only coming with the really 
needed functionality and without the applications.
I therefore recommend to have your personally selected packages for the 
wished Desktop Environment (KDE, Gnome, XFCE, etc.) included in your 
personal list, and when arriving at the Debian installer's "tasksel" 
menu do not only deactivate all the listed Desktop Environments, which 
become offered, but even do deactivate the head entry “Debian desktop 
environment” itself, otherwise this would install a full featured GNOME 
desktop although below in the list you have had deactivated GNOME. I 
usually only select here “standard system utilities” and “print server”, 
and then have all the needed packages for "my" Desktop Environment in my 
list.
If following this path, then be aware that for a laptop essential or 
nice to have tools like wpasupplicant or network-manager (and many 
more!) will not become automatically installed for you! Setting up your 
personal list also concerning the Desktop Environment manually will thus 
require some extended effort. Unfortunately, the Debian installer is 
only offering to install full fledged Desktop Environments, but not 
minimal versions of it.


Good luck! Marco.



Re: Goal: a specialized inventory of installed packages

2020-04-05 Thread Richard Owlett

On 04/05/2020 12:00 PM, David Wright wrote:

On Sun 05 Apr 2020 at 10:30:41 (-0500), Richard Owlett wrote:


I currently have a configuration of Stretch that meets most of my needs.



I'm setting out to do an _extremely_ custom *minimal* install of Buster.
The desired inventory shall list *ONLY* top level packages.
[ E.G. if gfortran was purposely installed, the ~dozen packages
installed because they were tagged as depends, recommends, or suggests
wold *NOT* be listed. ]

Is there a suitable tool? [Synaptic's History menu item is closest
I've found].


I assume that what you're after is a command like
   apt-get install a b c d …
where the list is the shortest that would install the said system.

In which case, I would presume the answer is no.

But it's not too onerous to write a script to parse the status file
(dpkg-query does the grunt work) and determine which packages are
not a [pre-]depends/recommends/suggests of any other. You may or
may not want to prune the resulting list, removing the names of any
packages that the d-i has no option but to install itself.

How kindly apt will take to be presented with such a list of packages
for installation at one sitting, I don't know.

Cheers,
David.


I wasn't aiming for tool to automajically recreate an existing system.
I was going more for a tool to allow me to visualize specifying what my 
new system would/should look like.

'apt-mark ...' seems to be aimed at my goals.
Thanks.






Re: Goal: a specialized inventory of installed packages

2020-04-05 Thread David Wright
On Sun 05 Apr 2020 at 10:30:41 (-0500), Richard Owlett wrote:

> I currently have a configuration of Stretch that meets most of my needs.

> I'm setting out to do an _extremely_ custom *minimal* install of Buster.
> The desired inventory shall list *ONLY* top level packages.
> [ E.G. if gfortran was purposely installed, the ~dozen packages
> installed because they were tagged as depends, recommends, or suggests
> wold *NOT* be listed. ]
> 
> Is there a suitable tool? [Synaptic's History menu item is closest
> I've found].

I assume that what you're after is a command like
  apt-get install a b c d …
where the list is the shortest that would install the said system.

In which case, I would presume the answer is no.

But it's not too onerous to write a script to parse the status file
(dpkg-query does the grunt work) and determine which packages are
not a [pre-]depends/recommends/suggests of any other. You may or
may not want to prune the resulting list, removing the names of any
packages that the d-i has no option but to install itself.

How kindly apt will take to be presented with such a list of packages
for installation at one sitting, I don't know.

Cheers,
David.



Re: Goal: a specialized inventory of installed packages

2020-04-05 Thread Richard Owlett

On 04/05/2020 10:52 AM, The Wanderer wrote:

On 2020-04-05 at 11:30, Richard Owlett wrote:


I moved from WindowsXP when Squeeze was the current release. In the
first year I did *many* installs from scratch to determine what I
wanted in a final system (made much use of preseeding).

I currently have a configuration of Stretch that meets most of my
needs. As the installation was performed using the default Debian
installer, there is a plethora of packages of no interest installed.
As some important packages are not installed by default, apt and
Synaptic were used to install them.

I'm setting out to do an _extremely_ custom *minimal* install of
Buster. The desired inventory shall list *ONLY* top level packages. [
E.G. if gfortran was purposely installed, the ~dozen packages
installed because they were tagged as depends, recommends, or
suggests wold *NOT* be listed. ]


This sounds like a job for apt's "manual" vs. "auto" status flag.

'apt-mark showmanual' will list all the packages which are flagged as
being manually installed.


*YES* THANK YOU!



Specifying a package explicitly to 'apt-get install' or similar flags it
as manually installed, if you actually go through and complete the
installation (cancelling the install also cancels the flag). Any
packages which it pulls in as dependencies - whether "Depends:"
"Recommends", or "Suggests:" - get flagged as "auto" instead.

 From what I've seen, it looks as if debian-installer also flags some
packages as manually installed, during initial install of the Debian
system. I don't know which ones do and don't get that treatment.


I did a test run. I think I see the pattern of which packages it marks 
as manual.
E.G. It shows systemd related items as "manual". But for *MY* purposes I 
would class them as "auto". That will not be a problem in practice. I'll 
just do what the installer thinks is an absolute minimal install and run 
'apt-mark showmanual' against it. I'll save that list. Then create a 
script to ignore those lines when 'apt-mark showmanual' is run against 
my actual system.




I don't know if that's good enough for you, but it's very likely the
best you're going to get.



It looks like a good match so far. Thanks again.






Re: Goal: a specialized inventory of installed packages

2020-04-05 Thread The Wanderer
On 2020-04-05 at 11:30, Richard Owlett wrote:

> I moved from WindowsXP when Squeeze was the current release. In the
> first year I did *many* installs from scratch to determine what I 
> wanted in a final system (made much use of preseeding).
> 
> I currently have a configuration of Stretch that meets most of my
> needs. As the installation was performed using the default Debian
> installer, there is a plethora of packages of no interest installed.
> As some important packages are not installed by default, apt and
> Synaptic were used to install them.
> 
> I'm setting out to do an _extremely_ custom *minimal* install of
> Buster. The desired inventory shall list *ONLY* top level packages. [
> E.G. if gfortran was purposely installed, the ~dozen packages 
> installed because they were tagged as depends, recommends, or
> suggests wold *NOT* be listed. ]

This sounds like a job for apt's "manual" vs. "auto" status flag.

'apt-mark showmanual' will list all the packages which are flagged as
being manually installed.

Specifying a package explicitly to 'apt-get install' or similar flags it
as manually installed, if you actually go through and complete the
installation (cancelling the install also cancels the flag). Any
packages which it pulls in as dependencies - whether "Depends:"
"Recommends", or "Suggests:" - get flagged as "auto" instead.

From what I've seen, it looks as if debian-installer also flags some
packages as manually installed, during initial install of the Debian
system. I don't know which ones do and don't get that treatment.

I don't know if that's good enough for you, but it's very likely the
best you're going to get.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Goal: a specialized inventory of installed packages

2020-04-05 Thread Richard Owlett

I moved from WindowsXP when Squeeze was the current release.
In the first year I did *many* installs from scratch to determine what I 
wanted in a final system (made much use of preseeding).


I currently have a configuration of Stretch that meets most of my needs.
As the installation was performed using the default Debian installer, 
there is a plethora of packages of no interest installed. As some 
important packages are not installed by default, apt and Synaptic were 
used to install them.


I'm setting out to do an _extremely_ custom *minimal* install of Buster.
The desired inventory shall list *ONLY* top level packages.
[ E.G. if gfortran was purposely installed, the ~dozen packages 
installed because they were tagged as depends, recommends, or suggests 
wold *NOT* be listed. ]


Is there a suitable tool? [Synaptic's History menu item is closest I've 
found].


TIA












Re: Manually installed packages

2016-12-04 Thread Jörg-Volker Peetz
Rodolfo Medina wrote on 12/04/16 12:54:
> Jörg-Volker Peetz  writes:

>>   aptitude -F '%p %I %d' --sort installsize search '~i'
> 
> 
> What about reverse (descending) installsize order?
> 
> Thanks,
> 
> Rodolfo
> 
For that purpose, the unix command "tac" comes handy

  aptitude -F '%p %I %d' --sort installsize search '~i' | tac

Regards,
jvp.




Re: Manually installed packages

2016-12-04 Thread Rodolfo Medina
Jörg-Volker Peetz <jvpe...@web.de> writes:

> Jörg-Volker Peetz wrote on 12/04/16 10:40:
>> Greg Wooledge wrote on 12/01/16 20:06:
>>> On Thu, Dec 01, 2016 at 06:38:45PM +, Rodolfo Medina wrote:
>> 
>>>
>>> P.S. http://wooledge.org/~greg/ds will sort the installed packages by
>>> size for you.  As you can see, many of us have been there, done that.
>>>
>> 
>> 
>> Yes, e.g., aptitude can do this sorting (and sorting by other criteria):
>> 
>>   aptitude -F '%p %D %d' --sort installsize search '~i'
>> 
> Correction: to display the installed size this should be
>
>   aptitude -F '%p %I %d' --sort installsize search '~i'


What about reverse (descending) installsize order?

Thanks,

Rodolfo



Re: Manually installed packages

2016-12-04 Thread Jörg-Volker Peetz
Jörg-Volker Peetz wrote on 12/04/16 10:40:
> Greg Wooledge wrote on 12/01/16 20:06:
>> On Thu, Dec 01, 2016 at 06:38:45PM +, Rodolfo Medina wrote:
> 
>>
>> P.S. http://wooledge.org/~greg/ds will sort the installed packages by
>> size for you.  As you can see, many of us have been there, done that.
>>
> 
> 
> Yes, e.g., aptitude can do this sorting (and sorting by other criteria):
> 
>   aptitude -F '%p %D %d' --sort installsize search '~i'
> 
Correction: to display the installed size this should be

  aptitude -F '%p %I %d' --sort installsize search '~i'

Regards,
jvp.




Re: Manually installed packages

2016-12-04 Thread Jörg-Volker Peetz
Greg Wooledge wrote on 12/01/16 20:06:
> On Thu, Dec 01, 2016 at 06:38:45PM +, Rodolfo Medina wrote:

> 
> P.S. http://wooledge.org/~greg/ds will sort the installed packages by
> size for you.  As you can see, many of us have been there, done that.
> 


Yes, e.g., aptitude can do this sorting (and sorting by other criteria):

  aptitude -F '%p %D %d' --sort installsize search '~i'

Regards,
jvp.




Re: Manually installed packages

2016-12-03 Thread kamaraju kusumanchi
On Thu, Dec 1, 2016 at 2:06 PM, Greg Wooledge <wool...@eeg.ccf.org> wrote:
>
> P.S. http://wooledge.org/~greg/ds will sort the installed packages by
> size for you.  As you can see, many of us have been there, done that.
>

I would like to mention couple of things

1) You can do this by running dpigs in the debian-goodies package. For example

 % dpigs -H -n 5
 284.0M rstudio
 228.2M valgrind-dbg
 180.7M google-chrome-stable
 164.0M gcompris-data
 155.9M linux-image-3.16.0-4-amd64

where -H lists the size in human readable format, -n specifies the
number of packages to be listed.

BTW there is nothing wrong with having your own script. I do it all
the time:). But I thought it might help users who are not aware of
this functionality in Debian itself.

2) The results from your script and dpigs are not consistent. The
dpigs utility shows valgrind-dbg but your script does not show it.

% perl ds | head -n 5
rstudio   290867
google-chrome-stable  184994
gcompris-data 167973
linux-image-3.16.0-4-amd64159681
chromium  158398

 % dpigs -n 5
290867 rstudio
233675 valgrind-dbg
184994 google-chrome-stable
167973 gcompris-data
159681 linux-image-3.16.0-4-amd64

3) Please consider putting these type of scripts in a public
repository hosting services such as gitlab or github? They make it
easier for others to collaborate by reducing the barrier to report
bugs, suggest features, provide patches etc.,

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



Re: Manually installed packages

2016-12-03 Thread Rodolfo Medina
Greg Wooledge <wool...@eeg.ccf.org> writes:

> On Thu, Dec 01, 2016 at 06:38:45PM +, Rodolfo Medina wrote:
>> Suppose that, during months and years, you have installed many packages in
>> your Debian system that you no more want and no more use, and that you want
>> to free some space on disk because your machine is old with a small hard
>> disk.  The problem is what packages you can be really sure and safe to
>> remove.
>
> At some point you actually have to *know* what a package does.  Go through
> the list sorted by size and skip everything you know is useful.  When you
> get to one that you think is not useful, or which you don't recognize
> *at all*, dig into it and find out what it does.  Then consider removing
> it, but be prepared to put it back if you break something.
>
> This is how you learn.
>
> P.S. http://wooledge.org/~greg/ds will sort the installed packages by
> size for you.  As you can see, many of us have been there, done that.


Very useful.  Thanks.

Rodolfo



Re: Manually installed packages

2016-12-02 Thread Cindy-Sue Causey
On 12/1/16, David Wright  wrote:
> On Wed 30 Nov 2016 at 08:47:21 (-0500), Stefan Monnier wrote:
>> so I'm just as confused as Rodolfo
>> and I think for good reasons.
>
> I don't know whether Rodolfo is still confused after the explanation
> I gave. AFAICT once you realise that manual means "not marked as auto"
> rather than "I installed this by typing apt* ", then it's
> fairly obvious that "manual" is a bucket term that includes, for
> example, packages installed by the debian-installer because they're
> essential, with Priority: required.
>
> I can't remember installing bash or grep, but they're certainly not
> auto, so they're going to be "unmarked auto", or "marked non-auto",
> or "marked manual". I think I'll stick to the last. What would
> you prefer?


What you're saying here, I'd never noticed anything beyond that the
"set to manually installed" message occurs to packages I am, in fact,
manually installing.. It never occurred to me to ponder that packages
might come out of the box that way and that there might be a reason
for them to do so.

>> There might be technical reasons behind
>> the way it currently works, but I think this qualifies as a bug (maybe
>> a UI bug, maybe a coding bug, maybe a doc bug).
>
> *What* qualifies as a bug...that you're confused?


That's why I chimed in with my part again. Can't remember what you
said the other day, but it helped trigger the thought process to
connect this all directly to the "set to manually installed"
advisement I (regularly) receive from apt-get. It's a no-brainer to me
to feel that there is surely some predictable purposeful purpose for
the *auto*magically generated "set to manually installed" feature I
accidentally trigger (regularly). :)

Thanks for you insight. As has been to date, this is an "of least
concern" kind of thing for me because nothing within my own system
seems affected, either positively or negatively. My instinct has been
to a-sume maybe it was a feature that proved of significant value to
practicing developers or something like that... there. *grin*

Cindy

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

* runs with plastic sporks *



Re: Manually installed packages

2016-12-02 Thread Cindy-Sue Causey
On 11/30/16, Stefan Monnier  wrote:
>> apt-mark showmanual   gives you the complement of   apt-mark showauto.
>> The second paragraph of apt-mark's description explains what's meant
>> by "auto". So "manual" doesn't mean what you appear to assume it does,
>> that you were involved in manually selecting it for installation. It
>> just means "not auto".
>
> To me "auto" means "not manually", so I'm just as confused as Rodolfo
> and I think for good reasons.  There might be technical reasons behind
> the way it currently works, but I think this qualifies as a bug (maybe
> a UI bug, maybe a coding bug, maybe a doc bug).


The other day I commented that I played along with this thread by
testing apt-mark against what I've observed while installing packages
over time. That observation was that apt-get automatically marks
packages as manually installed without being proactively told to do so
*IF* one (accidentally) installs a package that is currently up to
date on upgrades..

Note: While I was typing the above, it came to mind that maybe that's
a purposeful feature that happens because I most frequently perform
"apt-get install" instead of "apt-get upgrade" (k/t managing limited
resources).

Part of what I shared in my previous related comment is that I see the
following when accidentally using "at-get install" on a package that
is already up to date:

++
libchromaprint1 is already the newest version (1.3.2-2).
libchromaprint1 set to manually installed.
++

My observation the other day was that once that occurs, apt-mark then
understandably and immediately adds that package to any future query
feedback.

An observation today is that you apparently only see that message
once, that being the first time you (accidentally) try to install a
currently current package. That makes sense so that's where tools like
apt-mark come in handy. If you miss that "set to manually installed."
advisement during that single instance when it occurs, tools like
apt-mark have your back.

My reaction over time has been that, nope, I didn't want packages set
as manually installed primarily because #1 I didn't specifically
command it to be so and #2 I don't know what that action affects
deeper under the hood. So far it hasn't *appeared to* hurt anything,
and, point blank, there are far more pressing issues needing addressed
in my local, real World community at this moment. #Priorities. :)

Cindy :)

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

* runs with plastic sporks *



Re: Manually installed packages

2016-12-01 Thread Brian
On Thu 01 Dec 2016 at 18:38:45 +, Rodolfo Medina wrote:

> Curt  writes:
> 
> > I think in the OP's case having asked for the whole Gnome kit and
> > caboodle upon installation he's got lots of stuff he might not even be
> > aware of necessarily that doesn't fall into the auto category (or the
> > high priority required category either), but that he didn't expressly
> > install. I guess I'm just repeating what you already said though. I
> > suppose the confusion derives from the fact that the word manual
> > connotes "requiring human effort," and certain manual packages appear
> > on our systems effortlessly. 
> 
> 
> The present thread has collected many replies whose I thank all that kindly
> contributed.  But I unfortunately see no real solution to the general problem 
> I
> put to myself of which the uninstallation of Gnome is only an example.

But you never tried uninstalling GNOME as advised. Solving the general
proceeds from solvng the particular.

> Suppose that, during months and years, you have installed many packages in 
> your
> Debian system that you no more want and no more use, and that you want to free
> some space on disk because your machine is old with a small hard disk.  The
> problem is what packages you can be really sure and safe to remove.

You lay out the problem clearly. There is no silver bullet. You cannot
always be sure but you can imagine biting it. Trust the packaging system
and your own judgement.

-- 
Brian.



Re: Manually installed packages

2016-12-01 Thread Jörg-Volker Peetz
Speaking of aptitude, it does remove automatically installed package if no other
package depends on it, or recommends it. This behavior can be changed by
configuration entries in /etc/apt/apt.conf, /etc/apt/apt.conf.d/*, etc.

To show any installed packages that aren't "auto" and which are dependencies or
recommendations of other packages, in short, packages that aren't marked "auto"
but could (should?) be, order

  aptitude search '~i!~M(~R~i|~Rrecommends:~i)'

Go through this list and, as root, mark the ones you don't need with

  aptitude markauto PACKAGE

When done,

  aptitude search '~g'

shows what can be purged from the system.

Regards,
jvp.




Re: Manually installed packages

2016-12-01 Thread Greg Wooledge
On Thu, Dec 01, 2016 at 06:38:45PM +, Rodolfo Medina wrote:
> Suppose that, during months and years, you have installed many packages in 
> your
> Debian system that you no more want and no more use, and that you want to free
> some space on disk because your machine is old with a small hard disk.  The
> problem is what packages you can be really sure and safe to remove.

At some point you actually have to *know* what a package does.  Go through
the list sorted by size and skip everything you know is useful.  When you
get to one that you think is not useful, or which you don't recognize
*at all*, dig into it and find out what it does.  Then consider removing
it, but be prepared to put it back if you break something.

This is how you learn.

P.S. http://wooledge.org/~greg/ds will sort the installed packages by
size for you.  As you can see, many of us have been there, done that.

P.P.S. do this learning on your desktop box, not a server.



Re: Manually installed packages

2016-12-01 Thread Rodolfo Medina
Curt  writes:

> I think in the OP's case having asked for the whole Gnome kit and
> caboodle upon installation he's got lots of stuff he might not even be
> aware of necessarily that doesn't fall into the auto category (or the
> high priority required category either), but that he didn't expressly
> install. I guess I'm just repeating what you already said though. I
> suppose the confusion derives from the fact that the word manual
> connotes "requiring human effort," and certain manual packages appear
> on our systems effortlessly. 


The present thread has collected many replies whose I thank all that kindly
contributed.  But I unfortunately see no real solution to the general problem I
put to myself of which the uninstallation of Gnome is only an example.

Suppose that, during months and years, you have installed many packages in your
Debian system that you no more want and no more use, and that you want to free
some space on disk because your machine is old with a small hard disk.  The
problem is what packages you can be really sure and safe to remove.

First, you need knowing what actually you have installed with your hands
because you don't remember them all.  This information is not provided by
apt-mark because its meaning of `manual' is not yours.  That information is
stored here and there, in pieces and chunks, within /var/log inside apt-get,
aptitude an dpkg log files that is not so simple to grep.  Besides, those files
seem to go back in the past not further 12 months or so.  So the best way is to
take note, in future, with pencil and paper, of what you installed during time;
and, for the present, erase the disk and reinstall everything.

Now, suppose you know - thanks to pencil and paper - what packages you've been
installed on your system since its creation.  And suppose that you decide to
remove, say, package1 bcause you don't need it any more.  You do: `aptitude
purge package1' or equivalent command but here comes another problem: only
package1 is removed but not all those packages that were installed at its time
along with package1.  Then you use for this purpose deborphans.  But this
morning I did a little experiment (see thread `deborphan') and it came out that
neither deborphan seems to actually remove those orphans packages.  The
solution seems so to be that pencil and paper should take note *also* of those
children or configuration files and not only of the main packages - in future.
In the present, erase and reinstall.

It seems to me not very enthusiastical all this.  To you?

Thanks,

Rodolfo



Re: Manually installed packages

2016-12-01 Thread Curt
On 2016-12-01, David Wright  wrote:
> On Wed 30 Nov 2016 at 08:47:21 (-0500), Stefan Monnier wrote:
>> > apt-mark showmanual   gives you the complement of   apt-mark showauto.
>> > The second paragraph of apt-mark's description explains what's meant
>> > by "auto". So "manual" doesn't mean what you appear to assume it does,
>> > that you were involved in manually selecting it for installation. It
>> > just means "not auto".
>> 
>> To me "auto" means "not manually",
>
> Yes, auto and manual are anotnyms.
>
>> so I'm just as confused as Rodolfo
>> and I think for good reasons.
>
> I don't know whether Rodolfo is still confused after the explanation
> I gave. AFAICT once you realise that manual means "not marked as auto"
> rather than "I installed this by typing apt* ", then it's
> fairly obvious that "manual" is a bucket term that includes, for
> example, packages installed by the debian-installer because they're
> essential, with Priority: required.

I think in the OP's case having asked for the whole Gnome kit and
caboodle upon installation he's got lots of stuff he might not even be
aware of necessarily that doesn't fall into the auto category (or the
high priority required category either), but that he didn't expressly
install. I guess I'm just repeating what you already said though. I
suppose the confusion derives from the fact that the word manual
connotes "requiring human effort," and certain manual packages appear
on our systems effortlessly. 

> I can't remember installing bash or grep, but they're certainly not
> auto, so they're going to be "unmarked auto", or "marked non-auto",
> or "marked manual". I think I'll stick to the last. What would
> you prefer?

>> There might be technical reasons behind
>> the way it currently works, but I think this qualifies as a bug (maybe
>> a UI bug, maybe a coding bug, maybe a doc bug).
>
> *What* qualifies as a bug...that you're confused?
>
> Cheers,
> David.
>
>


-- 
“It is enough that the arrows fit exactly in the wounds that they have made.”
Franz Kafka



Re: Manually installed packages

2016-12-01 Thread David Wright
On Wed 30 Nov 2016 at 08:47:21 (-0500), Stefan Monnier wrote:
> > apt-mark showmanual   gives you the complement of   apt-mark showauto.
> > The second paragraph of apt-mark's description explains what's meant
> > by "auto". So "manual" doesn't mean what you appear to assume it does,
> > that you were involved in manually selecting it for installation. It
> > just means "not auto".
> 
> To me "auto" means "not manually",

Yes, auto and manual are anotnyms.

> so I'm just as confused as Rodolfo
> and I think for good reasons.

I don't know whether Rodolfo is still confused after the explanation
I gave. AFAICT once you realise that manual means "not marked as auto"
rather than "I installed this by typing apt* ", then it's
fairly obvious that "manual" is a bucket term that includes, for
example, packages installed by the debian-installer because they're
essential, with Priority: required.

I can't remember installing bash or grep, but they're certainly not
auto, so they're going to be "unmarked auto", or "marked non-auto",
or "marked manual". I think I'll stick to the last. What would
you prefer?

> There might be technical reasons behind
> the way it currently works, but I think this qualifies as a bug (maybe
> a UI bug, maybe a coding bug, maybe a doc bug).

*What* qualifies as a bug...that you're confused?

Cheers,
David.



Re: Manually installed packages

2016-11-30 Thread Stefan Monnier
> apt-mark showmanual   gives you the complement of   apt-mark showauto.
> The second paragraph of apt-mark's description explains what's meant
> by "auto". So "manual" doesn't mean what you appear to assume it does,
> that you were involved in manually selecting it for installation. It
> just means "not auto".

To me "auto" means "not manually", so I'm just as confused as Rodolfo
and I think for good reasons.  There might be technical reasons behind
the way it currently works, but I think this qualifies as a bug (maybe
a UI bug, maybe a coding bug, maybe a doc bug).


Stefan



Re: Manually installed packages

2016-11-30 Thread Jörg-Volker Peetz
Here you have the answer to your own question.
Use apt-mark to mark the packages you want to keep and all "required" packages
as "manual"ly installed. Then mark all other packages as "auto".
Then let
  apt-get autoremove
do its work.

After that, use e.g. aptitude to remove remaining configuration files with
  aptitude purge '~c'

Regards,
jvp.




Re: Manually installed packages (was: Uninstalling Gnome)

2016-11-29 Thread Cindy-Sue Causey
On 11/29/16, David Wright  wrote:
> On Tue 29 Nov 2016 at 23:45:51 (+), Rodolfo Medina wrote:
>>
>> If I run `apt-mark showmanual', a list of packages is ouput that are
>> supposed
>> to have been manually installed on my system but that actually I don't at
>> all
>> remember ever installing neither do I believe they truly have been nay I'm
>> sure
>> they haven't...  Any people could explain that?
>
> apt-mark showmanual   gives you the complement of   apt-mark showauto.
> The second paragraph of apt-mark's description explains what's meant
> by "auto". So "manual" doesn't mean what you appear to assume it does,
> that you were involved in manually selecting it for installation. It
> just means "not auto".


I just played along here by running apt-mark. I received back a LONG
list that is "fine by me", i.e. nothing to sweat over on my end,
because of how upgrading has been going lately. That "no sweat"
reaction is because David's response brought back to mind that I see
the following sometimes after running "apt-get install" for an already
up-to-date package::

+
libilmbase12 is already the newest version (2.2.0-11).
libilmbase12 set to manually installed.
+

I had to work hard to find something that wasn't on the list apt-mark
had just given me. /var/log/apt/history.log.1 was my friend there.

Everything else that I tried turned out to already be on the apt-mark
generated list. Attempts at "accidentally" installing packages already
on the apt-mark list all simply responded back with the "is already
the newest version" line.

It's tied in. libilmbase12 was NOT in my initial apt-mark showmanual
query response. It IS on that list now.

Cindy :)

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

* runs with plastic sporks *



Re: Manually installed packages (was: Uninstalling Gnome)

2016-11-29 Thread David Wright
On Tue 29 Nov 2016 at 23:45:51 (+), Rodolfo Medina wrote:
> Rodolfo Medina  writes:
> 
> > When I freshly installed Debian on my present system, I chose Gnome as my
> > Desktop manager, then I switched to Openbox.  To free space, now I want to
> > remove all those Gnome packages that I haven't used any more but am not sure
> > what of them I may delete without perturbing the system.  How can I know?
> > More in general, is there a way to know what packages one is not using and 
> > so
> > can be removed?
> 
> 
> If I run `apt-mark showmanual', a list of packages is ouput that are supposed
> to have been manually installed on my system but that actually I don't at all
> remember ever installing neither do I believe they truly have been nay I'm 
> sure
> they haven't...  Any people could explain that?

apt-mark showmanual   gives you the complement of   apt-mark showauto.
The second paragraph of apt-mark's description explains what's meant
by "auto". So "manual" doesn't mean what you appear to assume it does,
that you were involved in manually selecting it for installation. It
just means "not auto".

Cheers,
David.



Manually installed packages (was: Uninstalling Gnome)

2016-11-29 Thread Rodolfo Medina
Rodolfo Medina  writes:

> When I freshly installed Debian on my present system, I chose Gnome as my
> Desktop manager, then I switched to Openbox.  To free space, now I want to
> remove all those Gnome packages that I haven't used any more but am not sure
> what of them I may delete without perturbing the system.  How can I know?
> More in general, is there a way to know what packages one is not using and so
> can be removed?


If I run `apt-mark showmanual', a list of packages is ouput that are supposed
to have been manually installed on my system but that actually I don't at all
remember ever installing neither do I believe they truly have been nay I'm sure
they haven't...  Any people could explain that?

Thanks, Cheers

Rodolfo



Re: list installed packages present only in stable

2016-11-04 Thread Jörg-Volker Peetz
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.




Re: list installed packages present only in stable

2016-11-04 Thread Jörg-Volker Peetz
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.





Re: list installed packages present only in stable

2016-11-04 Thread Jörg-Volker Peetz
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.




Re: list installed packages present only in stable

2016-11-03 Thread kamaraju kusumanchi
On Thu, Nov 3, 2016 at 9:08 AM, Jonathan Dowland  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



Re: list installed packages present only in stable

2016-11-03 Thread Mark Fletcher
On Thu, Nov 03, 2016 at 10:58:32AM +0100, steve wrote:
> Le 03-11-2016, à 18:40:57 +0900, Mark Fletcher a écrit :
> 
> 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'm with Kamaraju on this, zero output. I also tried quoting the search
> >string in case bash was interfering, made no difference.
> 
> That's really strange. This works on all my Debian Jessie boxes but not
> on my raspbian's one.
> 

Ah -- false alarm at least on my machine, sorry for the confusion. I was 
getting zero output when I tried this the other day, but I had forgotten 
that at that time I had previously had a failed run of aptitude update 
due to network dodginess (if you'll pardon the technical term) on 
Wednesday night Asia time -- BTW was there another DNS DDoS attack then? 
Everything went horribly Pete Tong on Wednesday evening and I couldn't 
find anything wrong locally, and everything was fine again by yesterday 
morning.

However, I had forgotten that I had run aptitude update and failed while 
the network was bejiggered. So Aptitude's notion of what it had going on 
was in a mess. Once I realised this I re-ran aptitude update and now, 
aptitude search ~Ajessie~i produces results.

Mark



Re: list installed packages present only in stable

2016-11-03 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Nov 03, 2016 at 03:48:23PM +0100, steve wrote:
> Le 03-11-2016, à 14:46:05 +0100, to...@tuxteam.de a écrit :
> 
> >>>Thanks. That's for your Debian Jessie boxes. Is that the same for your
> >>>Raspbian box?
> >>
> >>cat sources.list
> >>deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib
> >>non-free rpi
> >>
> >>and
> >>
> >>cat sources.list.d/raspi.list deb
> >>http://archive.raspberrypi.org/debian/ jessie main ui
> >
> >Hm. So my hunch was wrong ;-)
> 
> Funny enough, replacing 'jessie' by 'stable' on the Pi box gives a
> result:
> 
> aptitude search ~Astable~i | wc -l
> 1088

That was the other half of my hunch: archive and "suite" are interchanged
somewhere. But where?

regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgbWGoACgkQBcgs9XrR2kbGOwCdFs1TxehepgcA6gKN7AgdHKFf
JhcAn1e7ykKqOaQMEieEveWZmsQKcHlZ
=eZa5
-END PGP SIGNATURE-



Re: list installed packages present only in stable

2016-11-03 Thread steve

Le 03-11-2016, à 14:46:05 +0100, to...@tuxteam.de a écrit :


>Thanks. That's for your Debian Jessie boxes. Is that the same for your
>Raspbian box?

cat sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib
non-free rpi

and

cat sources.list.d/raspi.list deb
http://archive.raspberrypi.org/debian/ jessie main ui


Hm. So my hunch was wrong ;-)


Funny enough, replacing 'jessie' by 'stable' on the Pi box gives a
result:

aptitude search ~Astable~i | wc -l
1088



Re: list installed packages present only in stable

2016-11-03 Thread David Wright
On Thu 03 Nov 2016 at 14:46:05 (+0100), to...@tuxteam.de wrote:
> On Thu, Nov 03, 2016 at 02:29:07PM +0100, steve wrote:
> > Le 03-11-2016, à 13:58:49 +0100, to...@tuxteam.de a écrit :
> > 
> > >On Thu, Nov 03, 2016 at 01:51:54PM +0100, steve wrote:
> > >>Le 03-11-2016, à 12:45:46 +0100, to...@tuxteam.de a écrit :
> > >>
> > >>>Just wondering: what's the respective content of the 
> > >>>/etc/apt/sources.list
> > >>>and children?
> > >>
> > >>deb http://httpredir.debian.org/debian/ jessie main
> > >>deb-src http://httpredir.debian.org/debian/ jessie main
> > >
> > >[...]
> > 
> > Which means ?
> > 
> > 
> > >>which is pretty standard isn't?
> > >
> > >Thanks. That's for your Debian Jessie boxes. Is that the same for your
> > >Raspbian box?
> > 
> > cat sources.list
> > deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib
> > non-free rpi
> > 
> > and
> > 
> > cat sources.list.d/raspi.list deb
> > http://archive.raspberrypi.org/debian/ jessie main ui
> 
> Hm. So my hunch was wrong ;-)
> 
> That's really interesting: where does apt-cache get the archive from?
> The packages themselves don't "know" to what archive (or suite) they
> belong -- they may well belong to several different archives and/or
> suites.

I find these searches very difficult to interpret. Perhaps I need to
immerse myself in the terminology and mechanisms behind aptitude etc.

$ aptitude search ~Ajessie~i | wc -l
185
$ aptitude search ~Astable~i | wc -l
2316
$ cat /etc/apt/sources.list
# jessie
# the word above is the name my functions etc use for the distribution because
# lsb_release can be unreliable and slow when running an unreleased 
distribution.
# one hash, one space, one word, end of line.

# Original installation from ...

# deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official i386 CD Binary-1 
20110205-17:27]/ squeeze main

# ... but upgraded to wheezy when it was still testing.
# ... then upgraded to jessie when it was still testing.

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free

deb http://ftp.us.debian.org/debian jessie-backports main contrib non-free
#deb-src http://ftp.us.debian.org/debian jessie-backports main contrib non-free

deb http://ftp.us.debian.org/debian testing main contrib non-free

#
$ 

No trace of the word "stable" in my sources.list and never has been,
unless the squeeze CD originally wrote it there before I changed it
almost straight away.

Cheers,
David.



Re: list installed packages present only in stable

2016-11-03 Thread steve

>Thanks. That's for your Debian Jessie boxes. Is that the same for your
>Raspbian box?

cat sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib
non-free rpi

and

cat sources.list.d/raspi.list deb
http://archive.raspberrypi.org/debian/ jessie main ui


Hm. So my hunch was wrong ;-)

That's really interesting: where does apt-cache get the archive from?


I'm asking myself the same question. Let's take xterm as an example.

$ apt-cache policy xterm
xterm:
 Installé : 312-2
 Candidat : 312-2
Table de version :
*** 312-2 0
   500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
   500 http://ftp.ch.debian.org/debian/ jessie/main amd64 Packages
   100 /var/lib/dpkg/status

In the /var/lib/dpkg/status file, one reads:

Package: xterm
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 1709
Maintainer: Debian X Strike Force 
Architecture: amd64
Multi-Arch: foreign
Version: 312-2
Provides: x-terminal-emulator
Depends: xbitmaps, libc6 (>= 2.15), libfontconfig1 (>= 2.11), libice6 (>= 1:1.0.0), 
libtinfo5, libutempter0 (>= 1.1.5), libx11-6, libxaw7, libxft2 (>> 2.1.1), libxmu6, 
libxpm4, libxt6
Recommends: x11-utils
Suggests: xfonts-cyrillic

etc…

which shows no info on the archive's name. BTW, it seems that aptitude uses
that file when executed with the 'show' action.


The packages themselves don't "know" to what archive (or suite) they
belong -- they may well belong to several different archives and/or
suites.



aptitude knows from which archive the installed package come from (the ~A
regex). But I still don't understand why it works on my Debian boxes and not on
yours or the OP's (and on my raspbian). 



Re: list installed packages present only in stable

2016-11-03 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Nov 03, 2016 at 02:29:07PM +0100, steve wrote:
> Le 03-11-2016, à 13:58:49 +0100, to...@tuxteam.de a écrit :
> 
> >On Thu, Nov 03, 2016 at 01:51:54PM +0100, steve wrote:
> >>Le 03-11-2016, à 12:45:46 +0100, to...@tuxteam.de a écrit :
> >>
> >>>Just wondering: what's the respective content of the /etc/apt/sources.list
> >>>and children?
> >>
> >>deb http://httpredir.debian.org/debian/ jessie main
> >>deb-src http://httpredir.debian.org/debian/ jessie main
> >
> >[...]
> 
> Which means ?
> 
> 
> >>which is pretty standard isn't?
> >
> >Thanks. That's for your Debian Jessie boxes. Is that the same for your
> >Raspbian box?
> 
> cat sources.list
> deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib
> non-free rpi
> 
> and
> 
> cat sources.list.d/raspi.list deb
> http://archive.raspberrypi.org/debian/ jessie main ui

Hm. So my hunch was wrong ;-)

That's really interesting: where does apt-cache get the archive from?
The packages themselves don't "know" to what archive (or suite) they
belong -- they may well belong to several different archives and/or
suites.

Hmmm.

regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgbP50ACgkQBcgs9XrR2kar9gCfW19VQ3cil3J1lWEbEqIrvWft
/vsAnAnIb7VqSLav2lpUIg3+SAT/fdLf
=O6AT
-END PGP SIGNATURE-



Re: list installed packages present only in stable

2016-11-03 Thread steve

Le 03-11-2016, à 13:58:49 +0100, to...@tuxteam.de a écrit :


On Thu, Nov 03, 2016 at 01:51:54PM +0100, steve wrote:

Le 03-11-2016, à 12:45:46 +0100, to...@tuxteam.de a écrit :

>Just wondering: what's the respective content of the /etc/apt/sources.list
>and children?

deb http://httpredir.debian.org/debian/ jessie main
deb-src http://httpredir.debian.org/debian/ jessie main


[...]


Which means ?



which is pretty standard isn't?


Thanks. That's for your Debian Jessie boxes. Is that the same for your
Raspbian box?


cat sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib
non-free rpi

and

cat sources.list.d/raspi.list 
deb http://archive.raspberrypi.org/debian/ jessie main ui



So "jessie" shows as the archive name.



Re: list installed packages present only in stable

2016-11-03 Thread Jonathan Dowland
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.


signature.asc
Description: Digital signature


Re: list installed packages present only in stable

2016-11-03 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Nov 03, 2016 at 01:51:54PM +0100, steve wrote:
> Le 03-11-2016, à 12:45:46 +0100, to...@tuxteam.de a écrit :
> 
> >Just wondering: what's the respective content of the /etc/apt/sources.list
> >and children?
> 
> deb http://httpredir.debian.org/debian/ jessie main
> deb-src http://httpredir.debian.org/debian/ jessie main

[...]

> which is pretty standard isn't?

Thanks. That's for your Debian Jessie boxes. Is that the same for your
Raspbian box?

regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgbNIkACgkQBcgs9XrR2kZZtACeLBmbnDS8e2SW+8pT2zZ8iffd
Yw4AnRQLnCdi9IVYffhU7szlBodmb+cE
=JVvz
-END PGP SIGNATURE-



Re: list installed packages present only in stable

2016-11-03 Thread steve

Le 03-11-2016, à 12:45:46 +0100, to...@tuxteam.de a écrit :


Just wondering: what's the respective content of the /etc/apt/sources.list
and children?


deb http://httpredir.debian.org/debian/ jessie main
deb-src http://httpredir.debian.org/debian/ jessie main

deb http://ftp.ch.debian.org/debian/ jessie main non-free contrib
deb-src http://ftp.ch.debian.org/debian/ jessie main non-free contrib

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

# jessie-updates, previously known as 'volatile'
deb http://ftp.ch.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.ch.debian.org/debian/ jessie-updates main contrib non-free

# backports
deb http://ftp.ch.debian.org/debian jessie-backports main contrib

deb http://www.deb-multimedia.org jessie main non-free

# version release de firefox
deb http://mozilla.debian.net/ jessie-backports firefox-release

which is pretty standard isn't?



Re: list installed packages present only in stable

2016-11-03 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Nov 03, 2016 at 10:58:32AM +0100, steve wrote:
> Le 03-11-2016, à 18:40:57 +0900, Mark Fletcher a écrit :
> 
> 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'm with Kamaraju on this, zero output. I also tried quoting the search
> >string in case bash was interfering, made no difference.
> 
> That's really strange. This works on all my Debian Jessie boxes but not
> on my raspbian's one.

Just wondering: what's the respective content of the /etc/apt/sources.list
and children?

Regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgbI2oACgkQBcgs9XrR2kaS5QCfUmsjjQ73DJww/JeWWYO3fbYK
eJAAnRPa/7wt+lEo5NeC4wM1zxcRfNT5
=pXcu
-END PGP SIGNATURE-



Re: list installed packages present only in stable

2016-11-03 Thread steve

Le 03-11-2016, à 18:40:57 +0900, Mark Fletcher a écrit :


>>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'm with Kamaraju on this, zero output. I also tried quoting the search
string in case bash was interfering, made no difference.


That's really strange. This works on all my Debian Jessie boxes but not
on my raspbian's one.

See
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_basic_package_management_operations

for more info. In particular table 2.11 where one can read:

match archive   ~A{jessie,stretch,sid}


Could someone else try on their box?

Best,
Steve



Re: list installed packages present only in stable

2016-11-03 Thread Mark Fletcher
On Thu, Nov 03, 2016 at 08:36:59AM +0100, steve wrote:
> 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'm with Kamaraju on this, zero output. I also tried quoting the search 
string in case bash was interfering, made no difference.

Mark



Re: list installed packages present only in stable

2016-11-03 Thread steve

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




Re: list installed packages present only in stable

2016-11-02 Thread kamaraju kusumanchi
On Wed, Nov 2, 2016 at 6:45 AM, steve  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



Re: list installed packages present only in stable

2016-11-02 Thread kamaraju kusumanchi
On Wed, Nov 2, 2016 at 6:16 AM, Jonathan Dowland <j...@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



Re: list installed packages present only in stable

2016-11-02 Thread steve

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?



Re: list installed packages present only in stable

2016-11-02 Thread Jonathan Dowland
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.


signature.asc
Description: Digital signature


Re: list installed packages present only in stable

2016-11-01 Thread kamaraju kusumanchi
On Sun, Oct 23, 2016 at 8:48 PM, kamaraju kusumanchi
<raju.mailingli...@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   pkgis_installed  jessie  stretch  sid
python3.4  python3.4  True  TrueFalseFalse
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  TrueTrue 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



Re: list installed packages present only in stable

2016-10-29 Thread Rick Thomas

On Oct 23, 2016, at 5:48 PM, kamaraju kusumanchi <raju.mailingli...@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


Re: list installed packages present only in stable

2016-10-26 Thread Michael Lange
On Wed, 26 Oct 2016 08:16:56 -0400
kamaraju kusumanchi  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.



Re: list installed packages present only in stable

2016-10-26 Thread Frank

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



Re: list installed packages present only in stable

2016-10-26 Thread kamaraju kusumanchi
On Wed, Oct 26, 2016 at 5:15 AM, Michael Lange  wrote:
> On Tue, 25 Oct 2016 23:36:02 -0400
>
> Hmmm...
> Here I get:
> $ apt-show-versions -b | grep "\"
> 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



Re: list installed packages present only in stable

2016-10-26 Thread Michael Lange
On Tue, 25 Oct 2016 23:36:02 -0400
kamaraju kusumanchi  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  amd64Interactive 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: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: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



Re: list installed packages present only in stable

2016-10-25 Thread kamaraju kusumanchi
On Tue, Oct 25, 2016 at 1:49 PM, Michael Lange  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  amd64Interactive 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: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



Re: list installed packages present only in stable

2016-10-25 Thread Michael Lange
On Tue, 25 Oct 2016 11:24:00 -0400
Cindy-Sue Causey  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!



Re: list installed packages present only in stable

2016-10-25 Thread Cindy-Sue Causey
On 10/23/16, 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?
>
> 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) *



list installed packages present only in stable

2016-10-23 Thread kamaraju kusumanchi
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



Re: Should I find installed packages in /usr/share/menu

2015-11-04 Thread humbert . olivier . 1
Hi,

... zip ...

> Should I find installed packages like libreoffice - claws-mail - gedit
> etc., in my /usr/share/menu?

... zip ..

> Maybe the system has become accustomed to me doing this manually and
> decided to let me do it?

... zip ...

You might want to read at : 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741573

Cheers,
Olivier



Should I find installed packages in /usr/share/menu

2015-11-04 Thread Charlie


Using debian stretch 4.2.0-1-amd64

FVWM

Should I find installed packages like libreoffice - claws-mail - gedit
etc., in my /usr/share/menu?

They are missing there and therefore they are also missing in my Debian
menu.

I can put them into the Debian menu manually,
in /etc/X11/fvwm/menudefs.hook 

Previously I only ever had to put some packages like gwenview and kate
into it manually, but now there are lot more that require manual
insertion?

Maybe the system has become accustomed to me doing this manually and
decided to let me do it?

Just wondering.

It seems a bit tricky. The README in /usr/share/menu points me
to /usr/share/menu/default where I might source more information, but
it doesn't exist? Just tricking me I suppose?

Charlie

-- 
Registered Linux User:- 329524
***

Destiny is not a matter of chance, it is a matter of choice; it
is not a thing to be waited for, it is a thing to be
achieved... W J Bryan

***

Debian GNU/Linux - Magic indeed.

-



Re: All installed packages disappeared from aptitude

2015-04-28 Thread Liam O'Toole
On 2015-04-27, Patrick Wiseman pwise...@gmail.com wrote:
 Hello:

 I just updated and upgraded a 'testing' system (so listed in
 sources.list) and aptitude shows no installed packages. Here's a
 typical aptitude entry:

 i A apache2 2.4.10-9 none

 and another:

 ih perl 5.20.1-5 none

 (The 'h' because I put it on hold when I saw it was among many
 potentially broken packages.)

 As you see, 'i' indicates that the packages _are_ installed, but it's
 the 'none' which concerns me, because on its entry page, aptitude
 lists NO installed packages. If I reboot, I suspect everything's going
 to disappear.

 Is there any way to recover, without rebooting, from this potential disaster?

 Thanks
 Patrick


I hope that Darac's suggestion works for you.

As an aside, are you sure that you still want to be on 'testing'? It
will be pretty chaotic for the next few weeks.

-- 

Liam



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/slrnmjvfbg.dj4.liam.p.otoole@dipsy.tubbynet



Re: All installed packages disappeared from aptitude

2015-04-27 Thread Darac Marjal
On Mon, Apr 27, 2015 at 11:19:36AM -0400, Patrick Wiseman wrote:
 Hello:
 
 I just updated and upgraded a 'testing' system (so listed in
 sources.list) and aptitude shows no installed packages. Here's a
 typical aptitude entry:
 
 i A apache2 2.4.10-9 none
 
 and another:
 
 ih perl 5.20.1-5 none
 
 (The 'h' because I put it on hold when I saw it was among many
 potentially broken packages.)
 
 As you see, 'i' indicates that the packages _are_ installed, but it's
 the 'none' which concerns me, because on its entry page, aptitude
 lists NO installed packages. If I reboot, I suspect everything's going
 to disappear.
 
 Is there any way to recover, without rebooting, from this potential disaster?

Relax. none doesn't mean that the package has been removed. As you
say yourself, the i means that the package is installed and there is
no intention to remove it. What the none DOES mean is that there is
no candidate to install this package. This is basically what you see if
you dpkg -i a deb - the package becomes installed, but there's no
origin for that package so apt can't check if it needs updating etc.

Now, if ALL your packages have ended up like this, then it probably just
means an issue with either your repository server or your package lists.
Try re-updating the lists (in aptitude, press 'u') and keep an eye out
for any errors (red lines or red dialog boxes in aptitude).

 
 Thanks
 Patrick
 
 
 -- 
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: 
 https://lists.debian.org/cajvvkspckpogmr6wgd0e0jqgznu0hy69mfkecth-he829zu...@mail.gmail.com
 


signature.asc
Description: Digital signature


All installed packages disappeared from aptitude

2015-04-27 Thread Patrick Wiseman
Hello:

I just updated and upgraded a 'testing' system (so listed in
sources.list) and aptitude shows no installed packages. Here's a
typical aptitude entry:

i A apache2 2.4.10-9 none

and another:

ih perl 5.20.1-5 none

(The 'h' because I put it on hold when I saw it was among many
potentially broken packages.)

As you see, 'i' indicates that the packages _are_ installed, but it's
the 'none' which concerns me, because on its entry page, aptitude
lists NO installed packages. If I reboot, I suspect everything's going
to disappear.

Is there any way to recover, without rebooting, from this potential disaster?

Thanks
Patrick


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/cajvvkspckpogmr6wgd0e0jqgznu0hy69mfkecth-he829zu...@mail.gmail.com



Re: find all installed packages from a specific release

2014-11-02 Thread Andrei POPESCU
On Du, 02 nov 14, 00:57:45, kamaraju kusumanchi wrote:
 
 Thanks. This is useful and solves my first question.

Oh, missed that one[1]. Aptitude, at least in interactive mode can do 
it, because it presents a Security Updates (or something like that) 
package group. One can just Shift-U on the group to update just those 
packages.

For the commandline it should be possible to come up with a pattern that 
finds upgradeable packages from a certain archive (origin?). Then it's 
only a matter of substituting 'search' with 'install'[2].

See chapter 2 in the aptitude user's manual (package aptitude-doc-en).

[1] maybe you shouldn't post unrelated questions in the same message?
[2] APT tools usually don't have a 'upgrade-package [list]' command, 
because 'install' does it.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


find all installed packages from a specific release

2014-11-01 Thread kamaraju kusumanchi
How do I find packages installed on my machine that belong to a specific
Debian release?

In my case, I have the following entries in my sources.list

rajulocal@hogwarts:~$ stuff.pl /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

Now, I want to retire the squeeze mirror. But before I do that I'd like to
find all the packages installed on my machine from this mirror. Then I can
decide whether I want to upgrade or delete or keep then as-is. Is there a
way to find that out?

Also, in the KDE panel, I get a notification such as

You should update your system.
There are 1,612 updates,
and 7 security updates.

In this case, I just want to perform the 7 security updates but do not want
to update all the 1612 updates. Is there any way to pick and choose?

I guess one way to comment out the non-security mirrors in the sources.list
and do upgrade. But I am wondering if there is a better approach?

thanks
raju
-- 
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/


Re: find all installed packages from a specific release

2014-11-01 Thread Andrei POPESCU
On Sb, 01 nov 14, 18:12:35, kamaraju kusumanchi wrote:
 
 Now, I want to retire the squeeze mirror. But before I do that I'd like to
 find all the packages installed on my machine from this mirror. Then I can
 decide whether I want to upgrade or delete or keep then as-is. Is there a
 way to find that out?

I think this should do it

aptitude search '?narrow(?installed,?archive(oldstable))'

You can replace the 'search' with 'remove' or 'purge' if you're 
satisfied with the result.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


Re: find all installed packages from a specific release

2014-11-01 Thread kamaraju kusumanchi
On Sat, Nov 1, 2014 at 7:38 PM, Andrei POPESCU andreimpope...@gmail.com
wrote:

 I think this should do it

 aptitude search '?narrow(?installed,?archive(oldstable))'


Thanks. This is useful and solves my first question.

raju
-- 
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/


Re: List installed packages sorted by size.

2014-03-26 Thread Andrei POPESCU
On Mi, 26 mar 14, 15:07:58, Chris Bannister wrote:
 Hi,
 
 Could be useful to someone:
 dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | less

See also:
popcon-largest-unused(8)

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


Re: List installed packages sorted by size.

2014-03-26 Thread Karl E. Jorgensen
Hi

On Wed, Mar 26, 2014 at 03:07:58PM +1300, Chris Bannister wrote:
 Hi,
 
 Could be useful to someone:
 dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | less

Nice. But

dpigs -20

(from the debian-goodies package) is still shorter :-) 

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140326082619.GA19438@hawking



Re: List installed packages sorted by size.

2014-03-26 Thread Raffaele Morelli
2014-03-26 9:26 GMT+01:00 Karl E. Jorgensen k...@jorgensen.org.uk:

 Hi

 On Wed, Mar 26, 2014 at 03:07:58PM +1300, Chris Bannister wrote:
  Hi,
 
  Could be useful to someone:
  dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | less

 Nice. But

 dpigs -20


dpig -n 20


List installed packages sorted by size.

2014-03-25 Thread Chris Bannister
Hi,

Could be useful to someone:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | less

-- 
If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the 
oppressing. --- Malcolm X


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140326020757.GC6842@tal



Re: Make aptitude's limit function list installed packages from testing

2014-02-18 Thread Peter Schott

Thank you Tom, this works as expected.

I was expecting ~A to match far less, but on second thought there will 
be enough cases where the broader scope is essential.


All the best,
Peter

On 17.02.2014 22:04, Tom H wrote:

What is the correct filter to:
- list all installed packages coming from testing release;
- while *not* listing installed packages from other releases (e.g. stable)
for which an alternative version from testing is available?


aptitude search ~S~i ~Atesting'



--
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/53036691.2010...@ivao.de



Make aptitude's limit function list installed packages from testing

2014-02-17 Thread Peter Schott

Hello all,

on a system I operate, Debian Squeeze 6.09 has been installed. At one 
point, it was necessary to install a more recent version of roundcube 
(web-mail client) out of the testing release. This of course caused some 
other packages to be updated to testing, too.


My objective is as follows:
Produce a list of installed packages whose presently installed version 
is from the testing archive.


The /etc/sources.list currently holds references to squeeze/updates 
(debian-security), main squeeze stable release, squeeze-updates, 
squeeze-backports; and to the testing release. Through apt-pinning the 
squeeze-backports was given a higher priority than testing, in order to 
avoid packages installed from backports to drift over to testing.


According to the Debian Reference, chapter 2.2.7. The aptitude regex 
formula [1], this aptitude filter seemed appropriate to me:

~i~Atesting

[1] 
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_the_aptitude_regex_formula


However, this filter lists all installed packages, regardless of their 
presently installed source archive, who offer a version from testing, 
too. (Which are of course many, if not all.) I tried to use the filter 
~V (for package version), but there is no common pattern to packages 
version I am aware of that would improve the search.


What is the correct filter to:
- list all installed packages coming from testing release;
- while *not* listing installed packages from other releases (e.g. 
stable) for which an alternative version from testing is available?


Can this be achieved?


With kind regards,
Peter


--
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/5302677c.7040...@ivao.de



Re: Make aptitude's limit function list installed packages from testing

2014-02-17 Thread Tom H
On Mon, Feb 17, 2014 at 2:48 PM, Peter Schott peter.sch...@ivao.de wrote:

 What is the correct filter to:
 - list all installed packages coming from testing release;
 - while *not* listing installed packages from other releases (e.g. stable)
 for which an alternative version from testing is available?

aptitude search ~S~i ~Atesting'

(with thanks to Daniel Burrows for explaining ?narrow/~S on this
list a few years ago)


-- 
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/CAOdo=swkxs3tq3sqz4hfbabbiggw5d0m4lmg6u5mvr5qf+q...@mail.gmail.com



Get list of installed packages

2014-02-06 Thread Tino Sino

It has been asked before, but with different answers, e.g.:
1) dpkg-query --list | awk '/^ii +/ { print $2; }'
2) dpkg --get-selections | cut -f 1
3) ... etc ...
Given that the output is the same:
$ diff \
   (dpkg --get-selections | cut -f 1) \
   (dpkg-query --list | awk '/^ii +/ { print $2; }') \
   echo same-output
same-output
I wonder, what's the golden way to do this and why?


--
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/52f388e4.6000...@gmail.com



Re: Get list of installed packages

2014-02-06 Thread Gian Uberto Lauri
Tino Sino writes:
  It has been asked before, but with different answers, e.g.:
  1) dpkg-query --list | awk '/^ii +/ { print $2; }'
  2) dpkg --get-selections | cut -f 1
  3) ... etc ...
  Given that the output is the same:
  $ diff \
  (dpkg --get-selections | cut -f 1) \
  (dpkg-query --list | awk '/^ii +/ { print $2; }') \
  echo same-output
  same-output
  I wonder, what's the golden way to do this and why?

What's wrong in 

dpkg -l | grep ii

(you could use grep -e '^ii') or egrep '^ii', but I think it's not
worth the cpu used).

-- 
 /\   ___Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_   African word
  //--\| | \|  |   Integralista GNUslamicomeaning I can
\/ coltivatore diretto di software   not install
 già sistemista a tempo (altrui) perso...Debian

Warning: gnome-config-daemon considered more dangerous than GOTO


--
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/21235.35406.928239.298...@mail.eng.it



Re: Get list of installed packages

2014-02-06 Thread iijima yoshino
?? Thu, 06 Feb 2014 14:06:44 +0100
Tino Sino robottinos...@gmail.com :

 It has been asked before, but with different answers, e.g.:
 1) dpkg-query --list | awk '/^ii +/ { print $2; }'
 2) dpkg --get-selections | cut -f 1
 3) ... etc ...
 Given that the output is the same:
 $ diff \
 (dpkg --get-selections | cut -f 1) \
 (dpkg-query --list | awk '/^ii +/ { print $2; }') \
 echo same-output
 same-output
 I wonder, what's the golden way to do this and why?
 
 

dpkg -l 
It's simple.
Nothing is really golden or best, I think.


-- 
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/20140206211706.2279a255@debian



Re: Get list of installed packages

2014-02-06 Thread Paul Cartwright
On 02/06/2014 08:17 AM, iijima yoshino wrote:
 ?? Thu, 06 Feb 2014 14:06:44 +0100
 Tino Sino robottinos...@gmail.com :

 It has been asked before, but with different answers, e.g.:
 1) dpkg-query --list | awk '/^ii +/ { print $2; }'
 2) dpkg --get-selections | cut -f 1
 3) ... etc ...
 Given that the output is the same:
 $ diff \
 (dpkg --get-selections | cut -f 1) \
 (dpkg-query --list | awk '/^ii +/ { print $2; }') \
 echo same-output
 same-output
 I wonder, what's the golden way to do this and why?


 dpkg -l 
 It's simple.
 Nothing is really golden or best, I think.


because to use the package list for an install/reinstall you need to use
set-selections, like this:
   --set-selections
  Set package selections using file read from stdin. This 
file  should
  be  in  the  format  'package  state', where state is one
of install,
  hold, deinstall or purge. Blank lines  and  comment 
lines  beginning
  with '#' are also permitted.



-- 
Paul Cartwright
Registered Linux User #367800 and new counter #561587


-- 
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/52f38e5c.8050...@gmail.com



Re: Get list of installed packages

2014-02-06 Thread Nicolas Bercher

On 06/02/2014 14:06, Tino Sino wrote:

It has been asked before, but with different answers, e.g.:
1) dpkg-query --list | awk '/^ii +/ { print $2; }'
2) dpkg --get-selections | cut -f 1
3) ... etc ...
Given that the output is the same:
$ diff \
(dpkg --get-selections | cut -f 1) \
(dpkg-query --list | awk '/^ii +/ { print $2; }') \
echo same-output
same-output
I wonder, what's the golden way to do this and why?


Personaly, I use this:

  aptitude search ~i\!~M --disable-columns -F %p  aptitude-packages.txt

options:
 ~i   : installed packages
 \!~M : not automatically installed, in combination with ~i this means
you'll get a list of packages names you asked to
=aptitude install ...= explicitly (and not their respective
dependencies)
-F %p : format output to print only column of (untruncated) packages
  names
--disable-columns : disable trailing padd of white-spaces at the end of
lines (in my opinion, this should be better handled
by aptitude, i.e., no padding when only one column
is to be displayed, etc.)

Then restore packages this way:

  aptitude install $(cat aptitude-packages.txt)


Why do I use this?

Aptitude stores a flag for packages that were automatically
installed.  This is handy since the packages list you have to preserve
is really shorter than the whole installed packages list.  It makes
this list human readable and editable.

Nicolas


--
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/52f3936a.8030...@yahoo.fr



  1   2   3   4   5   >