0x1b
This is due to the move of pkgdb
.
Disclaimer 1: I'm not sure things will change slightly going forward and what further adjustments will be implemented.
Disclaimer 2: At some of the following stages the system will have no package manager, please make no mistakes. You will need to force remove pkgin
and pkg_install
. Warning: back-up your stuff in case you will need to re-install.
Please make sure your pkgsrc tree is up-to-date where ever you have it, I'll assume the default location from now on.
$ cs /usr/pkgsrc
$ cvs up -dP
# pkg_delete -ff pkgin pkg_install
At this point you have no package manager and no way to go back, only forward ๐
$ cd pkgtools/pkg_install
# mv /var/db/pkg /usr/pkg/pkgdb
# mv /var/db/pkg.refcount /usr/pkg/pkgdb.refcount
# make USE_CWRAPPERS=no install
$ cd /usr/pkg/sbin
# install -c pkg_add pkg_admin pkg_create pkg_delete pkg_info /usr/sbin/
$ cd /usr/pkgsrc/pkgtools/pkg_install
# make clean
# make clean-depends
# make distclean
At this point you have only the pkg_install
tools available to work with. Actually, you should have two copies of the tools. Check if you want, pkg_*
should be present inside both, /usr/sbin
and /usr/pkg/sbin
. We need to get rid of the second set before we build pkgin
Fix to pkgin issues: cd to /
and edit root's .profile
, moving /usr/pkg/sbin
before /usr/sbin
.
$ cd /usr/pkgsrc/pkgtools/pkgin
$ make
# make install
# make clean
# make clean-depends
# make distclean
Yes, pkg_delete
will remove only the copies inside /usr/pkg/sbin
. Another way to do this would be to manually delete all the pkg_*
components from inside the directory itself, both work.
Final test, you might have noticed that while building pkgin
, you had to actually build net/libfetch
dependency first. This is a build dependency of pkgin
but, its not a runtime dependency. If everything worked you should be able to remove it using the newly built pkgin
. Let's try,
# pkgin remove libfetch
Password:
1 packages to delete:
libfetch-2.39nb1
proceed ? [Y/n] y
Good to go then ๐
Now, upgrading using pkgin
should be fine.