tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgdb
On Thu, 17 Dec 2020, John D. Baker wrote:
> The issue of absolute paths to "/var/db/pkg/..." in files under
> "pkgdb.refcount" had me concerned. On one platform a quick 3-liner shell
> program changed all those references to point to the new location. On
> other platforms I did nothing (not even "/var/db/pkg" as a symlink to the
> new location). I have so far had no problems in either case...
In case it's useful:
# cd /usr/pkg/pkgdb.refcount
# find . -type f -exec grep -l "/var/db/pkg" {} \; \
| sh -c 'while read f ; do echo "sed 's,/var/db/pkg,/usr/pkg/pkgdb,g' $f > /tmp/foo ; rm $f ; mv /tmp/foo $f" ; done' | sh -v
(In my case, I did these as an unprivledged user and the final command
was 'sudo sh -v' to execute as root.)
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index