Tuesday, February 27, 2007

SQLyog annoyances.

  1. Do a query like "SELECT a.id, a.name, a.* FROM a"
  2. Swap from read only to edit mode
  3. Go through and set the a.name to NULL
  4. Move to the next row
Expected:
SQLyog does an update statement - UPDATE a SET name = NULL WHERE a.id = ?

Actual:
SQLyog does an update statement - UPDATE a SET id = ?, name = NULL, id=?, name="fish" WHERE a.id = ?


  1. Do a query like "SELECT a.id, a.name, a.* FROM a"
  2. Swap to edit mode
  3. Highlight a.id (so the cell has focus and is selected)
  4. Set a.name to NULL
Expected:
a.name becomes NULL
Actual:
a.name becomes the highlighted value

See this bug and that bug

Monday, February 26, 2007

Ubuntu is fighting me.

Rrr.

It's not Ubuntu, per se, but gnome.

Here's what I want to do.

  • Add Songbird as a menu item

  • Make a new menu, called 'fucking awesome things which are handy I do not wish to place on my toolbar thing'

  • Make a shortcut key that doesn't hate me

Is it easy using the gnome menu editor? NO!
Windows: you grab the icon you want, drag it to a toolbar, and drop it. If you want to put it into your start menu, you hover over the button and the menu appears.

Instead I must do battle.

  • Applications menu

  • Pick up the songbird icon

  • OH SHIT, THE MENU HAS GONE. I JUST WANTED TO PUT IT IN "Sound & Video"

  • How do I cancel the drag drop action? ESC! ESC!!
Lazyweb, file the bugs in the right places to make this not a pain in the ass.

Sunday, February 18, 2007

Firebug, Prototype, Blogger & Json

Alright, I've had enough. Dealing with javascript is now too easy. Look:



<script src="javascript/prototype.js"></script>
<script src="javascript/scriptaculous.js"></script>
<script>
function render_headlines(data) {
var entries = $A(data.feed.entry);
var ul = document.createElement('ul');

entries.each(function(entry) {
var li = document.createElement('li');
var a = document.createElement('a');
a.setAttribute('href', entry.link.$t);
a.appendChild(document.createTextNode(entry.title.$t));
li.appendChild(a);
ul.appendChild(li);
});

window.onload = function() {
$("headlines").appendChild(ul);
}
}
</script>
<script type="text/javascript" src="http://clockwerx.blogspot.com/feeds/posts/default?alt=json-in-script&callback=render_headlines"></script>

<div id="headlines" />



... which will get the ATOM feed of this blog as JSON, call render_headlines(); and append an ul to #headlines.

Thursday, February 15, 2007

How SA can solve its brownout issues

I don't know about you, but summers of yesteryear often led to brownouts.

Now, you're a marketing guy at a power company. You know you have brownouts, and the customers certainly know too.
Kill two birds with one stone. Mail out 1000 CFLs a month. Put in a flyer, explaining that saving power is for each and every one of us; and you can make the world greener.

You get about 500 people who put the globe in, and reduce their usage by about 50W.

You get 100 people who go out and buy more CFLs for the rest of the house.

You get the equivalent of upgrading your generators after only a few months of doing this; and you get media coverage for the first few weeks which is worth more than the initial expenses.

Now why hasn't this happened?

Bookfeed, Dailylit

John Anquino has found a none-broken bookfeed.

Please hassle me to fix bookfeed and make it friendly.

A followup meeting

Another idea like this.

You hook your email client/calendar client up to your display driver.
As a deadline gets closer, a subtle change takes place in the red, green, blue mix of your screen; so that everything gets a bit more red as time goes on.

No interruption, but you'd soon teach yourself that red = prepare for interrupting.

I have a dream

Almost in the words of MLK:

I am happy to join with you today in what will go down in history as the greatest demonstration for freedom in the history of our department.

Five score months ago, a greatly hated developer, in whose symbolic shadow we stand today, left for Sweden. This momentous decree came as a great beacon light of hope to millions of wage slaves who had been seared in the flames of withering injustice. It came as a joyous daybreak to end the long night of their captivity.

But one hundred releases later, the programmer still is not free. One hundred releases later, the life of the programmer is still sadly crippled by the manacles of business requirements and the chains of process. One hundred releases later, the programmer lives on a lonely island of poverty in the midst of a vast ocean of material prosperity. One hundred years later, the programmer is still languished in the corners of valuation society and finds himself an exile in his own land. And so we've come here today to dramatize a shameful condition.

