Ports foot-shooting revealed! (learning the hard way ...)

Tillman Hodgson tillman at seekingfire.com
Mon Jan 31 07:06:25 PST 2005


Howdy folks,

This isn't a rant, because I'd have to rant about my own stupidity.
Instead it's more of a humourous story about what /not/ to do.

Anyway, I was poking around for a port a few days ago, so I did this:

# cd /usr/ports
# make seach name="tor"
make: don't know how to make seach. Stop

Gah. I do that all the time. It's like my fingers sometimes don't hit
the 'r' key hard enough. (Yes, this is part of the foot-shooting story).
Ok, here we go again:

# make search name="^tor"
(Much better, output is a bunch of results instead of an error)

Oh, hey /usr/ports/security/tor looks like what I was thinking of!

# cd /usr/pots/security/tor
bash: cd: usr/pots/security/tor: No such file or directory
(I didn't notice this -- typing too fast)
# make install
(starts to build *all* ports in the ports tree ...)
(I wander off for some coffee, thinking all is right with the world)

I can't think of any reason why anyone would want to build *all* ports,
especially considering that some of them would conflict with each other.
So I don't think that this command would even work (given enough time,
CPU and disk space). I was certainly surprised the first time I did it.

In some ways it reminds me the "rm -rf / shouldn't work" bike shed from
a few months ago. Checking for PWD=/usr/ports would be the same bike
shed, I suspect.

Granted, it could be easily solved by smarter shell usage. For example,
I could have done `cd /usr/pots/security/tor && make install` (my new
preferred "watch out for typos!" method). Or I could have actually
waited a second before typing `make install` and *read* the error
message. Practiced safe "root" and all that.

But I didn't. Twice now, in the past few years. I generally notice about
the time that I think "Hmmmm, that port shouldn't be taking *that* long
to build ...". The cleanup isn't too hard: the dates from the /var/db/
stuff are very helpful. But it's annoying :-)

Ah well, hopefully someone will learn from me revealing my foot-shooting
to the world and avoid a similar fate ;-)

-T


-- 
The strictest limits are self-imposed.
	- Friedre Ginaz, Philosophy of the Swordmaster


More information about the freebsd-ports mailing list