Package: glib2.0
Version: 2.42.1-1
Severity: normal
Hi!
The libglib2.0-0 postrm script states that because the caches are not
refcounted there's no way to know if they are needed or not on purge.
But in fact it is possible to know easily from the environment variable
DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT, set by dpkg since 1.17.2. You just
need to check if the value is 1.
If you want to support older dpkg versions you can use the following in
case the above variable is not set:
,---
dpkg-query -f '${db:Status-Abbrev} ${binary:Package}\n' -W @pkgname@ | \
grep -v '^.n' | wc -l
`---
Where @pkgname@ is the non-arch-qualified package name.
Thanks,
Guillem
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]