In a sense we've come to our company's capital to cash a check. When the architects of our republic wrote the magnificent words of the Mission Statement and the Declaration of Coding Standards, they were signing a promissory note to which every programmer was to fall heir. This note was a promise that all coders, yes, systems as well as developers, would be guaranteed the "unalienable Rights" of "Life, Liberty and the pursuit of Happiness." It is obvious today that Valex has defaulted on this promissory note, insofar as her citizens of nature are concerned. Instead of honoring this sacred obligation, Valex has given the programmers a bad check, a check which has come back marked "insufficient funds."

But we refuse to believe that the bank of justice is bankrupt. We refuse to believe that there are insufficient funds in the great vaults of opportunity of this company. And so, we've come to cash this check, a check that will give us upon demand the riches of freedom and the security of justice.

We have also come to this hallowed spot to remind Valex of the fierce urgency of Now. This is no time to engage in the luxury of cooling off or to take the tranquilizing drug of gradualism. Now is the time to make real the promises of refactoring. Now is the time to rise from the dark and desolate valley of business requirements to the sunlit path of stable code. Now is the time to lift our company from the quicksands of heavy regression to the solid rock of brotherhood. Now is the time to make justice a reality for all of God's children.

It would be fatal for the company to overlook the urgency of the moment. This sweltering summer of the programmer's legitimate discontent will not pass until there is an invigorating autumn of freedom and equality. 2007 is not an end, but a beginning. And those who hope that the programmer needed to blow off steam and will now be content will have a rude awakening if the company returns to business as usual. And there will be neither rest nor tranquility in Valex until the programmer is granted his svn commit rights. The whirlwinds of revolt will continue to shake the foundations of our company until the bright day of justice emerges.

But there is something that I must say to my people, who stand on the warm threshold which leads into the palace of justice: In the process of gaining our rightful place, we must not be guilty of wrongful deeds. Let us not seek to satisfy our thirst for freedom by drinking from the cup of bitterness and hatred. We must forever conduct our struggle on the high plane of dignity and discipline. We must not allow our creative protest to willful disregard of coding standards. Again and again, we must rise to the majestic heights of meeting physical force with soul force.

The marvelous new militancy which has engulfed the programmer community must not lead us to a distrust of all business people, for many of our business brothers, as evidenced by their presence here today, have come to realize that their destiny is tied up with our destiny. And they have come to realize that their freedom is inextricably bound to our freedom.

We cannot walk alone.

And as we walk, we must make the pledge that we shall always march ahead.

We cannot turn back.

There are those who are asking the devotees of time management and planning, "When will you be satisfied?" We can never be satisfied as long as the programmer is the victim of the unspeakable horrors of deadline brutality. We can never be satisfied as long as our bodies, heavy with the fatigue of development, cannot gain lodging in the motels of the highways and the hotels of the cities on the company credit card. *We cannot be satisfied as long as the programmer's basic mobility is from a smaller development box to a larger one. We can never be satisfied as long as our children are stripped of their self-hood and robbed of their dignity by a sign stating: "For Managers Only."* We cannot be satisfied as long as a Programmer in a meeting cannot vote and a programmer in a triage meeting believes he has nothing for which to vote. No, no, we are not satisfied, and we will not be satisfied until "justice rolls down like waters, and righteousness like a mighty stream."

I am not unmindful that some of you have come here out of great trials and tribulations. Some of you have come fresh from narrow cubicles. And some of you have come from areas where your quest -- quest for freedom -- left you battered by the storms of persecution and staggered by the winds of deadline brutality. You have been the veterans of creative suffering. Continue to work with the faith that unearned suffering is redemptive. Go back to your cubicle, go back to your dual monitors, go back to your mouse, go back to your office space, go back to your cess pool, go back to the chaos and hell of our IT department, knowing that somehow this situation can and will be changed.

Let us not wallow in the valley of despair, I say to you today, my friends.

And so even though we face the difficulties of today and tomorrow, I still have a dream. It is a dream deeply rooted in the Valex dream.

I have a dream that one day this department will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all tickets are created equal."

I have a dream that one day on the red bits of Gantt Charts, the sons of former coders and the sons of former managers will be able to sit down together at the table of brotherhood.

