My dumbest trick yet

This is one of those things that I will probably be looking for again in the future, no matter how lame it seems right now.

I like to keep local copies of the source code for the software I have on Crux systems, just because if something breaks and I am not online, then it helps to get things going again. It’s also useful if network speeds are slow or if there’s a problem getting a particular source package with the proper checksum.

On the other hand, that tends to take up a lot of space, particularly if there’s a large library or compile-time dependency involved. ocaml, for example, is a gargantuan beast that’s only really necessary to compile wyrd. Once it’s been built, I don’t need ocaml ever again.

So to save space I sometimes have to remove source packages (which can be neatly done with prt-utils’ prtwash -a -s command), but it makes me itchy.

So I decided today to get all the source packages back from the applications I’d installed and then cleared out, as a precautionary measure. pkgmk has a -do flag, which just gets the package but doesn’t do anything with it.

But I don’t think you can give pkgmk the name of a program to build; it has to be executed from the port directory, where it reads the Pkgfile and goes to work.

Now prt-get has a path command, which spits out the full path of a package, and that means I can cd into a path‘d directory and issue the pkgmk -do command.

If I can get a proper list of all the packages on the system, that is. prt-get to the rescue again, with the wonderfully sparse listinst command. Ergo:

for i in `prt-get listinst` ; do cd `prt-get path $i` ; pkgmk -do ; done

Not much in the way of error checking. Definitely not idiot-proof. And it could, I suppose, stand to save a little bandwidth if the package is already on hand and passes an md5sum check.

But those are embellishments. Flair! Bloat! :evil:

Anyway, that’s probably the dumbest thing I’ve come up with for a while. Watch: This’ll be the most frequent page I hit over the next year or so. This and the page for setting locales. … :roll:

About these ads

0 Responses to “My dumbest trick yet”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,961,445 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: