{r_,}proc_pkgs: declare some variables to be local.