Modify

Ticket #90 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

cvstimestamp buildproperty is incorrectly formatted for command line usage with phing

Reported by: anonymous Owned by: hans
Priority: blocker Milestone:
Component: phing-core Version:
Keywords: Cc:

Description

Wen using the current phing cruisecontrol builder plugin, the cvstimestamp property is incorrectly escaped for commandline usage with phing. I have looked into the sourcecode and it seems to be a problem, concerning phing only... I wrote a little patch here, it simply formats the cvstimestamp property just before it is handed over to the createArgument function in the function build from PhingScript.

Some extra information:

Product versions

  • cruisecontrol 2.6.1
  • phing 2.3.0beta1

phing -listener phing.listener.XmlLogger -DXmlLogger.file=log.xml -Dcclastbuildtimestamp=20070416000000 -Dlabel=build.1 -Dcclastgoodbuildtimestamp=20070416000000 -Dlastbuildsuccessful=true "-Dcvstimestamp=2007-04-16 09:27:04 GMT" -Dcctimestamp=20070416102704 -buildfile build.xml init [cc]Apr-16 10:27:04 ScriptRunner - Buildfile: /home/pvree/projects/atos-origin/ictu/continuous_builds/trunk/build.xml [cc]Apr-16 10:27:05 ScriptRunner - [cc]Apr-16 10:27:05 ScriptRunner - BUILD FAILED [cc]Apr-16 10:27:05 ScriptRunner - Target '09:27:04' does not exist in this project. [cc]Apr-16 10:27:05 ScriptRunner - Total time: 0.4189 seconds [cc]Apr-16 10:27:05 ScriptRunner -

Attachments

Change History

comment:1 Changed 5 years ago by anonymous

Another clue,

when using this commandline php phing.php -listener phing.listener.XmlLogger -DXmlLogger.file=log.xml -Dcclastbuildtimestamp=20070416000000 -Dlabel=build.1 -Dcclastgoodbuildtimestamp=20070416000000 -Dlastbuildsuccessful=true "-Dcvstimestamp=2007-04-16 09:27:04 GMT" -Dcctimestamp=20070416102704 -buildfile build.xml it all works fine...

So it has to do with the way PHP handles command line arguments or perhaps even the way the PHP interpreter is called by the console...

comment:2 Changed 5 years ago by anonymous

Sorry for bothering anyone... after carefull debugging I solved the problem... it has to do with the shell phing script...

The command

$PHP_COMMAND -d html_errors=off -qC /usr/share/php/phing.php -logger phing.listener.AnsiColorLogger $@

has to be changed to

$PHP_COMMAND -d html_errors=off -qC /usr/share/php/phing.php -logger phing.listener.AnsiColorLogger "$@"

then it all works like a charm... again sorry for bothering, I don't exactly know whom provides the linux/debian phing bash script.

comment:3 Changed 5 years ago by mrook

  • Status changed from new to closed
  • Resolution set to worksforme

Shell scripts have been extensively modified in 2.3.0 tree, so closing for now.

comment:4 Changed 4 years ago by lars@…

  • Status changed from closed to reopened
  • Resolution worksforme deleted

Now, it is wrong. Use "$@" in /usr/bin/phing instead of $*

comment:5 Changed 4 years ago by mrook

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Component changed from cruisecontrol-builder-plugin to phing-core

Fixed in changeset:241.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.