Date: Thu, 18 Apr 2019 21:04:24 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 237369] pkg delete removes required NLS directories Message-ID: <bug-237369-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237369 Bug ID: 237369 Summary: pkg delete removes required NLS directories Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: se@FreeBSD.org A port I maintain (math/gh-bc) installs POSIX message catalog files below ${PREFIX}/share/nls/ . While the installation succeeds first time, it fails after the package has = been de-installed, since the directory ${PREFIX}/share/nls/C has been removed. That directory is not directly used in the package, but it is the symlink target of ${PREFIX}/share/nls/en_US.US-ASCII where a message catalog is installed by the port/package and removed by pkg delete. To reproduce: Make sure there is no message catalog file in ${PREFIX}/share/nls/C , then: pkg install gh-bc pkg delete gh-bc ---> the empty directory ${PREFIX}/share/nls/C has been deleted pkg install gh-bc ---> the installation fails due to a file that is to be installed in ${PREFIX}/share/nls/en_US.US-ASCII/ which points to the no longer existing ${PREFIX}/share/nls/C (which is not automatically created). IMHO, pkg delete should not delete ${PREFIX}/share/nls/C (which is not even contained in pkg-plist of the port) when this directory has become empty (a= fter the last message catalog has been deleted). As is, the de-installation of the gh-bc port will cause surprising breakage= on users' systems (and the cause is not obvious from the error messages of the failed installation attempt, see last line of the following log): # ls -l /usr/local/share/nls/C /usr/local/share/nls/en_US.US-ASCII lrwxr-xr-x 1 root wheel 1 May 25 2011 /usr/local/share/nls/en_US.US-ASC= II -> C /usr/local/share/nls/C: total 0 # pkg add /usr/packages/All/gh-bc-1.2.4.txz=20 Installing gh-bc-1.2.4... Extracting gh-bc-1.2.4: 100% # pkg delete gh-bc Updating database digests format: 100% Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packag= es in the universe): Installed packages to be REMOVED: gh-bc-1.2.4 Number of packages to be removed: 1 Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling gh-bc-1.2.4... [1/1] Deleting files for gh-bc-1.2.4: 100% # ls -l /usr/local/share/nls/C /usr/local/share/nls/en_US.US-ASCII ls: /usr/local/share/nls/C: No such file or directory lrwxr-xr-x 1 root wheel 1 May 25 2011 /usr/local/share/nls/en_US.US-ASC= II -> C # pkg add /usr/packages/All/gh-bc-1.2.4.txz=20 Installing gh-bc-1.2.4... Extracting gh-bc-1.2.4: 69% pkg: Fail to create hardlink: /usr/local/share/nls/en_US.US-ASCII/.bc.cat.cbNr0pGVY6yN:No such file or directory Extracting gh-bc-1.2.4: 100% Failed to install the following 1 package(s): /usr/packages/All/gh-bc-1.2.4= .txz --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237369-7788>