Connor McLaughlan <cont6pro3%gmail.com@localhost> writes: > i think i must be using pkgsrc the wrong way in some aspect: Probably but I can't tell exactly how! > From time to time i need to clear out my system and remove /usr/pkg > and /usr/pkgsrc completely. Why? You really should not need to do this. I have been running pkgsrc for a really long time on systems and just keep doing pkg_rr, and pkg_admin audit, and pkg_admin rebuild-tree occasionally. You didn't mention OS, but you said "bootstrap" so presumably you mean not NetBSD. If you are bootstrapping on NetBSD, then 1) don't do that and 2) if you do, make sure that the pkg_add from the bootstrap is in your path ahead of the base system pkg_add, 3) make sure you understand which pkgdb is which and probably make one a symlink to the other so you only have 1 and 4) please tell us where you were suggested to bootstrap on NetBSD so that can either be changed, or augmented to caution against what we figure out you are doing that you shouldn't be. Keep in mind that there is a pkgdb which records what is installed. On NetBSD that is in /var/db/pkg. This is logically part of /usr/pkg. If you remove /usr/pkg but not /var/db/pkg, you have mesed up the db. If you want to remove all your packages, just pkg_delete them. Then you can see what stray files are left. Some might be in /usr/pkg/etc. If you rm /usr/pkg, also remvoe all the files in /var/db/pkg. Always run "pkg_admin audit" before and after any serious munging. > I then extract a fresh /usr/pkgsrc, bootstrap it and install basic > stuff via "bmake install", like pkgtools/pkgin, pkgtools/pkgclean and > pkgtools/pkg_install. Isn't pkg_install part of bootstrap? Why are you 'extracting' rather than using CVS or some mirror? Generally, if you are a user it is best to check out the latest stable branch and track it. If you are more adventurous or trying to be a pkgsrc developer, then HEAD. > After this i copy my saved packages from the previous pkgsrc-tree to > /usr/pkgsrc/packages/All and install all of them via "pkg_add *". If you are reinstalling, what was the point of nuking the whole tree? I don't understand what problem you are trying to solve. Perhaps describe your problem. > Somehow this must be wrong, because sure the packages get installed, > but pkg_info tells me i only have the three packages installed that i > installed earlier with "bmake install". How many copies of pkg_add do you have? How many PKGDB directories? (The rest of your trouble follows from this issue, I think.)
Attachment:
signature.asc
Description: PGP signature