Web lists-archives.com

Re: combining stable and testing in sources.list




There is a bit of misunderstanding here. Lines in /etc/apt/sources.list (as well as in sources.list.d) are just a description of used repositories. By itself they couldn't change anything in the OS. When you 'apt-get update' it downloads package lists. This is fine, as no damage was done yet. But when you use apt-get upgrade, or apt-get install (something), then those new package lists may mess up system. The reason is that some packages may have other packages as dependencies, and those dependencies from the newer debian version may conflict with existing ones, or cause some packages removal (f.e. some package may say that it 'replaces' some other package).

Rolling back this testing/stable mix is a huge pain. If you done some minor installation of something without dependencies, than you may just revert it back to older version. It there was a major update, then... Well, upgrade to testing and live with it. Or reinstall OS.

If you want to understand the state of your system, look here:

/var/log/apt/history.log - log of installations/upgrades
/var/log/apt/term.log - output of installation process

You can see currently installed packages: dpkg -l
For each package you can see 'policy' by using apt-cache policy command. It shows which version of a given package is coming from which release. F.e.: apt-cache policy xpad

The main pain point here is dependencies of dependencies... I was able few times roll back back upgrade, but it took me few hours of heavy work, and I couldn't recommend doing this to anyone.

TL;DR;

1. If you just added those lines in sources.list - just remove them
2. If you added them and used apt-get update - remove them and call apt-get update again
3. If you installed or upgraded your system after that - you have a problem

On 12/06/18 22:15, murtaugh@xxxxxxxxxxxxx wrote:

I mistakenly added two lines with 'testing' to my 'sources.list' file, which now looks like this:

deb http://debian.osuosl.org/debian/ stretch main non-free contrib
deb-src http://debian.osuosl.org/debian/ stretch main non-free contrib

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

deb http://debian.osuosl.org/debian/ stretch-updates main contrib non-free
deb-src http://debian.osuosl.org/debian/ stretch-updates main contrib non-free

# my bad:
deb http://ftp.us.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.us.debian.org/debian/ testing main non-free contrib

I have read that it's difficult or impossible to revert to 'stable' once 'testing' packages have been installed. I have also read that it's not a good idea to have both 'stable' and 'testing' repositories in 'sources.list', so I'm wondering how to proceed.  I experimented with replacing 'stretch' by 'buster' in the first six lines above (and removing the last two lines), but then the system couldn't find the stable google-chrome repository in '/etc/apt/sources.list.d'.  I now have the uncomfortable feeling that I'm playing with fire.

Thanks in advance for any suggestions about if/how I should edit my 'sources.list' file!

-Paul