On Thu, Oct 08, 2020 at 11:42:53AM +0100, Stuart Henderson wrote: > On 2020/10/08 02:33, James Cook wrote: > > I'm reporting a slight hiccup upgrading from 6.7 to snapshot. This might > > count as my own fault, but reporting it in case it's something that's > > supposed to run smoothly. (I was able to recover; no help needed.) > > > > I upgraded from 6.7 to a snapshot (with sysupgrade -s), then ran > > "doas pkg_add -u", and got this: > > > > > > Collision in python-3.8.6: the following files already exist > > /usr/local/bin/2to3 from python-3.8.6 > > /usr/local/bin/pydoc3 from python-3.8.6 > > /usr/local/bin/python3 from python-3.8.6 > > /usr/local/bin/python3-config from python-3.8.6 > > /usr/local/lib/pkgconfig/python3.pc from python-3.8.6 > > It seems to be a missing package registration > > This is because, > > 1) The default Python version in ports was switched from 3.7 to 3.8, > so the symlinks for the "default names" moved at that time > > 2) After this, Python 3.7 was updated in 6.7-stable > > The @conflict lines in the PLIST files for 3.8 in -current should have > been updated after the -stable update, so pkg_add doesn't know that > it needs to update 3.7.9 to the "6.8 version" (without the symlinks) > before installing 3.8. > > We can't do anything for the main 6.8 release packages now, but it can > be fixed in 6.8-stable once it's open. For those arches with -stable > packages available, once those packages are built it shouldn't be > noticeable to users. > > > After this, pkg_delete partial-python; pkg_add python3; pkg_add -u > > completed the upgrade without trouble (though I haven't tested anything). > > Yes that should do the trick.
Somehow, this old problem is still haunting my computer. I'm reviving this old thread for two reasons: 1. In case the below is a useful bug report. 2. To request advice dealing with it. (My goal: I'd like to have a functioning /usr/local/bin/python3 symlink, and no "partial-python-3.8.7" package.) ---- Ever since the problem I reported above, I've had trouble with the Python3 symlinks whenever I run pkg_add -u on that same system. I haven't kept careful track, so I'll start with the most recent symptoms: * Today, I noticed that I had no /usr/local/bin/python3 symlink, even though I have python-3.8.7 installed. (This is probably because I had earlier uninstalled the "partial-python-3.(something)" package.) * Seeing that, I decided to force-reinstall Python 3.8, resulting in the following: falsifian angel tmp $ doas pkg_add -u -D installed python-3.8.7 quirks-3.519 signed on 2021-01-24T21:22:51Z quirks-3.519->3.519: ok python-3.8.7:libffi-3.3->3.3: ok python-3.8.7:libiconv-1.16p0->1.16p0: ok python-3.8.7:gettext-runtime-0.21p0->0.21p0: ok python-3.8.7:sqlite3-3.34.0->3.34.0: ok python-3.8.7:xz-5.2.5->5.2.5: ok python-3.8.7:bzip2-1.0.8p0->1.0.8p0: ok Bogus symlink: /usr/local/bin/2to3 Bogus symlink: /usr/local/bin/pydoc3 Bogus symlink: /usr/local/bin/python3 Bogus symlink: /usr/local/bin/python3-config Bogus symlink: /usr/local/lib/pkgconfig/python3.pc Bad rename /usr/local/bin/2to3 to /usr/local/bin/2to3.HZzyyvf4Qq: No such file or directory Bad rename /usr/local/bin/pydoc3 to /usr/local/bin/pydoc3.IA1AJiEcMU: No such file or directory Bad rename /usr/local/bin/python3 to /usr/local/bin/python3.puMIJ7N7oe: No such file or directory Bad rename /usr/local/bin/python3-config to /usr/local/bin/python3-config.QD8CNhk2EW: No such file or directory Bad rename /usr/local/lib/pkgconfig/python3.pc to /usr/local/lib/pkgconfig/python3.pc.jrFTvKCyzK: No such file or directory python-3.8.7->3.8.7: ok Read shared items: ok --- -python-3.8.7 ------------------- Files kept as partial-python-3.8.7 package I have no idea what's happening here. Somehow, pkg_add has decided that the symlinks (which didn't exist before I ran the command) should now be part of a new "partial-python-3.8.7" package: falsifian angel tmp $ pkg_info -L partial-python-3.8.7 Information for inst:partial-python-3.8.7 Files: /usr/local/bin/2to3 /usr/local/bin/pydoc3 /usr/local/bin/python3 /usr/local/bin/python3-config /usr/local/lib/pkgconfig/python3.pc Here's what I remember from the time between the October 2020 thread and today: * For a while (possibly still continuing to today; I haven't been paying close attention) every time I ran pkg_add -u, I would see error messages related to /usr/local/bin/python3 and other symlinks (but the upgrade seems to work). I think the error messages were generally similar to what's shown above, but I'm not sure. * The symlinks were generally kept in a "partial-python-3.(something)" package. * I deleted that partial-python-3.(something) package, probably more than once. I guess that is why /usr/local/bin/python3 didn't exist today when I checked. I guess my system is in some state that pkg_add can't puzzle its way out of. But I don't know enough about pkg_add internals to untangle the details. I guess I could try uninstalling python-3.8.7 and partial-python-3.8.7 and then installing python-3.8.7 from that "clean" state. I haven't done it yet because it will involve reinstalling a lot of packages, and in case this represents some pkg_add bug that should be fixed. (Incidentally, what prompted me to finally try to figure this out is that the google-cloud-sdk package doesn't work properly if there's no python3 symlink. It was falling back to python2, with which it seems to be incompatible.) -- James