pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/58131: empty +REQUIRED_BY



>  * On 2024-04-10 at 17:44 BST, schaecsn%gmx.com@localhost wrote:
>
>  >I have quite a lot of empty +REQUIRED_BY files. That confuses pkg_leave
>  >(and perhaps other utilities). How come?
>
>  Hard to say without knowing how you got into that state, but needless to
>  say it's not a correct state to be in!
>
>  You can fix it up by running "pkg_admin rebuild-tree".


Hmm, now I know why pkg_leaves did not work.


- - - snip - - -
# pkg_info  -Q automatic gcc10-aux-10.3.0nb1
YES
- - - snip - - -


the check in pkg_leaves is against lower case "yes":

- - - snip - - -
		if [ ${skip_manual} = "yes" ]; then
                        if [ "`${PKG_INFO} -K "${PKG_DBDIR}" -Q automatic ${pkg} 2> /dev/null`" != yes ]; then
- - - snip - - -


Having YES capitalized was a user error. Sorry.

- - - snip - - -
/var/db/pkg$ grep automatic */+INSTALLED_INFO
SDL-1.2.15nb43/+INSTALLED_INFO:automatic=yes
SDL_net-1.2.8nb1/+INSTALLED_INFO:automatic=yes
TECkit-2.5.12/+INSTALLED_INFO:automatic=yes
abcm2ps-8.13.12nb11/+INSTALLED_INFO:automatic=YES
...
- - - snip - - -


So, the empty +REQUIRED_BY was not the fault why pkg_leave did not work. That's now a feature request, though. Having empty +REQUIRED_BY files deleted makes inspecting /var/db/pkg/*/ directories more straightforward.

 Stefan


Home | Main Index | Thread Index | Old Index