[Bug 266362] ports-mgmt/portupgrade-devel hangs at "Uninstalling the old version" phase

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 11 Sep 2022 13:24:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266362

            Bug ID: 266362
           Summary: ports-mgmt/portupgrade-devel hangs at "Uninstalling
                    the old version" phase
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: junchoon@dec.sakura.ne.jp

ports-mgmt/portupgrade-devel (maybe ports-mgmt/portupgrade, too) hangs at
"Uninstalling the old version" phase on base main after git
bced4d8b3e99efd46b5496c83e11755b25913c90.

Manually reverting the commit fixed the issue.

Not all ports seems to hang on upgrade, but at least graphics/libdrm,
net/gupnp, graphics/vulkan-loader, graphics/sane-backends and graphics/poppler
were affected.

/usr/local/sbin/pkg_deinstall, installed as a part of
ports-mgmt/portupgrade[-devel] and used by /usr/local/sbin/portupgrade on
"Uninstalling the old version", hangs waiting for `IO.popen("/usr/bin/file
-bnf-", "r+") do |pipe|` to finish, maybe.

As the problematic commit seems to be cherry-picked (MFV) to fix something
else, I'm not sure which should be fixed, base file or
ports-mgmt/portupgrade[-devel].


For the record:
Output of `grep -n "file " /usr/local/sbin/pkg_deinstall` was as below.

105:    opts.def_option("-d", "--rmdir", "Remove empty directories created by
file cleanup [*]") {
190:    PKGTOOLS_CONF            configuration file [$PREFIX/etc/pkgtools.conf]
341:      raise PkgDB::DBError, "The file #{path} is not properly recorded as
installed"
344:      raise PkgDB::DBError, "The file #{path} is not properly recorded as
installed by #{pkgname}"
380:    IO.popen("/usr/bin/file -bnf-", "r+") do |pipe|
382:    %r"^[^@\s]\S*/([^/\s]+\.so(?:\.\d+)+)$" =~ file or next

-- 
You are receiving this mail because:
You are the assignee for the bug.