adopt: Remove APT sources of the old installation and report orphaned packages #64

Merged
kevinheyer merged 1 commit from adopt-foreign-sources into main 2026-11-23 12:28:28 +01:00
Owner

NodeSource, PGDG and mise stayed active after adopt.sh, so the postgresql
module installed the PGDG version and iac-compliance reported apt.foreign
(#48). adopt.sh now names every file in /etc/apt/sources.list.d without
"managed by iac" before the question, backs the directory up and removes
the files before the target state is established. After the run it lists
the packages no source offers any more and which of them Debian has too.
It removes nothing: some still carry data.

Tested: iac_adopt_foreign_sources and iac_adopt_report_packages in a
debian:13 container (foreign .sources and .list files found, a managed
file and debian.sources left, a handmade package and one newer than
Debian's reported with the downgrade hint); shellcheck -S warning.
Not tested: a complete adopt.sh run.

NodeSource, PGDG and mise stayed active after adopt.sh, so the postgresql module installed the PGDG version and iac-compliance reported apt.foreign (#48). adopt.sh now names every file in /etc/apt/sources.list.d without "managed by iac" before the question, backs the directory up and removes the files before the target state is established. After the run it lists the packages no source offers any more and which of them Debian has too. It removes nothing: some still carry data. Tested: iac_adopt_foreign_sources and iac_adopt_report_packages in a debian:13 container (foreign .sources and .list files found, a managed file and debian.sources left, a handmade package and one newer than Debian's reported with the downgrade hint); shellcheck -S warning. Not tested: a complete adopt.sh run.
adopt: Remove APT sources of the old installation and report orphaned packages
All checks were successful
/ lint (push) Successful in 13s
/ lint (pull_request) Successful in 11s
a76e8c2be0
NodeSource, PGDG and mise stayed active after adopt.sh, so the postgresql
module installed the PGDG version and iac-compliance reported apt.foreign
(#48). adopt.sh now names every file in /etc/apt/sources.list.d without
"managed by iac" before the question, backs the directory up and removes
the files before the target state is established. After the run it lists
the packages no source offers any more and which of them Debian has too.
It removes nothing: some still carry data.

Tested: iac_adopt_foreign_sources and iac_adopt_report_packages in a
debian:13 container (foreign .sources and .list files found, a managed
file and debian.sources left, a handmade package and one newer than
Debian's reported with the downgrade hint); shellcheck -S warning.
Not tested: a complete adopt.sh run.
Sign in to join this conversation.
No description provided.