message_to_user "Before dpkg, apt, or Pi-Apps will work, dphys-swapfile must be fixed.
message_to_user "Before dpkg, apt, or Pi-Apps will work, dphys-swapfile must be fixed.
Try Googling the above errors, or ask the Pi-Apps developers for help."
Try Googling the above errors, or ask the Pi-Apps developers for help."
fi
fi
#check for insufficient space errors
#check for insufficient space errors
if echo "$errors" | grep -q "You don't have enough free space in" ;then
if echo "$errors" | grep -qF "You don't have enough free space in" ;then
message_to_user "Package(s) failed to install because your system has insufficient disk space.
message_to_user "Package(s) failed to install because your system has insufficient disk space.
Please free up some space, then try again."
Please free up some space, then try again."
fi
fi
#check for unconfigured boot-firmware package
#check for unconfigured boot-firmware package
if echo "$errors" | grep -q "missing /boot/firmware, did you forget to mount it" || echo "$errors" | grep -q "u-boot-rpi" ;then
if echo "$errors" | grep -qF "missing /boot/firmware, did you forget to mount it" || echo "$errors" | grep -q "u-boot-rpi" ;then
message_to_user "Package(s) failed to install because your boot drive is not working.
message_to_user "Package(s) failed to install because your boot drive is not working.
You must fix the u-boot-rpi package before dpkg, apt, or Pi-Apps will work."
You must fix the u-boot-rpi package before dpkg, apt, or Pi-Apps will work."
@ -122,7 +122,7 @@ Please look at the above errors to see how long you have to wait."
fi
fi
#check for typo in sources.list and list.d
#check for typo in sources.list and list.d
if echo "$errors" | grep -q "The list of sources could not be read." ;then
if echo "$errors" | grep -qF "The list of sources could not be read." ;then
message_to_user "One or more sources contain a typo. Before APT or Pi-Apps will work, you must look around in /etc/apt/sources.list and /etc/apt/sources.list.d and fix the typo."
message_to_user "One or more sources contain a typo. Before APT or Pi-Apps will work, you must look around in /etc/apt/sources.list and /etc/apt/sources.list.d and fix the typo."
fi
fi
@ -135,7 +135,7 @@ Perhaps this link will help: https://askubuntu.com/questions/909719/dpkg-unrecov
fi
fi
#check for "Command line option --allow-releaseinfo-change is not understood"
#check for "Command line option --allow-releaseinfo-change is not understood"
if echo "$errors" | grep -q "Command line option --allow-releaseinfo-change is not understood" ;then
if echo "$errors" | grep -qF "Command line option --allow-releaseinfo-change is not understood" ;then
message_to_user "The Debian Project recently upgraded from Buster to version Bullseye. As a result, all Raspberry Pi OS Buster users will receive APT errors saying the repositories changed from 'stable' to 'oldstable'.
message_to_user "The Debian Project recently upgraded from Buster to version Bullseye. As a result, all Raspberry Pi OS Buster users will receive APT errors saying the repositories changed from 'stable' to 'oldstable'.
This error broke pi-apps. To fix it, the Pi-Apps developers added something to the 'sudo apt update' command: --allow-releaseinfo-change.
This error broke pi-apps. To fix it, the Pi-Apps developers added something to the 'sudo apt update' command: --allow-releaseinfo-change.
@ -154,10 +154,19 @@ Perhaps reinstalling the package would help?"
fi
fi
#check for "installed raspberrypi-kernel package post-installation script subprocess returned error exit status 1"
#check for "installed raspberrypi-kernel package post-installation script subprocess returned error exit status 1"
if echo "$errors" | grep -q "installed raspberrypi-kernel package post-installation script subprocess returned error exit status 1" ;then
if echo "$errors" | grep -qF "raspberrypi-kernel package post-installation script subprocess returned error exit status" ;then
message_to_user "The raspberrypi-kernel package on your system is causing problems.
message_to_user "The raspberrypi-kernel package on your system is causing problems.
Pi-Apps, dpkg and APT won't work properly until the problem is fixed.
Pi-Apps, dpkg and APT won't work properly until the problem is fixed.
Google the errors above this message, or ask in the Raspberry Pi Forums.
https://www.raspberrypi.org/forums"
fi
#check for "raspberrypi-bootloader package pre-installation script subprocess returned error exit status 2"
if echo "$errors" | grep -qF "raspberrypi-bootloader package pre-installation script subprocess returned error exit status" ;then
message_to_user "The raspberrypi-bootloader package on your system is causing problems.
Pi-Apps, dpkg and APT won't work properly until the problem is fixed.
Google the errors above this message, or ask in the Raspberry Pi Forums.
Google the errors above this message, or ask in the Raspberry Pi Forums.
https://www.raspberrypi.org/forums"
https://www.raspberrypi.org/forums"
fi
fi
@ -170,6 +179,11 @@ Maybe reinstalling it would help?
sudo apt install --reinstall nginx-full"
sudo apt install --reinstall nginx-full"
fi
fi
#check for "installed libwine-development:arm64 package post-installation script subprocess returned error exit status 1"
if echo "$errors" | grep -qF "libwine-development:arm64 package post-installation script subprocess returned error exit status" ;then
message_to_user "This error was not caused by Pi-Apps, it is caused by your libwine-development package."
fi
#check for "W: Did not understand pin type releace"
#check for "W: Did not understand pin type releace"
if echo "$errors" | grep -qF "Did not understand pin type" ;then
if echo "$errors" | grep -qF "Did not understand pin type" ;then
message_to_user "This error was not caused by Pi-Apps. Looks like there is a typo in your /etc/apt/sources.list"
message_to_user "This error was not caused by Pi-Apps. Looks like there is a typo in your /etc/apt/sources.list"