#10709 closed defect (fixed)
BUG: php5 upgrade fails creating mysql symlinks if they already exist
Reported by: | gjyuieavuigzs@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.3.2 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: |
Description
Whe upgrading from php5.1.4_3 to php5.1.6_0 I get the following error.
... ---> Extracting php-5.1.6.tar.bz2 DEBUG: setting option extract.args to /opt/local/var/db/dports/distfiles/php5/php-5.1.6.tar.bz2 DEBUG: Assembled command: 'cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work" && /opt/local/bin/bzip2 -dc /opt/local/var/db/dports/distfiles/php5/php-5.1.6.tar.bz2 | /usr/bin/gnutar --no-same-owner -xf -' DEBUG: Executing proc-post-com.apple.extract-extract-0 DEBUG: Executing proc-post-com.apple.extract-extract-1 Error: Target com.apple.extract returned: could not create new link "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib": that path already exists Warning: the following items did not execute (for php5): com.apple.activate com.apple.extract com.apple.patch com.apple.configure com.apple.build com.apple.destroot com.apple.archive com.apple.install
Change History (14)
comment:1 Changed 18 years ago by markd@…
Summary: | upgrade to php5.1.6 fails → BUG: php-5.1.6 upgrade fails |
---|
comment:2 Changed 18 years ago by jyrkiwahlstedt
Status: | new → assigned |
---|
comment:3 Changed 18 years ago by jyrkiwahlstedt
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Clean is the thing to do (this is not php5 thing per se!).
comment:4 Changed 18 years ago by jkorchok@…
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Even after using "sudo port clean php5" and "sudo port clean installed", I am getting a very similar error:
sudo port upgrade installed ---> Activating php5 5.1.2_0+apache2+darwin_8+macosx+mysql5 ---> Deactivating php5 5.1.2_0+apache2+darwin_8+macosx+mysql5 ---> Fetching php5 ---> Verifying checksum(s) for php5 ---> Extracting php5 Error: Target com.apple.extract returned: could not create new link "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib": that path already exists
This did not happen with any of the other ports, just php5. Cleaning does _not_ solve it.
comment:5 Changed 18 years ago by ryandesign (Ryan Carsten Schmidt)
severity: | Crash/data loss → Serious |
---|
The output you copied into this bug shows php version 5.1.2 which is very old. php 5.2.0 is the current version. Please "sudo port selfupdate" to make sure you have the current version of MacPorts and also update your ports tree to include php 5.2.0.
Furthermore, "sudo port clean php5" is not sufficient. Please try "sudo port clean --all php5" and then "sudo port install php5" (with any variants desired).
comment:6 Changed 18 years ago by ryandesign (Ryan Carsten Schmidt)
Sorry, I meant to add: if you already have php5 installed, then either "sudo port uninstall php5" first, or use "sudo port upgrade php5" instead of "sudo port install php5".
comment:7 Changed 18 years ago by macports@…
I can confirm that this error occurs even with the most recent version of macports and when upgrading from php 5.1.6:
Macport is up to date:
testhaufen02:~ fgilcher$ sudo port selfupdate DarwinPorts base version 1.320 installed Downloaded MacPorts base version 1.320 The MacPorts installation is not outdated and so was not updated selfupdate done!
The error message I get is:
testhaufen02:~ fgilcher$ sudo port upgrade php5---> Deactivating php5 5.1.6_2+darwin_8+fastcgi+macosx+mysql5+postgresql ---> Fetching php5 ---> Verifying checksum(s) for php5 ---> Extracting php5 Error: Target com.apple.extract returned: could not create new link "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib": that path already exists
Same message when I uninstall php5 and try to reinstall:
testhaufen02:~ fgilcher$ sudo port uninstall php5 ---> Uninstalling php5 5.1.6_2+darwin_8+fastcgi+macosx+mysql5+postgresql testhaufen02:~ fgilcher$ sudo port install php5 +fastcgi+macosx+mysql5+postgresql ---> Extracting php5 Error: Target com.apple.extract returned: could not create new link "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib": that path already exists Error: Status 1 encountered during processing.
However, uninstalling, then cleaning, then reinstalling seems to work.
The relevant messages from the debug log are:
DEBUG: Executing com.apple.extract (php5) ---> Extracting php-5.2.0.tar.bz2 DEBUG: setting option extract.args to /opt/local/var/db/dports/distfiles/php5/php-5.2.0.tar.bz2 DEBUG: Assembled command: 'cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work" && /usr/bin/bzip2 -dc /opt/local/var/db/dports/distfiles/php5/php-5.2.0.tar.bz2 | /usr/bin/gnutar --no-same-owner -xf -' DEBUG: Executing proc-post-com.apple.extract-extract-0 Error: Target com.apple.extract returned: could not create new link "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib": that path already exists Warning: the following items did not execute (for php5): com.apple.activate com.apple.extract com.apple.patch com.apple.configure com.apple.build com.apple.destroot com.apple.archive com.apple.install
regards
felix
comment:8 Changed 18 years ago by macfreek (Freek Dijkstra)
I have the same problem when upgrading from PHP 5.1.6 to 5.2.0:
% sudo port installed php5 The following ports are currently installed:
php5 @5.1.6_2+apache2+darwin_8+macosx+mysql5 (active)
% sudo port upgrade php5 ---> Deactivating php5 5.1.6_2+apache2+darwin_8+macosx+mysql5 ---> Extracting php5 Error: Target com.apple.extract returned: could not create new link "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib": that path already exists
ls -ld /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib lrwxr-xr-x 1 root admin 21 14 Nov 13:12 /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_php5/work/mysql5/lib@ -> /opt/local/lib/mysql5
I was able to workaround this problem with:
% sudo port uninstall php5 % sudo port clean php5 % sudo port install php5 +apache2+darwin_8+macosx+mysql5
But this is surely a bug.
Regards, Freek
comment:9 Changed 18 years ago by macfreek (Freek Dijkstra)
Sorry about the formatting (I assumed MediaWiki format, but it now different. Why do MediaWiki, MarkDown, Textile, WakaWikki and Trac all have different formattiing?!? Grrr)
comment:10 Changed 18 years ago by cluon@…
Ran into the same problem. Looks like this is a problem where the upgrade is somehow prepopulating the link location for mysql5, whereas the install does not. The workaround given by software@… above worked for me as well.
comment:11 Changed 18 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added; opendarwin-2006@… removed |
---|---|
Owner: | changed from jwa@… to ryandesign@… |
Priority: | Blocker → Expected |
Status: | reopened → new |
Summary: | BUG: php-5.1.6 upgrade fails → BUG: php5 upgrade fails creating mysql symlinks if they already exist |
I would love to add a check to the portfile so that it doesn't try to create the link if it already exists, but I do not know the syntax to do that. If someone is more familiar with TCL / Portfile syntax than me and would like to submit a patch, that would be great.
comment:12 Changed 18 years ago by pipping@…
Milestone: | → Port Bugs |
---|
comment:13 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have a feeling that r25033 will have fixed this. If you still experience the problem with MacPorts 1.4.42 or greater, please reopen the bug, or if Trac will not let you, email me and I'll do it.
This sounds like port needs to be cleaned: $ sudo port clean php5 (or perhaps clean --all)