How to prevent pkgsave files

Hi all,
On a nanobsd machine, I need to install somes ports. Before that, I update the current pkg version
Bash:
cust_local_packages()
{
        if [ -z $LOCAL_PACKAGES ] ; then
                return 0
        fi
        pkg upgrade -y pkg
        strip /usr/local/sbin/pkg
        strip /usr/local/sbin/pkg-static
        ...
}
This upgrade make a backup of pkg-static as pkg-static.pkgsave. This file is about 20Mo (approx. 15% of the root filesystem). I could just remove it, but is there a best method to prevent this.
Thanks in advance
 
I use this function in my config file:

customize_cmd cust_pkgng
NANO_PACKAGE_LIST="*"

With this it will install all packages I place in /usr/src/tools/tools/nanobsd/pkg/
It does require pkg.txz to be included in this directory.
 
With this it will install all packages I place in /usr/src/tools/tools/nanobsd/pkg
It does require pkg.txz to be included in this directory.
Thanks for your reply. In my case, I build some local packages from a local tree ports (in addition to official ports).
And sometimes, I don't know why, upgrading pkg is require. I'll dig this.
 
Back
Top