tech-pkg archive

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

Re: Proposed fix for long-standing +CONTENTS bug



* On 2020-04-21 at 05:52 BST, David H. Gutteridge wrote:

> On Sat, 2020-04-18 at 15:08 +0100, Jonathan Perkin wrote:
> > I'm pushing this new patch to my macOS and SmartOS builds for wider
> > testing:
> > 
> https://github.com/joyent/pkgsrc/commit/78c27f000e00d309e4884dd962dd9dd0b84d9032
> > 
> > This fixes an extra issue compared to the last one, resolving problems
> > seen with "registration is incomplete!" again during upgrades.  The
> > commit message should explain all.
> > 
> > With these fixes I'm now able to run my stress test script to
> > completion, with no changes made by "pkg_admin rebuild*" other than
> > sort ordering after hundreds of random upgrades.
> > 
> > Wider review and testing would be appreciated.
> 
> Hi Jonathan,
> 
> After applying your changes, I'm still able to reproduce issues with
> stale entries in +REQUIRED_BY. E.g., with markd@'s original example:
> 
> (Precursor: the version of gtk2 from pkgsrc-current is installed, so
> both testing versions of vim-gtk2 will accept it.)
> 
> Install vim-share and vim-gtk2 from pkgsrc_2019Q4 (version 8.1.2200).
> 
> [disciple@arcus-v7:vim-share-8.1.2200]$ cat +REQUIRED_BY
> vim-gtk2-8.1.2200
> 
> Switch to current pkgsrc (presently vim version 8.2.0303)
> vim-share make replace
> [...]
> ===> Replacing for vim-share-8.2.0303
> => Becoming ``root'' to make su-replace (/usr/bin/su)
> Password:
> ===> Updating using binary package of vim-share-8.2.0303
> /usr/bin/env  /usr/pkg/sbin/pkg_add -K /var/db/pkg -U -D /home/disciple/pkgsrc/editors/vim-share/work/.packages/vim-share-8.2.0303.tgz
> => Dropping ``root'' privileges.
> [...]                                                    
> [disciple@arcus-v7:vim-share-8.2.0303]$ cat +REQUIRED_BY
> vim-gtk2-8.1.2200
> 
> vim-gtk2 make replace
> [...]
> ===> Replacing for vim-gtk2-8.2.0303nb3
> => Becoming ``root'' to make su-replace (/usr/bin/su)
> Password:
> ===> Updating using binary package of vim-gtk2-8.2.0303nb3
> /usr/bin/env  /usr/pkg/sbin/pkg_add -K /var/db/pkg -U -D /home/disciple/pkgsrc/editors/vim-gtk2/work/.packages/vim-gtk2-8.2.0303nb3.tgz
> => Dropping ``root'' privileges.
> [...]
> [disciple@arcus-v7:vim-share-8.2.0303]$ cat +REQUIRED_BY
> vim-gtk2-8.1.2200
> vim-gtk2-8.2.0303nb3
> 
> I guess there are more code paths involved that can lead to these
> situations?

Rather than using make replace, can you try building binary packages
and performing the upgrade with 'pkg_add -DU <pkgs>'?

I've never used make replace, and it appears to be performing its own
+REQUIRED_BY handling rather than deferring to pkg_install, it's
likely that's where this is coming from.

Thanks,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index