For the purpose of tracking changes I've made to the system, I've been
playing around with PKG_DBDIR and PKG_DESTDIR to help me create a
"pristine" file hierarchy, where I've extracted the file sets and will
install some packages. Unfortunately I've run into issues with PKG_DESTDIR
when testing the package installation:

* pkg_add seems to be ignoring PKG_DESTDIR but working with the -B flag,
  pkg_delete is working correctly with both.
* On a more pedantic note, both PKG_DESTDIR and the -B flag seem to insert
  extraneous slashes.  Output below shows /pristine//...  but if I use
  -B /pristine/ I get /pristine///...

I'm using 4.8-release as I've not got a spare machine to install a
snapshot. I had a quick look to see if I could spot what was going wrong
but looking at perl source for the first time made my head explode. I've
checked the commit messages to Add.pm, PkgAdd.pm, AddCreateDelete.pm and
Paths.pm but couldn't see anything that looked related.

Testing pkg_add with base64 (not installed) and pkg_delete with abcde
(installed in default location only).

# export PKG_DESTDIR=/pristine
# pkg_add -n -vvvvv base64
parsing base64-1.5
found libspec c.56.0 in /usr/lib
extracting /usr/local/bin/base64
extracting /usr/local/man/man1/base64.1
base64-1.5: ok
/dev/wd0e
/dev/wd0h
# pkg_add -n -vvvvv -B /pristine base64
parsing base64-1.5
found libspec c.56.0 in /usr/lib
extracting /pristine//usr/local/bin/base64
extracting /pristine//usr/local/man/man1/base64.1
base64-1.5: ok
/dev/wd0a
/dev/wd0e
# pkg_delete -n -vvvvv abcde
Removing manpages in /pristine//usr/local/man:
File /pristine//usr/local/bin/abcde does not exist
File /pristine//usr/local/bin/cd-discid does not exist
File /pristine//usr/local/bin/cddb-tool does not exist
File /pristine//usr/local/man/man1/abcde.1 does not exist
File /pristine//usr/local/man/man1/cd-discid.1 does not exist
File /pristine//usr/local/man/man1/cddb-tool.1 does not exist
rmdir: /usr/local/share/examples/abcde
File /pristine//usr/local/share/examples/abcde/abcde.conf does not exist
remove dependency on vorbis-tools-1.4.0
remove dependency on cdparanoia-3.a9.8p0
abcde-2.3.0: ok
/dev/wd0a
/dev/wd0e
# unset PKG_DESTDIR
# pkg_delete -n -vvvvv -B /pristine abcde
Removing manpages in /pristine//usr/local/man:
File /pristine//usr/local/bin/abcde does not exist
File /pristine//usr/local/bin/cd-discid does not exist
File /pristine//usr/local/bin/cddb-tool does not exist
File /pristine//usr/local/man/man1/abcde.1 does not exist
File /pristine//usr/local/man/man1/cd-discid.1 does not exist
File /pristine//usr/local/man/man1/cddb-tool.1 does not exist
rmdir: /usr/local/share/examples/abcde
File /pristine//usr/local/share/examples/abcde/abcde.conf does not exist
remove dependency on vorbis-tools-1.4.0
remove dependency on cdparanoia-3.a9.8p0
abcde-2.3.0: ok
/dev/wd0a
/dev/wd0e

Reply via email to