#49086 closed enhancement (invalid)
Bad user experience if user forgets to save a list of requested ports before OS upgrade
Reported by: | macports@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.3.4 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: |
Description
I recently upgraded my Mac to El Capitan. Before upgrading, I forgot that MacPorts requires a new, clean install for each upgrade and therefore I did not save a list of my requested ports.
After the upgrade, all my ports appear to work fine but the port
command itself refuses to run, asking me to read the article on Migration. I have read it, but item 3 of the procedure asks one to run the port command to save a list of installed/requested ports. The main problem is that this step should be run BEFORE the upgrade, not AFTER. If the user forgets to save the list, MacPorts will even refuse to print the list after the upgrade.
This can be worked around by deleting line 617 of libexec/macports/lib/macports1.0/macports.tcl but I doubt many users would go that far. At least making this modification will cause MacPorts to run so that the user may print out a list of installed/requested ports.
Change History (6)
comment:1 follow-up: 2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Component: | ports → base |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 9 years ago by graziosi.angelo@…
Ciao Ryan,
Replying to ryandesign@…:
Step 2 of the migration instructions tells you to reinstall MacPorts base, which fixes the problem you mentioned, without affecting your installed ports.
in any case, there is a basic problem: each time there is a new OSX release (Lion -> ML -> Mavericks -> Yosemite -> El Capitan), the MacPorts users have to "migrate", i.e. basically they have to reinstall MacPorts from scratch even if their curent installation basically works. But often, "migrating" means NOT install a few ports because they don't work or build in the new OSX.
Consider the current case. qt4-mac package has issues. If I reinstall or migrate MacPorts to new OSX, the package which depend on qt4 cannot be reinstalled. I have djview which I cannot reinstall instead the package I installed with Yosemit works just fine also in 10.11! The same with emacs-mac-app: I installed it with 10.10 and it works also with El Capitan.
At the moment the only package I found and that does not work is pdftk (which hangs). But as I stressed, reinstalling MacPorts following the migration steps would mean I cannot reinstall more packages.
After all, there are on the web other important project which do not require the migration: see for example TeXLive. The version released on June/July still works with 10.11 and TL people do not ask for a "migration". Usually if they meet problems with some binary (latex, pdflatex, xetex etc.) after they have found the fix, they release that new binary..
There would be other considerations about the fact that Apple constrains users every year to this "tour de force" but they are off topic..
Ciao, Angelo.
comment:3 follow-up: 4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
You are welcome to "migrate" a slightly different way (this is what I did last year when I updated from Mavericks to Yosemite): upgrade OS X, install new Xcode, reinstall MacPorts base, but do not uninstall all ports. Instead, use "sudo port upgrade" to upgrade the outdated ports—which will be all of them. Some ports will fails to build for the reasons you mentioned, but the previous versions might continue to work. There are other reasons why these upgrades might fail, including that you might have to upgrade ports in a particular order. If you encounter an error, carefully read the error messages in the main.log and see if it might point to a particular port that you should upgrade first.
If you want a smooth upgrade experience, you should wait before upgrading OS X and not upgrade on day 1... Give us some time to fix the issues first.
If you'd like to discuss further, the macports-users mailing list is a better place than in a ticket.
comment:4 follow-up: 5 Changed 9 years ago by graziosi.angelo@…
Replying to ryandesign@…:
You are welcome to "migrate" a slightly different way (this is what I did last year when I updated from Mavericks to Yosemite): upgrade OS X, install new Xcode, reinstall MacPorts base, but do not uninstall all ports. Instead, use "sudo port upgrade" to upgrade the outdated ports—which will be all of them. Some ports will fails to build for the reasons you mentioned, but the previous versions might continue to work. There are other reasons why these upgrades might fail, including that you might have to upgrade ports in a particular order. If you encounter an error, carefully read the error messages in the main.log and see if it might point to a particular port that you should upgrade first.
If you want a smooth upgrade experience, you should wait before upgrading OS X and not upgrade on day 1... Give us some time to fix the issues first.
Sorry, but I am not subscribed there...
If you'd like to discuss further, the macports-users mailing list is a better place than in a ticket.
OK, the users could refrain from upgrading to the new OSX but this does not resolve the basic problem.
Yesterday I followed your suggestion, and did a smooth upgrade
sudo port upgrade xz sudo port upgrade harfbuzz sudo port upgrade libtheora sudo port upgrade iTerm2 sudo port upgrade atool sudo port upgrade aspell sudo port upgrade aspell-dict-en sudo port upgrade aspell-dict-it sudo port upgrade dos2unix sudo port upgrade unrar sudo port upgrade lftp sudo port upgrade tesseract-eng sudo port upgrade tesseract-ita sudo port upgrade p7zip sudo port upgrade djvu2pdf sudo port upgrade pdf2djvu sudo port upgrade clamav sudo port upgrade allegro5-devel sudo port upgrade gv sudo port upgrade plotutils sudo port upgrade xfig sudo port upgrade xorg-server sudo port upgrade root6 sudo port upgrade at-spi2-core at-spi2-atk sudo port upgrade gdk-pixbuf2 sudo port upgrade emacs-mac-app
These were only requested packages and all have been upgraded. The only packages which failed were:
pdftk geant4 (qt4-mac) djview (qt4-mac)
It took more than 12 hours.. more then 12 hours to "upgrade" what already worked fine: installed under Yosemite and working under El Capitan. And this only because MacPorts says:
cloog 0.18.3_0 < 0.18.3_0 (platform darwin 14 != darwin 15) djview 4.10_0 < 4.10_0 (platform darwin 14 != darwin 15) gcc47 4.7.4_5 < 4.7.4_5 (platform darwin 14 != darwin 15) [...]
I think we should have only "one" installer, MacPorts-2.3.4.pkg, and only packages which do not depend on darwinXY,
emacs-mac-app @5.9_0+imagemagick+rsvg.darwin.tbz2 [...]
After a new OSX release if there is some package that do not work, it would be upgraded when the fix has been found.. without constrain the users in upgrading what really already works..
Ciao,
Angelo.
comment:5 follow-up: 6 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to graziosi.angelo@…:
Yesterday I followed your suggestion, and did a smooth upgrade
sudo port upgrade xz sudo port upgrade harfbuzz sudo port upgrade libtheora sudo port upgrade iTerm2 sudo port upgrade atool sudo port upgrade aspell sudo port upgrade aspell-dict-en sudo port upgrade aspell-dict-it sudo port upgrade dos2unix sudo port upgrade unrar sudo port upgrade lftp sudo port upgrade tesseract-eng sudo port upgrade tesseract-ita sudo port upgrade p7zip sudo port upgrade djvu2pdf sudo port upgrade pdf2djvu sudo port upgrade clamav sudo port upgrade allegro5-devel sudo port upgrade gv sudo port upgrade plotutils sudo port upgrade xfig sudo port upgrade xorg-server sudo port upgrade root6 sudo port upgrade at-spi2-core at-spi2-atk sudo port upgrade gdk-pixbuf2 sudo port upgrade emacs-mac-appThese were only requested packages and all have been upgraded.
Great! I'm glad that worked so smoothly.
The only packages which failed were:
pdftk geant4 (qt4-mac) djview (qt4-mac)
Yup, those are I believe known problems on El Capitan right now.
It took more than 12 hours..
Unfortunately we don't have an automated build server set up for El Capitan yet. (We've requested one, but we have no control over the speed with which our administrator responds to our requests.) Without a build server, the builds have to happen on your own computer, which can take some time.
more then 12 hours to "upgrade" what already worked fine: installed under Yosemite and working under El Capitan. And this only because MacPorts says:
cloog 0.18.3_0 < 0.18.3_0 (platform darwin 14 != darwin 15) djview 4.10_0 < 4.10_0 (platform darwin 14 != darwin 15) gcc47 4.7.4_5 < 4.7.4_5 (platform darwin 14 != darwin 15) [...]I think we should have only "one" installer, MacPorts-2.3.4.pkg, and only packages which do not depend on darwinXY,
emacs-mac-app @5.9_0+imagemagick+rsvg.darwin.tbz2 [...]After a new OSX release if there is some package that do not work, it would be upgraded when the fix has been found.. without constrain the users in upgrading what really already works..
I agree that it would be nice to have a single installer package for MacPorts itself that works on any OS X version, but we don't have that right now and I'm not aware of anyone working on making that work.
I understand that rebuilding ports that seem to already work is frustrating to you, but we don't plan to change this necessity when updating to a new OS X version. It is due to years of past experience that we have deliberately programmed MacPorts to work this way. Rebuilding your ports now ensures they'll continue to work on your new system.
If you'd like to discuss further, please subscribe to the MacPorts users mailing list and write there.
comment:6 Changed 9 years ago by graziosi.angelo@…
Replying to ryandesign@…:
Replying to graziosi.angelo@…:
Great! I'm glad that worked so smoothly.
The only packages which failed were:
pdftk geant4 (qt4-mac) djview (qt4-mac)Yup, those are I believe known problems on El Capitan right now.
After applying this patch: https://trac.macports.org/raw-attachment/ticket/48129/qt4-mac.10.11.diff, I could upgrade also djview and geant4. So the only package which does not upgrade in 10.11 is pdftk... :-(
Angelo
Step 2 of the migration instructions tells you to reinstall MacPorts base, which fixes the problem you mentioned, without affecting your installed ports.