I went down the list running apt-list --installed for each one, and I think all but one shows "installed" or some variant thereof. The one package that didn't was lshw - it's output was:
pi@raspberrypi:/etc/pihole $ apt list --installed lshw
Listing... Done
So I tried installing it with sudo apt-get install lshw, and it returned:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package lshw is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'lshw' has no installation candidate
So I'm stuck again, or this doesn't matter and the root cause is something else.
pi@raspberrypi:/etc/pihole $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
I'm guessing:
This may have been caused by your in-place upgrade.
It may have left behind package lists (as gathered by apt update) that would have suggested lshw to be available in one of Buster's lists, probably preventing further matches while failing to allow you downloading it, as Buster's repository wasn't configured anymore in sources.list.
Re-adding it could, then have allowed apt to download lshw from buster repos for installing.
The following should return which package lists would hold references to lshw:
Your debug log looks like a proper v6 one, with your Pi-hole's webserver running on ports 80 and 443, using unbound as upstream, and a nice v6 style pihole.toml configuration.
If you'd share the output hunting lshw, that may help us to better understand your issue and potentially help other users with update.sh: line 108 / Unable to install Pi-hole dependency package error messages.
grep: /var/lib/apt/lists/auxfiles: Is a directory
grep: /var/lib/apt/lists/partial: Is a directory
/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_bullseye_main_binary-armhf_Packages:16
I agree with your overall assessment; this was almost certainly a results of my ill-considered in-place upgrade. I had issues when I did it, but worked through the ones that popped up at the time. I should have known it would rear its ugly head again.
This still looks confusing/confused: apt knows a newer package is available from Bullseye, but it still refuses to list that as installation candidate.
You could consider to remove all those package lists and have apt rebuild them from repo sources.
Before you do so, you should remove that buster repository from /etc/apt/sources.list/sources.list first.
Then remove the package lists completely:
cd /var/lib/apt
sudo rm -r lists
After that, let apt rebuild them:
sudo apt update
Then recheck installation candidates for lshw:
sudo apt policy lshw
If that still doesn't pull Bullseye's 02.18.85-0.7, bringing in buster repos again would be an option, but it would probably be a better idea to flash a fresh RPi OS image to a new sd card, install Pi-hole and restore Teleporter backup.
@Bucking_Horn, in my troubleshooting before I happened upon the solution, I actually did all those steps you listed for purging the repo lists and letting them rebuild. The result was the same. That was when I decided to try listing the Buster repo, which resulted in a successful install of lshw.
Also, I removed the Buster repo listiing before I ran pihole -r, so it's gone and the command results I posted above reflect that state.
In any case, Pihole v6 is working great (and looks fantastic by the way), so let me get out of your way while you deal with other users! And if I have to deal with this again, I won't hesitate to reimage!