Re: Question on 'dpkg --get-selections'

2020-09-15 Thread Marc Shapiro



On 9/12/20 12:29 AM, Sven Joachim wrote:

On 2020-09-11 22:03 -0700, Marc Shapiro wrote:


Is there any option to have 'dpkg --get-selections' NOT include
automatically installed packages?

No, dpkg has no notion of automatically installed packages, that is an
apt concept.


Otherwise, all packages show as manually installed, including those
that would otherwise have been automatically installed.

You can obtain a list of automatically installed packages with
apt-mark(1):

$ apt-mark showauto > automatically-installed-packages

Then, on the replicated system where you presumably had used
"dpkg --set-selections" to install the same set of packages:

# apt-mark auto $(cat automatically-installed-packages)

HTH,
 Sven


Thank you.  That is a perfectly acceptable solution to the issue.

Marc



Re: Question on 'dpkg --get-selections'

2020-09-12 Thread Toni Mas Soler
I do this job using aptitude instead apt:
/usr/bin/aptitude search '~i !~M' -F '%p' --disable-columns

Toni Mas

Missatge de Sven Joachim  del dia ds., 12 de set.
2020 a les 9:29:
>
> On 2020-09-11 22:03 -0700, Marc Shapiro wrote:
>
> > Is there any option to have 'dpkg --get-selections' NOT include
> > automatically installed packages?
>
> No, dpkg has no notion of automatically installed packages, that is an
> apt concept.
>
> > Otherwise, all packages show as manually installed, including those
> > that would otherwise have been automatically installed.
>
> You can obtain a list of automatically installed packages with
> apt-mark(1):
>
> $ apt-mark showauto > automatically-installed-packages
>
> Then, on the replicated system where you presumably had used
> "dpkg --set-selections" to install the same set of packages:
>
> # apt-mark auto $(cat automatically-installed-packages)
>
> HTH,
> Sven
>



Re: Question on 'dpkg --get-selections'

2020-09-12 Thread Sven Joachim
On 2020-09-11 22:03 -0700, Marc Shapiro wrote:

> Is there any option to have 'dpkg --get-selections' NOT include
> automatically installed packages?

No, dpkg has no notion of automatically installed packages, that is an
apt concept.

> Otherwise, all packages show as manually installed, including those
> that would otherwise have been automatically installed.

You can obtain a list of automatically installed packages with
apt-mark(1):

$ apt-mark showauto > automatically-installed-packages

Then, on the replicated system where you presumably had used
"dpkg --set-selections" to install the same set of packages:

# apt-mark auto $(cat automatically-installed-packages)

HTH,
Sven



Question on 'dpkg --get-selections'

2020-09-11 Thread Marc Shapiro
Is there any option to have 'dpkg --get-selections' NOT include 
automatically installed packages?  Otherwise, all packages show as 
manually installed, including those that would otherwise have been 
automatically installed.



Marc