octo-diff:
```
$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging bojimans
...
diff origin/production/bojimans.internal.softwareheritage.org current/bojimans.internal.softwareheritage.org
*******************************************
+ Apt::Pin[python3] =>
parameters =>
"codename": ""
"component": ""
"ensure": "present"
"explanation": "Pin python3.7 version so venv still works after bullseye upgrade"
"label": ""
"notify": "Package[python3-venv]"
"order": 50
"origin": ""
"originator": ""
"packages": ["python3"]
"priority": 1001
"release": ""
"release_version": ""
"version": "3.7.3-1"
*******************************************
+ Apt::Setting[pref-python3] =>
parameters =>
"ensure": "present"
"notify_update": false
"priority": 50
"content": >>>
# This file is managed by Puppet. DO NOT EDIT.
Explanation: Pin python3.7 version so venv still works after bullseye upgrade
Package: python3
Pin: version 3.7.3-1
Pin-Priority: 1001
<<<
*******************************************
+ File[/etc/apt/preferences.d/python3.pref] =>
parameters =>
"ensure": "present"
"group": "root"
"mode": "0644"
"owner": "root"
"content": >>>
# This file is managed by Puppet. DO NOT EDIT.
Explanation: Pin python3.7 version so venv still works after bullseye upgrade
Package: python3
Pin: version 3.7.3-1
Pin-Priority: 1001
<<<
*******************************************
*** End octocatalog-diff on bojimans.internal.softwareheritage.org
```
`vagrant up bojimans` and then `puppet agent --test`:
```
root@bojimans:/root# puppet agent --test
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for bojimans.internal.softwareheritage.org
Info: Applying configuration version '1639473399'
Notice: /Stage[main]/Profile::Static_hostnames/Host[somerset.internal.softwareheritage.org]/ensure: created
Info: Computing checksum on file /etc/hosts
Notice: /Stage[main]/Profile::Static_hostnames/Host[ns0.euwest.azure.internal.softwareheritage.org]/ensure: created
Notice: /Stage[main]/Profile::Netbox/Apt::Pin[python3]/Apt::Setting[pref-python3]/File[/etc/apt/preferences.d/python3.pref]/content:
--- /etc/apt/preferences.d/python3.pref 2021-12-14 09:00:14.173692182 +0000
+++ /tmp/puppet-file20211214-10027-z1lwxw 2021-12-14 09:16:45.309028031 +0000
@@ -1,5 +1,5 @@
# This file is managed by Puppet. DO NOT EDIT.
-Explanation: Pin python3.7 version so old venv still works after bullseye upgrade
+Explanation: Pin python3.7 version so venv still works after bullseye upgrade
Package: python3
Pin: version 3.7.3-1
Pin-Priority: 1001
Info: Computing checksum on file /etc/apt/preferences.d/python3.pref
Info: /Stage[main]/Profile::Netbox/Apt::Pin[python3]/Apt::Setting[pref-python3]/File[/etc/apt/preferences.d/python3.pref]: Filebucketed /etc/apt/preferences.d/python3.pref to puppet with sum 2a904a5bf26a71652466591111670fc8
Notice: /Stage[main]/Profile::Netbox/Apt::Pin[python3]/Apt::Setting[pref-python3]/File[/etc/apt/preferences.d/python3.pref]/content: content changed '{md5}2a904a5bf26a71652466591111670fc8' to '{md5}9f2eb64399150dd2ad135e687c64c4d2'
Info: Apt::Pin[python3]: Scheduling refresh of Package[python3-venv]
Notice: /Stage[main]/Ntp::Service/Service[ntp]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Ntp::Service/Service[ntp]: Unscheduling refresh on Service[ntp]
Notice: /Stage[main]/Profile::Systemd_journal::Journalbeat/Service[journalbeat]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Profile::Systemd_journal::Journalbeat/Service[journalbeat]: Unscheduling refresh on Service[journalbeat]
Notice: /Stage[main]/Profile::Netbox/Package[python3-venv]: Triggered 'refresh' from 1 event
Notice: Applied catalog in 3.57 seconds
```
Following the dist-upgrade to bullseye, the following is seen:
```
root@bojimans# $CMD upgrade
...
The following packages have been kept back:
facter gir1.2-glib-2.0 guile-2.2-libs libgirepository-1.0-1 libglib2.0-0 libpython2-stdlib libpython2.7
libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib mailutils mailutils-common ntp python2 python2-minimal
python2.7 python2.7-minimal python3-minimal python3-pykwalify python3-ruamel.yaml python3-six ruby ruby-augeas
ruby-filesystem ruby-json ruby-selinux ruby-shadow rubygems-integration unattended-upgrades
root@bojimans:/etc# dpkg -l python3-minimal
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============-============-============-===============================================================
ii python3-minimal 3.7.3-1 amd64 minimal subset of the Python language (default python3 version)
root@bojimans# $CMD dist-upgrade
...
The following packages have been kept back:
libpython3-stdlib ntp python3-minimal python3-pykwalify python3-ruamel.yaml
```
So, the pinning will work as expected.