-
-
Notifications
You must be signed in to change notification settings - Fork 538
Description
Creating a bug report/issue
- I have searched the existing open and closed issues
Required Information
- DietPi version |
cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=1
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='applied'
G_LIVE_PATCH_STATUS[2]='not applicable'
G_LIVE_PATCH_STATUS[3]='not applicable'
- Distro version |
echo $G_DISTRO_NAME $G_RASPBIANbullseye 0
- Kernel version |
uname -aLinux LidarTestPi 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64 GNU/Linux
- SBC model |
echo $G_HW_MODEL_NAMEor (EG: RPi3)RPi 4 Model B (aarch64)
- Power supply used | (EG: 5V 1A RAVpower)
- 5V 2A
- SD card used | (EG: SanDisk ultra)
Additional Information (if applicable)
- Software title | (EG: Nextcloud)
sytemd-timesyncd
- Was the software title installed freshly or updated/migrated?
- Can this issue be replicated on a fresh installation of DietPi?
- Maybe
- Bug report ID |
echo $G_HW_UUID
Steps to reproduce
I don't know how sytemd-timesyncd got into this state, but on my machine running dpkg-query -s systemd-timesyncd (which is what is used by G_AG_CHECK_INSTALL_PREREQ) returns (with exit code 0):
Package: systemd-timesyncd
Status: deinstall ok config-files
Priority: optional
Section: admin
Installed-Size: 197
Maintainer: Debian systemd Maintainers <[email protected]>
Architecture: arm64
Multi-Arch: foreign
Source: systemd
Version: 247.3-6
Config-Version: 247.3-6
Replaces: systemd (<< 245.4-2~), time-daemon
Provides: time-daemon
Depends: libc6 (>= 2.29), systemd (= 247.3-6), adduser
Breaks: systemd (<< 245.4-2~)
Conflicts: time-daemon
Conffiles:
/etc/dhcp/dhclient-exit-hooks.d/timesyncd c66e563f4050725592e2da20a4e1bfef
/etc/systemd/timesyncd.conf e563c788b019216ec2ad3a43bf89e315
Description: minimalistic service to synchronize local time with NTP servers
The package contains the systemd-timesyncd system service that may be used to
synchronize the local system clock with a remote Network Time Protocol server.
Homepage: https://www.freedesktop.org/wiki/Software/systemd
Because it exists with exit code 0, G_AG_CHECK_INSTALL_PREREQ will not install the package. This was discovered, because setting time synchronization to "daemon + drift" in dietpi-config did not work properly.
Expected behaviour
G_AG_CHECK_INSTALL_PREREQ should only skip installation if it is actually fully installed.
Actual behaviour
G_AG_CHECK_INSTALL_PREREQ skips installation if the package status is "deinstall ok config-files". This may be true for other status values as well.
Extra details
I know I am using an old version of DietPi, but the source code that triggers this behaviour is still the same:
My version:
DietPi/dietpi/func/dietpi-globals
Line 1677 in fb8d2dd
| dpkg-query -s "$i" &> /dev/null || apackages+=("$i") |
Current master:
DietPi/dietpi/func/dietpi-globals
Line 1723 in 4471bf8
| dpkg-query -s "$i" &> /dev/null || apackages+=("$i") |