tech-pkg archive

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

Re: Broken vim



Thomas Klausner <wiz%NetBSD.org@localhost> writes:

> On Fri, Jul 28, 2017 at 03:38:39PM +0000, John Klos wrote:
>> I'll check it out the next time vim gets updated BEFORE running
>> pkg_rolling-replace on dozens of machines.
>
> Perhaps it's a bug in pkg_rolling-replace?

Perhaps, but it doesn't seem likely.

As I point out to everyone who has "pkg_rolling-replace problems", all
pkg_rr does is 1) bookkeeping about which packages need to be rebuilt
and 2) topological sort based ondependencies to figure out which order
to call "make package replace clean", basically.

So if pkg_rr hits a shell issue, or an infinite loop, it's buggy.  If it
did a "make replace" which was arguably reasonable, and that fails, it's
a pkgsrc issue.

  /usr/sbin/pkg_add -K /var/db/pkg -U -D 
  /usr/pkgsrc/editors/vim-share/work/.packages/vim-share-8.0.0702.tgz
  pkg_add: Can't open +CONTENTS of depending package vim-8.0.0425
  pkg_add: 1 package addition failed
  *** Error code 1

This looks like a bad +REQUIRED_BY file.  In this output, it's pretty
clear that pkg_rr was updating vim-share.  And that the installed
vim-share package has a +REQUIRED_BY file that has a line for
vim-8.0.0425.  In this case, you should run pkg_info on vim and
vim-share, and go read the files in /var/db/pkgdb/vim{,-share}/*.

Probably pkg_admin rebuild-tree will fix this, and explain that it is
doing so.  Arguably you should run that before pkg_rr, as it's sort of
like fsck.  And arguably it should never find anything, but as with fsck
sometimes it will.

My standard request to everyone with pkg_rr: When you have an issue, 1)
remove all working directories, and then 2) invoke make replace
manually, and post about that make replace.  Take pkg_rr out of the
picture, if you can reproduce the problem without it.  That will cause
more people to focus on your actual problem, instead of wondering if it's a
bug in code they don't run, and it's always easier to debug smaller problems.

That said, there are some packages that are very fussy about exact
dependencies.  Arguably that's buggy, but bulk builds don't use replace,
so that bug doesn't turn up.  And sometimes it might actually be
necessary.


I have a system with HEAD pkgsrc, up to date, but no vim.  I took
vim/vim-share back to 2017Q2, and installed vim (and hence vim-share).
I then updated back to HEAD, and did make replace in vim-share.  The
output was:

===> Replacing for vim-share-8.0.0702
=> Becoming ``root'' to make su-replace (sudo)
===> Updating using binary package of vim-share-8.0.0702
/usr/pkg/sbin/pkg_add -K /var/db/pkg -U -D
/u0/n0/gdt/NetBSD-current/pkgsrc/editors/vim-share/work/.packages/vim-share-8.0.0702.tgz
pkg_add: Dependency of vim-8.0.0646 fulfilled by vim-share-8.0.0646, but
not by vim-share-8.0.0702
=> Dropping ``root'' privileges.

which looks right.  There's a warning about the exact dependency not
being satisfied (but pkg_rr would then rebuild vim, so it's ok after
that), but no error, and not the error you got.


Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index