pkgsrc-Users archive

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

Re: [HEADS UP] pkgsrc default database directory changed



> Date: Sun, 13 Dec 2020 20:11:53 +0100
> From: Thomas Klausner <wiz%NetBSD.org@localhost>
> 
> On Sun, Dec 13, 2020 at 02:18:32PM +0100, Rhialto wrote:
> > A problem with pkg.refcount might be that files in that directory
> > contain absolute pathnames starting with /var/db/pkg. E.g.:
> > 
> > $ cat /var/db/pkg.refcount/groups/mail/cyrus-sasl-2.1.27nb1 
> > /var/db/pkg/cyrus-sasl-2.1.27nb1
> > 
> > $ cat /var/db/pkg.refcount/files/usr/pkg/lib/perl5/vendor_perl/5.32.0/XML/SAX/ParserDetails.ini/p5-XML-SAX-1.02 
> > /var/db/pkg/p5-XML-SAX-1.02
> > 
> > $ cat /var/db/pkg.refcount/users/smmsp/sendmail-8.15.2nb9 
> > /var/db/pkg/sendmail-8.15.2nb9
> 
> That looks like a design flaw :(
> 
> IIUC the effect will be that some empty directories are not deleted
> when the last packages using them are deleted.
> 
> Is anyone willing to write up a shell script to fix them?

Before we distribute more band-aids on this that might require manual
intervention, maybe we could step back and assess the situation to
make sure the issues are being comprehensively addressed, and perhaps
find a way to do it that is safe, idempotent, and requires no manual
intervention by users?

We have a lot of different types of users who might be affected by
this, and I worry that the pkgdb migration had already gotten out of
hand before we multiplied the cases that are out there with updates to
base and pullups to -8 and -9:

- netbsd-{8,9,HEAD} users using base pkg_install exclusively who have
  updated
  . base and pkgsrc
  . base
  . pkgsrc
  . neither

- netbsd-{8,9,HEAD} users using bootstrapped pkg_install exclusively
  who {have,haven't} updated pkgsrc

- netbsd-{8,9,HEAD} users using base pkg_install for main packages but
  bootstrapped pkg_install for /home/user/pkg or /usr/pbulk or
  similar, who have updated
  . base and pkgsrc
  . base
  . pkgsrc
  . neither

All these need to be multiplied by the different versions of the
manual intervention we've publicly suggested so far.  Did I miss any
important cases that we're likely to encounter?


Home | Main Index | Thread Index | Old Index