NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_rolling-replace issue with non-installed package



Riccardo Mottola <riccardo.mottola%libero.it@localhost> writes:
> It looks like "make install" is installing in /var/db/pkg and
> "pkg_add" in /usr/pkg/pkgdb
The change was December 2020 and almost everyone has dealt with it by
now.
 https://www.pkgsrc.org/pkgdb-change/
and note link to message about split-brain recovery.
If you want to remove/rebuild, I would recommend
 follow the instructions above about config files
 full backup of /usr/pkg, /var/db/pkg, binary packages
 make a list of packages that you want (and omti those that are dependencies) 
 save config files in etc, /usr/pkg/pgsql and any other user data
 Remove /var/db/pkg and everything in /usr/pkg (except maybe
 /usr/pkg/etc and /usr/pkgpgsql)
 Remove your built binary packages (beacuse they might encoded the
 wrong pkgdb)
 Install pkgin with pkg_admin and check the pkgdb situation
 install other wanted packages with pkgin
 build other wanted packages from source
Probably, a binary package's idea of pkgdb is only important for
pkg_install and maybe pkgin. Probablly, having config files makes that
not matter so much.
> It is broken ! mk.conf contains a line it shouldn't:
>
> more /etc/mk.conf
> MAKE_JOBS=     2
>
> PKG_DBDIR=/var/db/pkg
>
> # define things for pkgsrc
>
> # create also all dependencies
> DEPENDS_TARGET=package-install
>
> # work here
> WRKOBJDIR=/disk2/pkg-workdir
>
> # save our tarball packages here
> PACKAGES=/disk2/pkg-bin
>
> I wonder how PKG_DBDIR got in here, I suppose an error in merge after
> 10.1 upgrade
>
> I have an idea on how to fix it: delete all packages, delete /usr/pkg,
> delete db's and since I saved all binary packages built up to now,
> install those. What is obsolete/missing will be built later from
> source
yes, but be careful about reusing pkg_install.
Read the migration script and the split-brain note. You are multiple
years behind the crowd in dealing with this and I've forgotten a lot of
details. The script mentioned in the article has been deleted from CVS
but you should be able to find it on old branches.


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /