# portmaster hints



## bigearsbilly (Jul 24, 2010)

Does anyone have any hints for using portmaster.
Is it actually any good for anything?

Every time I use it, like tonight, I spend 8 hours trying to get my system to
work again.
I have currently resorted to using the twm window manager trying to fix all the things
portmaster breaks. At least it didn't break X windows.

Nearly everything I touch after using portmaster requests an earlier library/port.
So now I'm writing /etc/libmap.conf files.


It's a real pain.


----------



## dennylin93 (Jul 24, 2010)

It's actually a great tool. Can't even remember the last time I broke anything.

Did you read /usr/ports/UPDATING before updating?


----------



## phoenix (Jul 24, 2010)

Search the forums.  Most issues with the ports tree arise from people blindly using -a and/or -f, not reading /usr/ports/UPDATING before beginning, not doing things in small batches, and not reading relevant man pages (ports(7), portmaster(8) for starters).

For example, using the following portmaster options is highly recommended:  *-b -d -w*


----------



## bigearsbilly (Jul 26, 2010)

well I guess all tools are good if you know how to use 'em!

Having a powercut mid stream probably didn't help.
I've read all the docs, I even have the book, Absolute FreeBSD.
Monday morning still at it.

phew!


----------



## SirDice (Jul 26, 2010)

bigearsbilly said:
			
		

> Nearly everything I touch after using portmaster requests an earlier library/port.


You're doing it wrong.



> So now I'm writing /etc/libmap.conf files.


Don't. Fix the problem, don't try to circumvent it.


----------



## DutchDaemon (Jul 26, 2010)

I would really suggest you wipe your current ports and start over again. Read:

[cmd=]man portmaster | less +/"     Using portmaster to do a complete reinstallation of all your ports"[/cmd]

You could consider using a /usr/loca/etc/portmaster.rcfile to speed things up. It is described here:

[cmd=]man portmaster | less +/^FILES[/cmd]

I use this one (stripped):


```
# Always save the backup packages of the old port (-b)
BACKUP=bopt

           # Always delete stale distfiles without prompting (-d)
ALWAYS_SCRUB_DISTFILES=dopt

           # Arguments to pass to make (-m)
PM_MAKE_ARGS='-DFORCE_PKG_REGISTER'

           # Save copies of old shared libraries (recommended) (-w)
SAVE_SHARED=wopt

           # Install a package if available (-P or packages)
PM_PACKAGES=first

           # Suppress the build confirmation message (no-confirm)
PM_NO_CONFIRM=pm_no_confirm
```

Especially the PM_PACKAGES=first is advised, as it will get you up and running really quickly. Make sure you set a sensible PACKAGESITE variable if you're on a -RELEASE.


----------



## bigearsbilly (Jul 26, 2010)

*[solved]*

thanks chaps, most helpful.
yes I started building a .rc file for portmaster but thanks DutchDaemon for the hints
I will try them.

I guess there's no substitute for hard work.
Thanks guys I'll get on with it.

I like the *--list-origins*. I guess that would be a way
of loading a consistent set of ports after a fresh install.

edit: I can't figure out how to mark as [solved].


----------



## SirDice (Jul 26, 2010)

bigearsbilly said:
			
		

> edit: I can't figure out how to mark as [solved].


Edit your first post in this thread. Go to "advanced".


----------



## DutchDaemon (Jul 26, 2010)

bigearsbilly said:
			
		

> I like the *--list-origins*. I guess that would be a way
> of loading a consistent set of ports after a fresh install.



Yes, I have this in all of my crontabs everywhere:


```
0 22 * * *	/usr/local/sbin/portmaster --list-origins > /root/ports_today
```

Of course, that /root/ports_today is also backed up every day.


----------



## bigearsbilly (Jul 27, 2010)

you are a lucky man DutchDaemon.
I've never found a working environment here in england that
uses FreeBSD. Always linux now, occasional solaris.

BTW I managed to get myself out of the hole without reinstalling all 
the ports.
thanks chaps.


----------