I have a dream that one day even the state of usual chaos, a state sweltering with the heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice.

I have a dream that my four little worksheets will one day live in a nation where they will not be judged by the urgency of their need but by the content of their character.

I have a dream today!

I have a dream that one day, down in Compliance, with its vicious checks, with its manager having his lips dripping with the words of "interposition" and "nullification" -- one day right there in Compliance little progress reports and mortgagee in possession reports will be able to join hands with residential shortforms and check valuations as sisters and brothers.

I have a dream today!

I have a dream that one day every valley shall be exalted, and every hill and mountain shall be made low, the rough places will be made plain, and the crooked places will be made straight; "and the glory of the Lord shall be revealed and all flesh shall see it together."

This is our hope, and this is the faith that I go back to work with.

With this faith, we will be able to hew out of the mountain of despair a stone of hope. With this faith, we will be able to transform the jangling discords of our department into a beautiful symphony of brotherhood. With this faith, we will be able to work together, to pray together, to struggle together, to go to jail together, to stand up for freedom together, knowing that we will be free one day.

And this will be the day -- this will be the day when all of God's children will be able to sing with new meaning:


My country 'tis of thee, sweet land of liberty, of thee I sing.

Land where my fathers died, land of the Pilgrim's pride,

From every mountainside, let freedom ring!

And if IT is to be a great department, this must become true.

And so let freedom ring from the prodigious hilltops of typing.

Let freedom ring from the mighty mountains of admin.

Let freedom ring from the heightening Alleghenies of
the sydney office.

Let freedom ring from the snow-capped office in Tassie.

Let freedom ring from the curvaceous slopes of Accounts.

But not only that:

Let freedom ring from Stone Mountain of Client Services.

Let freedom ring from Lookout Mountain of the Perth office.

Let freedom ring from every hill and molehill of M & H.

From every mountainside, let freedom ring.

And when this happens, when we allow freedom ring, when we let it ring from every village and every hamlet, from every state and every city, we will be able to speed up that day when all of God's children, managers and coders, systems and developers, business and IT, will be able to join hands and sing in the words of the old programmer spiritual:

Free at last! Free at last!

Thank God Almighty, we are free at last!

Just a short meeting...

(11:29:01 AM) doconnor@im.vm/corner: you know what we need?
(11:29:09 AM) doconnor@im.vm/corner: interruption aides
(11:29:18 AM) doconnor@im.vm/corner: just stick us all in headphones
(11:29:22 AM) doconnor@im.vm/corner: crank up music
(11:29:27 AM) doconnor@im.vm/corner: if you want to interrupt us
(11:29:30 AM) doconnor@im.vm/corner: you fade it down
(11:29:40 AM) doconnor@im.vm/corner: and we type a sentence about the task we were just doing
(11:29:46 AM) doconnor@im.vm/corner: whole process takes about 30 seconds
(11:30:04 AM) doconnor@im.vm/corner: when the interruption is gone, you read the note and bring the music back in
(11:30:10 AM) J: lol
(11:30:16 AM) doconnor@im.vm/corner: or possibly add in some kind of food
(11:30:24 AM) J: like rats in a cage
(11:30:28 AM) doconnor@im.vm/corner: so you can trigger the whole taste/smell/hearing
(11:30:38 AM) J: so basically, we come back to:
(11:30:53 AM) J: Business Analyst is functionally equivalent to -
(11:31:03 AM) J: DJ/chef

Wednesday, February 14, 2007

Belgium, meet robots.txt

An article about Belgium really annoyed me today.

Take a peep at the rant on dotherightthing.com, and see what you think.

Tuesday, February 13, 2007

If Everyone Lived Liked You...

If everyone lived like I do, we'd need around 2.4 planets.

That's not terrible; considering the average is 7.6 for my area. What about you lot?

Trac, & OpenSearch

