:: Re: [DNG] Script to migrate buster …
Página Inicial
Delete this message
Reply to this message
Autor: tito
Data:  
Para: dng
Assunto: Re: [DNG] Script to migrate buster desktop to beowulf v1.6
On Wed, 14 Apr 2021 16:01:02 +0000
g4sra via Dng <dng@???> wrote:

> >
>
> > This might be a good one to ask the users.
> >
>
> > fsmithred
> >
>
>
> Agreed.
>
> But if you did want to do it programmatically without parsing every
> sources.{d/*,conf}... Ask apt what it is cacheing...
>
> if [ -n "$(apt-cache policy | grep 'buster/non-free')" ]; then
> echo "yes include non-free repo";
> else
>
> echo "no don't!";
> fi


This will give false positives:

apt-cache policy | grep 'buster/non-free'
97 http://www.deb-multimedia.org buster/non-free amd64 Packages

So I think I will ask the user.

Ciao,
Tito