Daily backups of pkgdb failure
Hans Ottevanger
fbsdstable at beasties.demon.nl
Wed May 4 12:01:24 UTC 2011
Hi,
I upgraded my Soekris 4801 boxes from 8.1 to 8.2-STABLE (r221326) a few
days ago and now I get the following error in the daily mail:
Backing up package db directory:
tar: : Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
These messages originate from /etc/periodic/daily/220.backup-pkgdb,
apparently a recent addition.
The culprit is probably on line 21:
make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR
"/usr/share/mk/bsd.port.mk", line 11: Could not find
/usr/ports/Mk/bsd.port.mk
make: fatal errors encountered -- cannot continue
If there is no /usr/ports present on the system, the script will fail.
Of course my systems are not unique in this respect: many people install
pre-built packages instead of building ports themselves, especially on
minimal hardware configurations.
Would it be a good idea to check for the presence of /usr/ports (or
/usr/ports/Mk/bsd.ports.mk) first before calling make, and then try
$PKG_DBDIR and /var/db/pkg, in that order, if this is not the case?
As far as I know this issue also affects 9.0-CURRENT.
Kind regards,
Hans Ottevanger
More information about the freebsd-stable
mailing list