tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Weird pkg_add -DU bug
On Fri, Dec 11, 2020 at 04:17:47PM +0100, Thomas Klausner wrote:
> Hi!
>
> I'm currently seeing a weird bug with pkg_add -DU - it installs a
> second copy of a package with ".xxxxxx" at the end, but doesn't delete
> it when it's done.
>
> This is e.g. triggered by pkgin because that uses -DU for updating
> packages, but I can easily reproduce it without pkgin.
>
> With no packages installed, and /usr/sbin/pkg_* deleted to make it
> clear which version is used:
>
> (-DU is not necessary in this call, but works)
> # PKG_PATH=/packages/All ./work/pkg_install-20201211/add/pkg_add -DU checkperms
> # ls /usr/pkg/pkgdb
> checkperms-1.12 pkgdb.byfile.db
> # PKG_PATH=/packages/All ./work/pkg_install-20201211/add/pkg_add -DU checkperms
> # ls /usr/pkg/pkgdb
> checkperms-1.12 checkperms-1.12.xxxxxx pkgdb.byfile.db
> # PKG_PATH=/packages/All ./work/pkg_install-20201211/add/pkg_add -DU checkperms
> pkg_add: package `checkperms-1.12' already has a temporary update directory `/usr/pkg/pkgdb/checkperms-1.12.xxxxxx', remove it manually
> pkg_add: 1 package addition failed
> #
>
> I went back to 'cvs update -D 20200701' of pkgsrc/pkgtools/pkg_install
> and can still reproduce it with that version (20191008). At least one
> other person also has seen this.
>
> It seems not everyone does, but I don't understand what makes my
> system special.
I think the problem is that the path to pkg_delete is hardwired, so in
this case, it wants to run /usr/pkg/sbin/pkg_delete but that is not
yet installed.
In the case where /usr/sbin/pkg_add is overwritten with
/usr/pkg/sbin/pkg_add, it still wants to call /usr/pkg/sbin/pkg_delete
and just silently continues if calling that fails.
Thomas
Home |
Main Index |
Thread Index |
Old Index