20packagekit
/etc/apt/apt.conf.d/20packagekit 는 APT cache 변경 사실을 D-Bus 를 통해 PackageKit 에 알려 GUI software center 류가 상태를 다시 읽게 만드는 hook 파일이다.
Summary
dpkg후처리와apt update성공 후처리에 PackageKit notify hook 를 건다.- 주로 desktop 환경의 package metadata 동기화를 위해 쓰인다.
Path
- Path:
/etc/apt/apt.conf.d/20packagekit - Package:
packagekit - Order:
20prefix
Config
DPkg::Post-Invoke {
"/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
};
APT::Update::Post-Invoke-Success {
"/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
};
Notes
- D-Bus service 파일과 system bus socket 이 둘 다 있을 때만 호출한다.
- 핵심 동작은
org.freedesktop.PackageKit.StateHasChanged cache-update신호를 보내는 것이다. - headless 서버에서는 PackageKit 자체가 없어서 이 파일도 대개 없다.
See Also
History
- codex:: 2026-07-13 Added a page for the PackageKit cache-update integration fragment.