Note to self: upgrade trac to get opensearch; so you can do that "jump to trac ticket" at the flick of a shortcut key. (Ctrl + K (focus search box); Ctrl + Down (choose trac); #2545 (enter ticket number))

Saturday, February 10, 2007

Firefox Extensions, Round 2

I've been trialling some firefox extensions to solve my garbage collection problem.

So far, the best of the lot is the Aging Tabs extension, which I've now got fading out tabs to pitch black if I haven't used them in 5 minutes or so.

PermaTabs was also useful - but there's something about the implementation that irks me. I can't put my finger on it.


Morning Coffee overlaps with PermaTabs; so I haven't really seen it become useful; and the rest have seen little use

.

Friday, February 09, 2007

Tab Extensions for Firefox

Here's a list of extension I'm trying out in order to solve my tab problem. The Aging Tabs extension sounds the most promising.

Thursday, February 08, 2007

Wanted: Sort firefox tabs by url; name

I'm sick of having 20 tabs open but only looking at 2 different pages. Firefox should make this easy for me - right click, sort, whoosh!

Update:
I start my day with our local trac installation. I open up four tabs - unit test results (trunk), unit test results (stable branch), things needing unit tests, current milestone.
From each of these, I go through and find tickets I want to pay attention to; etc. I often middle click to get these tickets open in new tabs.
Someone then comes and flaps their gums at me - and I get back to work, only to find I can't remember where I was, and middle click open a hell of a lot more tabs.

I go off and do work, update a ticket, check email, make a coffee, and come back. I remember the ticket number, and click on that tab, only to find it looks like all of my work has disappeared. I then have to hit f5 to get the most recent version.

What would make life a billion times easier is for firefox to have a right click -> sort option for the tabs. If identical URLs were placed next to each other, and given a similar color or a 5px margin from other tabs, I could then close down tabs I don't need.

Tuesday, February 06, 2007

The Web in 5 Minutes

Watch a video by Michael Wench about the state of the web in 5 minutes or less.

Compare it to hyperland, and it's not that different! :)

Sunday, February 04, 2007

Shaolin Warriors: Legends of Kung Fu

So, I went off to Shaolin Warriors: Legends of Kung Fu last night, and I was pretty damned excited.

Chloe & I got in the taxi and headed off at around 6:50pm - it was starting in 40 minutes, and we were as keen as beans to get there. We went with Suburban Taxis. Again. I keep making this crucial mistake, time and time again, because it's so easy to remember 131 008 and so hard to remember how many times this company has fucked up a simple car journey for us.

I don't know why I bother saying on the phone to all of the taxi phone operators where I'm going - "I'd like a taxi from Klemzig to Thebarton Theatre". Inevitably, when the taxi arrives the driver has no clue about my destination; and I have to retell my story. Normally, I don't mind. But if you throw in the heaviest Indian accent you can imagine and add some mumbling; you begin to get an idea of how hard communication gets.

Further, it's really fucking difficult to get your destination across when the driver doesn't even know where your destination is; and you have to get out his streetmap and circle it for him.

Eventually, somehow, we got there. I swore never to use them again - but I know we will. It's something you just can't fight.

We finally get inside and get directed to our seats - only we spot the bar and decide a drink is in order.
You'd have thought that the theatre could have gotten a slightly bigger range than one beer of the light and one of the not-as-light varieties; but at least it wasn't terrible beer.

We traipse up to our seats; Chloe remarking "how we must have gotten some really good ones to be going upstairs". At this point, I debate on wheter I should point out that we are infact in row V, and row V is way, way at the back. It's so far back, infact, that the theatre hadn't sold all of the seats they obviously expected to, and had brought large bits of black cloth over all the rows higher than M.

Row V didn't exist. We got shifted forward, to M, but we were still the furthest away from the performers it is physically possible to be. I told myself to be patient, because soon I would see something awesome. I would see the things you'd expect from kung fu movies, but this would be real. I'd see people doing scary things with swords, I'd see people narrowly avoiding death with a well placed flip, I'd see people punching their way through extraordinarily large pieces of wood for no apparent reason except to say 'I'm an awesome monk of supreme realness' - wouldn't I? (below)

Supreme Realness

The house lights went down, the seriously bad mix tape from China cranked up at full volume, and the drunk on the spotlight kicked it into gear. There they were! Only, rather than kicking their way out of something, or doing a billion flips, or whatnot, they were doing what I can only describe as a whole lot of ponce.
Ponce. That about sums it up. Ponce. Now let's clarify this: I can put up with a lot of ponce so long as I get my death dealing sword swinging moments of "holy shit did he just do that"? So I sat. Then I waited. Then I squirmed. The ponce continued.
Finally, something made my awesometer twitch when one of the tiny monks did a series of cartwheels using only his head. Only a little twitch though, because the amount of ponce had seriously done some huge damage to them.
Then, with a ghastly shreik of how not to please your audience's ears, they had a bit of a break for a 20 minute inteval.

20 minutes elapse: I manage to spend $23 at a service station in 39 seconds flat on icecream. I was having a severe WTF over the one too, but I now had Supreme Doubts about any ability to kung fu my way out of the situation, so I just meekly ate my icecream.

The second half was better. They had a contortionist or two, who did something a little like this:
ouch
... and then they busted out the swords n stuff.

Notable moments of awesome:
  • I saw a pint sized monk climb on his staff - as in the staff is underneath him, and he's balanced ontop. Awesome rating of 5 or so, because he only did it once and for half a second.
  • I saw a guy prepare lunch on his stomach by chopping a whole lot of food with a cleaver. He did it more than once and we didn't see guts come out. Let's give that a 6.
  • Three guys cranked out the dual Chain Whips and there was much spinning happening. They managed to spin one above their heads, and one under them while seated. That's right, seated. They leapt (somehow) sufficiently high for the chain to pass under them. A clear 8.
  • They hit one guy in the stomach with a big assed battering ram. Looked faked. 3.
  • They picked a guy up; then balanced him on spearpoints. 7, but he only did it for a moment and wussed out.
  • They broke numerous bits of staff, bamboo, etc over each other's body parts.
  • Too many 'fight' scenes would have the monk duck first then the swing of the sword, fist, etc. -3.
  • At the end, all of the monks lay down like a row of firecrackers, and one of them rolled under all of the others. They leapt like a mexican wave. 8, for coordination.
Overall, it sucked! Everything was just that bit substandard - they weren't coordinated in their drills, the spotlighting was wobbly, the seating was horrid and the music was bleak. It wasn't worth the money we paid to see it - not by any stretch.

I know you have to cut them some slack - they do this as a way of life. But as a way of life, they should have gotten their shit together a little better.
I wouldn't be so angry, either, but the TV and brochures had only the snappy bits of everything shown - monks doing this, monks doing that, monks scoring a million billion awesome points with death defying abilities.

They should have looked like this.

What I missed, what everyone missed, was this telling description from the venuetix site:
Twenty-four authentic Shaolin Temple warrior monks from the original Shaolin monastery in Henan present the Legendary Masters of Kung-Fu spectacular. Acclaimed across the globe, the Shaolin Warriors captivate and amaze as they display an awe-inspiring combination of martial arts, contortion, acrobatics and incredible athletic skills as they weave an enchanting storyline that reflects their ancient philosophy and traditions. Shaolin Warriors Legendary Masters of Kung-Fu is more than a kung fu show. The four scenes of summer, autumn, winter and spring depict the philosophical theory of the life cycle of Buddhism and vividly show the rarely-seen temple like of Shaolin monks; their Buddhist meditation, as well as their martial arts training during the coldest and hottest times of the year


So what it was in reality was something like this:
Lets play pattycake
"Let's Play Pattycake"

Zend Framework & a PEAR channel

Zend Framework has a PEAR channel. Unfortunately, it's lagging behind in terms of available releases.

I sparked off a dead-horse-beating on the mailing list (should zend be shipped as one big pear package, or itty bitty pieces with very strict dependencies); and whinged that it was so out of date.

In particular, why aren't they using a phing task to automate creating a package.xml? They are already doing it for other things.

The response: don't whing about it, do it!


So; here it is:


<?xml version="1.0"?>
<!--

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.

@copyright Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
@license http://framework.zend.com/license/new-bsd New BSD License

Requirements:

- PHP 5.1.4
- Phing 2.2.0
- PHPDocumentor 1.3.1
- VersionControl_SVN 0.3

Requirements for running tests (not yet implemented):
- PHPUnit 3.0.0
- Xdebug 2.0

Usage:

phing [ <options> ] [ <targets> ]

Options:

-Dtree={core|incubator}
Render documentation for core or incubator only.

-Dlang={en|ar|de|es|fr|ja|nl|pl|pt-br|ru|zh}
Render core manual for specified language only.

Targets:
pear
Stage product, and create a pear package

dist
Stage product, build docs, create tarball and zip archives.
This is the default target.

build
Stage product and build docs.

docs
Build both docbook manual and phpdoc API documentation.

manual
Build docbook manual only.
Aliases to do the same thing: docbook, build.manual

api
Build phpdoc API documentation only.
Aliases to do the same thing: apidoc, build.apidoc.

clean
Remove staged directory. Leave tarball and zip archives.

clean.all
Remove staged directory, and also tarball and zip archives.

clean.docs
Remove only rendered documentation files.

-->
<project name="ZendFramework" default="dist" basedir=".">

<path id="zf.class.path">
<pathelement dir="${project.basedir}/phing/tasks" />
</path>
<taskdef name="entitynames" classname="zend.docbook.EntityNamesTask">
<classpath refid="zf.class.path" />
</taskdef>

<property name="zf.src.default" value="${project.basedir}/.." />
<property name="zf.product.name" value="Zend Framework" />
<property name="zf.productname" value="ZendFramework" />
<property name="zf.pearname" value="Zend" />
<property name="zf.version" value="0.6.0" />
<property name="svn.url" value="http://framework.zend.com/svn" />
<property name="zf.svn.url" value="${svn.url}/framework/trunk" />
<property name="zf.svn.tag" value="HEAD" />
<property name="zf.export.dir" value="./${zf.productname}-export-${zf.svn.tag}" />
<property name="stage.home" value="${project.basedir}/stage" />
<property name="zf.stage.dir" value="${stage.home}/${zf.productname}-${zf.version}" />
<property name="zf.tarball" value="${stage.home}/${zf.productname}-${zf.version}.tar" />
<property name="zf.zipball" value="${stage.home}/${zf.productname}-${zf.version}.zip" />
<property name="zf.apidoc.output.style" value="HTML:frames:DOM/earthli" />
<property name="lang" value="en,ar,de,es,fr,ja,nl,pl,pt-br,ru,zh" />
<property name="tree" value="core,incubator" />

<target name="dist" depends="build"
description="Stage product, build docs, create tarball and zip archives. This is the default target.">
<echo message="Creating tar and zip archives..." />
<tar destfile="${zf.tarball}.gz" basedir="${zf.stage.dir}" compression="gzip" />
<zip destfile="${zf.zipball}" basedir="${zf.stage.dir}" />
</target>

<target name="build" depends="stage,pear,docs" description="Stage product and build docs.">
</target>

<target name="pear" depends="stage"
description="Create a pear package.">
<mkdir dir="${stage.home}/pear" />
<echo msg="Creating PEAR package" />
<pearpkg name="${zf.pearname}" dir="${zf.stage.dir}" destFile="${stage.home}/pear/package.xml">
<fileset dir="${zf.stage.dir}/library/">
<!--
<exclude name="**/.svn/**" />
<exclude name="build-tools/**" />
-->
</fileset>
<option name="notes">See http://framework.zend.com/changelog for full changes</option>
<option name="description">${zf.product.name}</option>

<option name="summary">Zend Framework is an open source effort aimed at producing a high-quality framework for developing modern, robust, secure web applications and web services in PHP 5.</option>
<option name="version" value="${zf.version}"/>
<option name="state" value="beta"/>
<option name="license" value="BSD"/>

<mapping name="maintainers">
<element>
<element key="handle" value="olekvi"/>
<element key="name" value="Ole Bendik Kvisberg"/>
<element key="email" value="olekvi@linpro.no"/>
<element key="role" value="lead"/>
</element>
</mapping>

<mapping name="deps">
<element>
<element key="type" value="php"/>
<element key="version" value="5.0.1"/>
<element key="rel" value="ge"/>
</element>
</mapping>

</pearpkg>
</target>

<target name="stage" depends="prepare,source.export"
description="">
<echo msg="Staging files from ${zf.src} to ${zf.stage.dir}" />
<copy todir="${zf.stage.dir}">
<fileset dir="${zf.src}">
<exclude name="**/.svn/**" />
<exclude name="build-tools/**" />
<exclude name="documentation/**" />
<exclude name="incubator/documentation/**" />
<exclude name="incubator/tests/TestConfiguration.php" />
<exclude name="scripts/**" />
<exclude name="tests/TestConfiguration.php" />
</fileset>
</copy>
<echo file="${zf.stage.dir}/VERSION.txt">
${zf.product.name} Preview Release ${zf.version} (build ${zf.svn.revision})
</echo>
</target>

<target name="prepare" depends="source.check">
<mkdir dir="${zf.stage.dir}" />
</target>

<target name="source.check">
<available file="${zf.src.default}/library/Zend.php" property="zf.src" value="${zf.src.default}" />
<svnlastrevision svnpath="svn"
repositoryurl="${zf.svn.url}"
workingcopy="${project.basedir}"
propertyname="zf.svn.revision" />
</target>

<target name="source.export" unless="zf.src">
<svnexport svnpath="svn"
repositoryurl="${zf.svn.url}"
todir="${zf.export.dir}" />
<property name="zf.src" value="${zf.export.dir}" />
</target>

<target name="docs" depends="build.manual,build.apidoc"
description="Build both docbook manual and phpdoc API documentation." />

<target name="manual" depends="build.manual"
description="Build docbook manual only." />
<target name="docbook" depends="build.manual" />
<target name="build.manual" depends="prepare,source.export">
<echo msg="Building manual for ${tree}..." />
<foreach list="${tree}" param="zf.tree" target="build.manual.common" />
</target>

<target name="build.manual.common">
<condition property="zf.manual.src" value="${zf.src}/documentation/manual">
<equals arg1="${zf.tree}" arg2="core" />
</condition>
<condition property="zf.manual.src" value="${zf.src}/incubator/documentation/manual">
<equals arg1="${zf.tree}" arg2="incubator" />
</condition>

<condition property="zf.manual.dest" value="${zf.stage.dir}/documentation/end-user/core">
<equals arg1="${zf.tree}" arg2="core" />
</condition>
<condition property="zf.manual.dest" value="${zf.stage.dir}/documentation/end-user/incubator">
<equals arg1="${zf.tree}" arg2="incubator" />
</condition>

<foreach list="${lang}" param="zf.lang" target="build.manual.lang.check" />
</target>

<target name="build.manual.lang.check" depends="source.export">
<available file="${zf.manual.src}/${zf.lang}/manual.xml" property="zf.lang.exists" />
<phingcall target="build.manual.lang">
<property name="zf.manual.src.dir" value="${zf.manual.src}/${zf.lang}" />
<property name="zf.manual.dest.dir" value="${zf.manual.dest}/${zf.lang}" />
</phingcall>
</target>

<target name="build.manual.lang" if="zf.lang.exists">
<echo msg="Building manual for tree: ${zf.tree}, language: ${zf.lang}..." />

<echo msg="Generating XML entities..." />
<entitynames outputfile="${zf.manual.src.dir}/entities.ent">
<filelist dir="${zf.manual.src.dir}" files="ref,module_specs" />
</entitynames>

<mkdir dir="${zf.manual.dest.dir}" />
<!-- @TODO: make xslt task work with external entities
<xslt todir="${zf.manual.dest.dir}" style="${zf.manual.src.dir}/../.build/html.xsl">
<fileset dir=".">
<include name="manual.xml" />
</fileset>
</xslt>
-->
<echo msg="done." />
</target>

<target name="api" depends="build.apidoc"
description="Build phpdoc API documentation only." />
<target name="apidoc" depends="build.apidoc" />
<target name="build.apidoc" depends="prepare,source.export">
<foreach list="${tree}" param="zf.tree" target="build.apidoc.common" />
</target>

<target name="build.apidoc.common">
<condition property="zf.apidoc.src.dir" value="${zf.src}/library">
<equals arg1="${zf.tree}" arg2="core" />
</condition>
<condition property="zf.apidoc.src.dir" value="${zf.src}/incubator/library">
<equals arg1="${zf.tree}" arg2="incubator" />
</condition>

<condition property="zf.apidoc.dest.dir" value="${zf.stage.dir}/documentation/api/core">
<equals arg1="${zf.tree}" arg2="core" />
</condition>
<condition property="zf.apidoc.dest.dir" value="${zf.stage.dir}/documentation/api/incubator">
<equals arg1="${zf.tree}" arg2="incubator" />
</condition>

<condition property="zf.apidoc.label" value="">
<equals arg1="${zf.tree}" arg2="core" />
</condition>
<condition property="zf.apidoc.label" value="Incubator">
<equals arg1="${zf.tree}" arg2="incubator" />
</condition>

<echo msg="Building API documentation for ${zf.tree}..." />
<mkdir dir="${zf.apidoc.dest.dir}" />
<phpdoc title="${zf.product.name} ${zf.apidoc.label} API Documentation"
destdir="${zf.apidoc.dest.dir}"
sourcepath="${zf.apidoc.src.dir}"
output="${zf.apidoc.output.style}" />
<echo msg="done." />
</target>

<target name="clean.all" depends="clean"
description="Remove staged directory, tarball and zip archives, and svn export.">
<echo msg="Cleaning up archives..."/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${stage.home}" />
</delete>
<echo msg="Cleaning up svn export..."/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${zf.export.dir}" />
</delete>
</target>

<target name="clean" depends="clean.docs"
description="Remove staged directory. Leave tarball and zip archives.">
<echo msg="Cleaning up staged files..."/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${zf.stage.dir}" />
</delete>
</target>

<target name="clean.docs" depends="prepare"
description="Remove only rendered documentation files.">
<echo msg="Cleaning up docs..."/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${zf.stage.dir}/documentation" />
</delete>
<echo msg="Cleaning up XML entities.ent files..."/>
<delete failonerror="false" verbose="true">
<fileset dir="${zf.src}/documentation/manual">
<include name="**/entities.ent" />
</fileset>
</delete>
<delete failonerror="false" verbose="true">
<fileset dir="${zf.src}/incubator/documentation/manual">
<include name="**/entities.ent" />
</fileset>
</delete>
</target>

</project>



Here's a patch (copy, save as .diff)


Index: build.xml
===================================================================
--- build.xml (revision 3164)
+++ build.xml (working copy)
@@ -40,6 +40,8 @@
Render core manual for specified language only.

Targets:
+ pear
+ Stage product, and create a pear package

dist
Stage product, build docs, create tarball and zip archives.
@@ -81,6 +83,7 @@
<property name="zf.src.default" value="${project.basedir}/.." />
<property name="zf.product.name" value="Zend Framework" />
<property name="zf.productname" value="ZendFramework" />
+ <property name="zf.pearname" value="Zend" />
<property name="zf.version" value="0.6.0" />
<property name="svn.url" value="http://framework.zend.com/svn" />
<property name="zf.svn.url" value="${svn.url}/framework/trunk" />
@@ -101,10 +104,48 @@
<zip destfile="${zf.zipball}" basedir="${zf.stage.dir}" />
</target>

- <target name="build" depends="stage,docs"
- description="Stage product and build docs.">
+ <target name="build" depends="stage,pear,docs" description="Stage product and build docs.">
</target>

+ <target name="pear" depends="stage"
+ description="Create a pear package.">
+ <mkdir dir="${stage.home}/pear" />
+ <echo msg="Creating PEAR package" />
+ <pearpkg name="${zf.pearname}" dir="${zf.stage.dir}" destFile="${stage.home}/pear/package.xml">
+ <fileset dir="${zf.stage.dir}/library/">
+ <!--
+ <exclude name="**/.svn/**" />
+ <exclude name="build-tools/**" />
+ -->
+ </fileset>
+ <option name="notes">See http://framework.zend.com/changelog for full changes</option>
+ <option name="description">${zf.product.name}</option>
+
+ <option name="summary">Zend Framework is an open source effort aimed at producing a high-quality framework for developing modern, robust, secure web applications and web services in PHP 5.</option>
+ <option name="version" value="${zf.version}"/>
+ <option name="state" value="beta"/>
+ <option name="license" value="BSD"/>
+
+ <mapping name="maintainers">
+ <element>
+ <element key="handle" value="olekvi"/>
+ <element key="name" value="Ole Bendik Kvisberg"/>
+ <element key="email" value="olekvi@linpro.no"/>
+ <element key="role" value="lead"/>
+ </element>
+ </mapping>
+
+ <mapping name="deps">
+ <element>
+ <element key="type" value="php"/>
+ <element key="version" value="5.0.1"/>
+ <element key="rel" value="ge"/>
+ </element>
+ </mapping>
+
+ </pearpkg>
+ </target>
+
<target name="stage" depends="prepare,source.export"
description="">
<echo msg="Staging files from ${zf.src} to ${zf.stage.dir}" />




Notes:
  1. The paths are all funny, and your package.xml will get put out into /stage/pear/ - you probably want to have it go elsewhere.
  2. You still need to copy it somewhere else (/stage/ZendFramework-X.Y.Z/library/)
  3. You still need to pear package it.