pkg_version -l "<" to get a list of outdated ports than using portupgrade -R [port_name]?markbsd said:Or would I be better off installing ports-mgmt/portupgrade and runningpkg_version -l "<"to get a list of outdated ports than usingportupgrade -R [port_name]?
portmaster [port_name] pkg info is a command from the new pkg package management system. If you have switched to pkg, do not use any of the old package system commands any more. The old system commands all start with pkg_. Note the underline.tzoi516 said:I've been using ports-mgmt/portmaster and runningportmaster [port_name}
wblock@ said:Careful, you have multiple things mixed together.
The ports tree is meant to work as a whole. If you try to leave some ports at outdated versions, it will eventually cause problems.
portmaster -af it was running for 3 straight days (literally), then left my system not working correctly. So, I've done a fresh install and am using a minimalist approach.pkg infois a command from the new pkg package management system. If you have switched to pkg, do not use any of the old package system commands any more. The old system commands all start with pkg_. Note the underline.
pkg_info alternative? And is it even unwise to perform query pkg_ commands?ports-mgmt/portmaster and ports-mgmt/portupgrade were developed to handle upgrading ports. Use them. In fact, use portmaster. There is almost no reason to go with portupgrade. Related: Upgrading FreeBSD Ports.
portmaster?As far as using packages for port upgrades: I'm convinced that most people spend more time "saving time" with binary packages than just building from ports. No doubt somebody has it working perfectly and we don't hear from them because there are no problems, but we sure hear about the other side.
markbsd said:And this just installs the new version over the top of the existing version?
tzoi516 said:Recursively checks and upgrades/installs all dependencies of the installed port.
markbsd said:And this just installs the new version over the top of the existing version?
Ultimately, I want to keep all my apps (which have all been installed from ports) up-to-date. But when I last performed portmaster -af it was running for 3 straight days
What is the pkgngpkg_infoalternative?
pkg infoAnd is it even unwise to perform query pkg_ commands?
So, how do I perform updates/upgrades withportmaster?
I am using exclusively ports this time round. It takes forever to install things, but apparently it's better.
markbsd said:And this just installs the new version over the top of the existing version?
pkg in your command prompt? All the commands are fully explained in the man page, and the same can be said of portmaster.A bit simplified, but that’s how I do it (a beginner managing and old computer for fun):portsnap fetch updateupdates the port tree,pkg [updating|version]to read updating information and check needed updates,portmaster [-e] [port1, port2…]to install and delete ports.
wblock@ said:Yes, but it also updates any ports that depend on the one just updated.
# Install packages for build-only dependencies (--packages-build)
PM_PACKAGES_BUILD=pmp_build
# Delete build-only dependencies when finished (--delete-build-only)
PM_DEL_BUILD_ONLY=pm_dbo
I got the command from the Handbook. I don't know if it's outdated, but I won't ever be running that command again. I couldn't believe how long it took. Only to render my system unusable!Yes, -af means "force rebuilding of every installed port". Don't do that, it is not appropriate for routine use. Even -a is should not be used until after checking /usr/ports/UPDATING, as mentioned in the article above.
Good to know. Thanks!pkg info
The old package database is completely different from the new. As soon as you switched, the information in the old one was out of date. After switching to pkg, do not use the old commands or trust information they provide. It is wrong.
I just wish it didn't take so long!
markbsd said:Is this a bad thing? If I have
In my /usr/local/etc/portmaster.rc, will the update process still delete build dependencies post install? Which is, ideally, what I want, yes?Code:# Install packages for build-only dependencies (--packages-build) PM_PACKAGES_BUILD=pmp_build # Delete build-only dependencies when finished (--delete-build-only) PM_DEL_BUILD_ONLY=pm_dbo
I got the command from the Handbook.
I just wish it didn't take so long!
wblock@ said:Build dependencies may be needed again by something else, so I don't delete them and have not tried having portmaster auto-delete them. This could be a form of premature optimization.
Where, exactly?
If you did not delete build dependencies, it would take less time because they would not have to be rebuilt every time...
portmaster update, I'd want as few apps as possible being updated, so it's not running for several days.#pkg audit -F
portaudit.#portsnap fetch update
#more /usr/ports/UPDATING
#portmaster -aD
portmaster --clean-distfiles to clean out old versions of distfiles that were missed when something went wrong. To make things build a little faster check out this tutorial.You might want to look intomarkbsd said:But, how many ports that I install would have the same build dependencies as previously installed ports?
portmaster -l | tee portmaster.log. This will give you a list of all the installed ports divided into categories. You'll see exactly which ports have dependencies and which do not.# make build-depends-list which you can run in a port directory to check for these. Be careful that you don't mix these with the run dependencies; sometimes they overlap but more than often they don't or differ slightly.markbsd said:http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
Near the end of the page.
If errors are encountered during the upgrade process, add -f to upgrade and rebuild all ports:
# portmaster -af
wblock@ said:Well, there are the autotools ports, which are not terribly big. But there is also gcc, and a lot of ports use a particular version. So on an upgrade, it must be built, then discarded.
So yes, that could certainly slow down the upgrade of lots of things. So let me suggest turning off these options and running without them for a few months. They can always be turned back on later, but as it is, they are probably slowing down the process.
cd /usr/ports/x11-wm/xfce4 && make install clean. Does using portmaster /x11-wm/xfce4 (as opposed to make install) install more dependencies or something? Because it's taking so much longer to install this time than the last.srobert said:My (almost daily) port upgrades for my laptop usually proceed as follows.
Only do that if you have PKGNG. If not I think it'sCode:#pkg audit -Fportaudit.
If that reports no problems. Then I do.
Assuming it updates the ports tree, I then do:Code:#portsnap fetch updateIf the UPDATING file has no special instructions, I then do:Code:#more /usr/ports/UPDATING
Then I select any new options that are needed and let it run to completion.Code:#portmaster -aD
I typically do this at the end of the day and it usually doesn't take long. Sometimes a large port like editors/libreoffice or www/firefox gets rebuilt, in which case I let it run overnight. If a large number of ports is upgrading, the probability for some sort of failure increases. Reading the compiler errors and doing some forum searches leads to resolution. Most often the whole process concludes in less than 15 minutes. That's on a dual core amd64 with 4 GB of RAM. Once in a while I do aportmaster --clean-distfilesto clean out old versions of distfiles that were missed when something went wrong. To make things build a little faster check out this tutorial.
portmaster -af literally took several days! And, I ran portmaster x11-wm/xfce4 a little over 4 hours ago -- it's still running!ShelLuser said:You might want to look intoportmaster -l | tee portmaster.log. This will give you a list of all the installed ports divided into categories. You'll see exactly which ports have dependencies and which do not.
At first this can help you with getting an idea which ports would be suitable for removal. But these ports can also be liable build dependencies (provided you didn't de-install those already).
But in the end most ports will have build dependencies; see# make build-depends-listwhich you can run in a port directory to check for these. Be careful that you don't mix these with the run dependencies; sometimes they overlap but more than often they don't or differ slightly.
portmaster -l do this?wblock@ said:That's... well, not terrible. Not sure what situation the author was anticipating. (This time, at least, it was not something I wrote...)
portmaster), how long do you recall it took? Over 4 hours seems excessive, and it shows no signs of finishing up anytime soon markbsd said:I'll take your advice, see how it goes. I just don't want to end up with 100+ ports installed.
Xfce4, for example, only has 13 run dependencies, but it's now been installing from ports for OVER 4 HOURS! That's insane! I don't remember it taking this long when I installed it last week usingcd /usr/ports/x11-wm/xfce4 && make install clean. Does usingportmaster /x11-wm/xfce4(as opposed tomake install) install more dependencies or something? Because it's taking so much longer to install this time than the last.
I don't know how you get it done in 15 minutes. My lastportmaster -afliterally took several days!
And, I ranportmasterx11-wm/xfce4 a little over 4 hours ago -- it's still running!
(portmaster -af) Maybe it should be removed from the Handbook if it is not advisable to perform that command? Or, at least, a warning of its potential for disaster should be given.
Out of interest, for those of you who have installed xfce4 from ports (specifically,portmaster), how long do you recall it took? Over 4 hours seems excessive, and it shows no signs of finishing up anytime soon![]()
wblock@ said:Huh? With X and any window manager, you'll have a lot more than 100 ports installed. There are lots of dependencies. That's just the way modern software works.
I usedYou were installing packages last time, right? Or had some installed already. Either way, a fresh build from ports takes a while, because it has to compile all the needed dependencies. The first build always takes longer because of that.
pkg_add last install. This is a fresh install where I've decided to use ports exclusively. I may have to rethink this decision.Oh! That's not what I wanted.Yes. -a means "rebuild everything that needs an upgrade". But -af means "force-rebuild everything, whether it needs it or not."
Yes, from scratch. All that has been done on this system is:Are you installing xfce from scratch? Because portmaster is an upgrade tool, and if you use it on a port that is already installed, it may just rebuild all the dependencies of that port.
portmaster x11/xorg (overnight) portmaster x11-wm/xfce4 (20 hours and counting)How does 20+ hours sound? Like something is wrong, yes?No, in context it is okay: "If errors are encountered". Problems arise when it is used routinely.
It depends on a lot of things, the speed of the computer and internet connection, the number of dependencies that are already installed, options set in /etc/make.conf, and others. Four hours or more on a slow machine, as it builds missing dependencies (including build dependencies, probably including gcc) is believable.
markbsd said:How does 20+ hours sound? Like something is wrong, yes?
# portmaster -a on a machine that appeared to have 26 ports that needed to be updated - it took about 24 hours. A previous update with just a few ports took just a few minutes. I could see that several of the huge ports got involved. I don't know why, but it seems that widely varying update times are a reality. This, by the way, was on a reasonable machine: G6950 Clarkdale 2.8GHz with 8GB ram.OJ said:Just for perspective's sake; I did# portmaster -aon a machine that appeared to have 26 ports that needed to be updated - it took about 24 hours. A previous update with just a few ports took just a few minutes. I could see that several of the huge ports got involved. I don't know why, but it seems that widely varying update times are a reality. This, by the way, was on a reasonable machine: G6950 Clarkdale 2.8GHz with 8GB ram.
markbsd said:Nevertheless, I think 20+ hours to install ~100 ports is deterrence enough to stay as far away from ports as I possibly can on this system!
What I'm now wondering, is if there are any possible complications from using pkgng the majority of the time, and using ports for very small installs. I've read that one should stick to one or the other, but, again, the consensus is divided with conflicting information.