Hello, (a novice question) I installed a package (py25-matplotlib), had some trouble with using it, then did a port selfupdate, then upgraded the package. In the process, a number of packages were deactivated. For example, it looks like I now have two copies of python25, numpy, 3 copies of libpng, etc. How can I uninstall these now (to clean up and save disk space)? For example port uninstall python25 @2.5.1_2+darwin_8 says that I cannot uninstall this (deactivated) python because other things depend on it. Most of those things are things that I'm actively using (py-readline for example). should I uninstall and reinstall all of these? If so, it seems like upgrading is a bad strategy, one can save work by uninstalling and reinstalling?
On Wed, Mar 19, 2008 at 10:04 PM, J P Lewis <noisebrain@gmail.com> wrote:
Hello,
(a novice question)
I installed a package (py25-matplotlib), had some trouble with using it, then did a port selfupdate,
then upgraded the package. In the process, a number of packages were deactivated.
For example, it looks like I now have two copies of python25, numpy, 3 copies of libpng, etc.
How can I uninstall these now (to clean up and save disk space)?
For example port uninstall python25 @2.5.1_2+darwin_8 says that I cannot uninstall this (deactivated) python because other things depend on it.
Most of those things are things that I'm actively using (py-readline for example).
should I uninstall and reinstall all of these? If so, it seems like upgrading is a bad strategy, one can save work by uninstalling and reinstalling?
port -f uninstall inactive should do it. -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@gmail.com>
On Mar 20, 2008, at 00:04, J P Lewis wrote:
(a novice question)
I installed a package (py25-matplotlib), had some trouble with using it, then did a port selfupdate,
then upgraded the package. In the process, a number of packages were deactivated.
For example, it looks like I now have two copies of python25, numpy, 3 copies of libpng, etc.
How can I uninstall these now (to clean up and save disk space)?
For example port uninstall python25 @2.5.1_2+darwin_8 says that I cannot uninstall this (deactivated) python because other things depend on it.
Most of those things are things that I'm actively using (py- readline for example).
should I uninstall and reinstall all of these? If so, it seems like upgrading is a bad strategy, one can save work by uninstalling and reinstalling?
Welcome to MacPorts! The message you're referring to is misleading. It says that this specific version of the port cannot be uninstalled because other ports depend on it. In fact, MacPorts has no concept of depending on a specific version of a port, so the message should just say that other ports depend on that port. And since you already have a newer version of that port installed, there is no problem with uninstalling the older version. MacPorts is just being overly cautious. You can force the uninstallation as Paul said: sudo port -f uninstall python25 If you already know when you upgrade that you want to uninstall the older version, you can use the -u flag: sudo port -u upgrade python25 This will fail if any other ports depend on python25, with the same error message as discussed above. So you need to force it. But forcing the upgrade of e.g. python25 also forces the upgrade of all ports that python25 depends on, possibly multiple times. This is not what you want. So if you're going to force an upgrade, always use the -n flag with the -f flag to indicate that you do not want the recursive port upgrade feature: sudo port -nfu upgrade python25 Yes, this whole situation is a little less than ideal, but it's what we have right now.
I have a shell script that I run when I go to bed called good-night and part of it that pertains to Macports goes like this: #!/opt/local/bin/bash cd "~/base/" && /opt/local/bin/svn update && PATH=/bin:/sbin:/usr/ bin:/usr/sbin ./configure --enable-readline && /usr/bin/make && /opt/ local/bin/sudo /usr/bin/make install && /usr/bin/make clean && /opt/ local/bin/port -v selfupdate && /opt/local/bin/port -fvdRnu upgrade outdated && /opt/local/bin/port -fvdR clean --all installed && /opt/ local/bin/port -fvdR uninstall inactive && /opt/local/bin/port -fvdR clean --all uninstalled Your thoughts please. Regards, On Mar 20, 2008, at 3:08 AM, Ryan Schmidt wrote:
On Mar 20, 2008, at 00:04, J P Lewis wrote:
(a novice question)
I installed a package (py25-matplotlib), had some trouble with using it, then did a port selfupdate,
then upgraded the package. In the process, a number of packages were deactivated.
For example, it looks like I now have two copies of python25, numpy, 3 copies of libpng, etc.
How can I uninstall these now (to clean up and save disk space)?
For example port uninstall python25 @2.5.1_2+darwin_8 says that I cannot uninstall this (deactivated) python because other things depend on it.
Most of those things are things that I'm actively using (py- readline for example).
should I uninstall and reinstall all of these? If so, it seems like upgrading is a bad strategy, one can save work by uninstalling and reinstalling?
Welcome to MacPorts!
The message you're referring to is misleading. It says that this specific version of the port cannot be uninstalled because other ports depend on it. In fact, MacPorts has no concept of depending on a specific version of a port, so the message should just say that other ports depend on that port. And since you already have a newer version of that port installed, there is no problem with uninstalling the older version. MacPorts is just being overly cautious. You can force the uninstallation as Paul said:
sudo port -f uninstall python25
If you already know when you upgrade that you want to uninstall the older version, you can use the -u flag:
sudo port -u upgrade python25
This will fail if any other ports depend on python25, with the same error message as discussed above. So you need to force it. But forcing the upgrade of e.g. python25 also forces the upgrade of all ports that python25 depends on, possibly multiple times. This is not what you want. So if you're going to force an upgrade, always use the -n flag with the -f flag to indicate that you do not want the recursive port upgrade feature:
sudo port -nfu upgrade python25
Yes, this whole situation is a little less than ideal, but it's what we have right now.
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Charlse> I have a shell script that I run when I go to bed called Charlse> good-night and part of it that pertains to Macports goes like Charlse> this: ... Charlse> Your thoughts please. My only thought would be to wrap the lines suitably: #!/opt/local/bin/bash cd "~/base/" \ && /opt/local/bin/svn update \ && PATH=/bin:/sbin:/usr/bin:/usr/sbin ./configure --enable-readline \ && /usr/bin/make \ && /opt/local/bin/sudo /usr/bin/make install \ && /usr/bin/make clean \ && /opt/local/bin/port -v selfupdate \ && /opt/local/bin/port -fvdRnu upgrade outdated \ && /opt/local/bin/port -fvdR clean --all installed \ && /opt/local/bin/port -fvdR uninstall inactive \ && /opt/local/bin/port -fvdR clean --all uninstalled Now that I can read what you wrote ;-) I have a couple other questions: * Why not put /opt/local/bin in your PATH? * Why prefer /opt/local/bin/sudo over the version Apple installed? * Referencing /usr/bin/make suggests you think there's another version earlier in your PATH. Kinda curious about that. -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/
Hello all, I found out (the hard way) that the latest Apple Security Update 2008-002 for Tiger replaces the apachectl file in /usr/sbin. If, like me, you had copied the apachectl file from /opt/local/apache2/bin to /usr/sbin (this enables you to turn Apache on and off using the System Prefs/Sharing/Personal Web Sharing), you will find that the next time you restart Apache, things go haywire, like none of your PHP works any more. It's because your system has reverted to the Apache 1.3 that comes with Tiger. John Korchok
John Korchok wrote:
Hello all,
I found out (the hard way) that the latest Apple Security Update 2008-002 for Tiger replaces the apachectl file in /usr/sbin. If, like me, you had copied the apachectl file from /opt/local/apache2/bin to /usr/sbin (this enables you to turn Apache on and off using the System Prefs/Sharing/Personal Web Sharing), you will find that the next time you restart Apache, things go haywire, like none of your PHP works any more. It's because your system has reverted to the Apache 1.3 that comes with Tiger.
John, I know about assuming, but I'll still assume that you fixed this somehow (like re-copied apachectl to /usr/sbin). Are there other steps to making Personal Web Sharing run Apache2? If so, could you please detail them for those of us who just can't remember anything? In A Chord, Tom Condon Bass, Agate Passage Quartet Bass & Proud Member, Kitsap Chordsmen Dir. Music Education, Evergreen District, BHS
If you are comfortable with the command line, all you need to do is to link to the installation of apache that you want to control from the preferance panes. 1. $cd /usr/sbin 2. $mv apachectl apachectl1-3 3. $ln -s /opt/local/apache2/bin/apachectl apachectl when you list the directory it should give you something like this: ... apachectl -> /opt/local/apache2/bin/apachectl ... and you should now be able to control macports apache2 from you preference pane. On Thu, Mar 20, 2008 at 9:18 AM, Thomas Condon <tomc@sounddsl.com> wrote:
John Korchok wrote:
Hello all,
I found out (the hard way) that the latest Apple Security Update 2008-002 for Tiger replaces the apachectl file in /usr/sbin. If, like me, you had copied the apachectl file from /opt/local/apache2/bin to /usr/sbin (this enables you to turn Apache on and off using the System Prefs/Sharing/Personal Web Sharing), you will find that the next time you restart Apache, things go haywire, like none of your PHP works any more. It's because your system has reverted to the Apache 1.3 that comes with Tiger.
John,
I know about assuming, but I'll still assume that you fixed this somehow (like re-copied apachectl to /usr/sbin).
Are there other steps to making Personal Web Sharing run Apache2? If so, could you please detail them for those of us who just can't remember anything?
In A Chord,
Tom Condon Bass, Agate Passage Quartet Bass & Proud Member, Kitsap Chordsmen Dir. Music Education, Evergreen District, BHS _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
On Mar 20, 2008, at 07:06, skip@pobox.com wrote:
Charlse> I have a shell script that I run when I go to bed called Charlse> good-night and part of it that pertains to Macports goes like Charlse> this:
...
Charlse> Your thoughts please.
My only thought would be to wrap the lines suitably:
#!/opt/local/bin/bash
cd "~/base/" \ && /opt/local/bin/svn update \ && PATH=/bin:/sbin:/usr/bin:/usr/sbin ./configure --enable- readline \ && /usr/bin/make \ && /opt/local/bin/sudo /usr/bin/make install \ && /usr/bin/make clean \ && /opt/local/bin/port -v selfupdate \ && /opt/local/bin/port -fvdRnu upgrade outdated \ && /opt/local/bin/port -fvdR clean --all installed \ && /opt/local/bin/port -fvdR uninstall inactive \ && /opt/local/bin/port -fvdR clean --all uninstalled
Now that I can read what you wrote ;-)
I wish you wouldn't indiscriminately use the -f (force) flag all the time. If it were intended to be used all the time it would have been made the default. In particular it should only be needed for "port -f uninstall inactive". It should not be needed for clean, and the only times it would be needed for upgrade are in unusual situations, which you would probably want to handle by hand individually rather than automate.
On Thu, Mar 20, 2008 at 3:17 PM, Ryan Schmidt <ryandesign@macports.org> wrote:
I wish you wouldn't indiscriminately use the -f (force) flag all the time. If it were intended to be used all the time it would have been made the default. In particular it should only be needed for "port -f uninstall inactive". It should not be needed for clean, and the only times it would be needed for upgrade are in unusual situations, which you would probably want to handle by hand individually rather than automate.
I non-concur on this: I think -f should be the default on upgrades (if you don't mean it, don't ask for it). It's confusing, in case the regular flow of questions on this hasn't made clear. Ideally, you wouldn't need any flags: port upgrade foo would Just Work. I would put clean in a central config file as well: I suspect this isn't done on a port by port basis. Are there cases where you don't need -f on upgrades? I generally find I have to use it all the time if I am upgrading anything. -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@gmail.com>
participants (8)
-
Charlse Darwin
-
J P Lewis
-
John Korchok
-
Matt Hippely
-
paul beard
-
Ryan Schmidt
-
skip@pobox.com
-
Thomas Condon