View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 397 | WADF | Core | public | 14 Nov 2011 12:01 | 20 Feb 2012 21:40 |
| Reporter | mkierat | Assigned To | timj | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.13.5 | ||||
| Target Version | 0.13.6 | Fixed in Version | 0.13.6 | ||
| Summary | 397: Incorrectly formatted dependency-tags file causes overwrite of the end-user application | ||||
| Description | If the checkout information in the dependency-tags file is incorrectly formatted - i.e. contains 2 spaces after the repository URL - then wadf-deploy/reporcess will overwrite the content of the clientapp folder with the checkout. For example this line: SVN:svn+ssh://xxxx/trunk/src@50737 checkouts/ePortfolio/ used instead of this one: SVN:svn+ssh://xxxx/trunk/src@50737 checkouts/ePortfolio/ will cause the clientapp to "become" ePortfolio. See "additional information" section for example output | ||||
| Steps To Reproduce | 1. Add 1 extra space to a checkout definition in deptags 2. Check it in 3. Try to re-deploy a copy of the system | ||||
| Additional Information | Output from a deploy of a client system with the incorrect deptags file: [10:23 mkierat@devpc12 clients]$ wadf-deploy -r 50704 -d instance=reval32-50704v2 demo-reval Do you want to deploy database(s) if relevant? This will ERASE the existing database(s) (y/n):y Checking out svn+ssh://svn@svn.premierit.com/clients/demo-reval/trunk rev 50704... PEAR dependencies found; creating a PEAR installation in /home/mkierat/clients/reval32-50704v2/pear_local (config file is /home/mkierat/clients/reval32-50704v2/pear_local/.pearrc)... install ok: channel://pear.php.net/Archive_Tar-1.3.8 install ok: channel://pear.php.net/Structures_Graph-1.0.4 install ok: channel://pear.php.net/Console_Getopt-1.3.1 install ok: channel://pear.php.net/XML_Util-1.2.1 install ok: channel://pear.php.net/PEAR-1.9.4 Discovering PEAR channel pear.premierithosting.com... install ok: channel://pear.premierithosting.com/Premier_Role_Application-1.0.0 install ok: channel://pear.premierithosting.com/Premier_Role_Applicationcore-1.0.0 Installing site package.xml for dependency tracking... Force-installing tagged versions of dependencies from /home/mkierat/clients/reval32-50704v2/dependency-tags... Installing local PEAR packages checkouts/Admin/package.xml package.xml checkouts/PremierApp/package.xml checkouts/Form/package.xml checkouts/InputProcessor/package.xml checkouts/Authentication/package.xml checkouts/Controller/package.xml... (... List of pear upgrades ...) No database to deploy No webserver configuration to deploy (looked for /home/mkierat/clients/reval32-50704v2/vhost-httpd.conf) Restarting webserver... Reloading WADF HTTPD instance: [ OK ] Listening on port 10080; configured for the following applications: (... List of deployed systems without the current one ...) [10:23 mkierat@devpc12 clients]$ svn info reval32-50704v2 Path: reval32-50704v2 URL: svn+ssh://svn@svn.premierit.com/applications/ePortfolio/trunk/src Repository Root: svn+ssh://svn@svn.premierit.com Repository UUID: 62d3e20c-84fa-0310-b61a-9a80150ebe08 Revision: 50688 Node Kind: directory Schedule: normal Last Changed Author: msairaz Last Changed Rev: 50688 Last Changed Date: 2011-11-11 14:15:21 +0000 (Fri, 11 Nov 2011) | ||||
| Tags | No tags attached. | ||||
| Attached Files | WADF-bug397.patch (1,256 bytes)
--- WADF.php 2010-05-20 15:54:54.000000000 +0200
+++ WADF.php.bug397 2011-11-15 23:05:45.949075733 +0100
@@ -1456,18 +1456,17 @@
list($dep->name, $dep->version) = explode('-', $matches[2]);
break;
case Tools_WADF_Dependency::TYPE_SVN:
- $parts = explode(' ', $matches[2]);
- if (count($parts) > 1) {
- if (preg_match('/^(.+)@(\d+)$/', $parts[0], $svnmatches)) {
+ if (preg_match('/^(.+)\s+(.+)$/', $matches[2], $parts)) {
+ if (preg_match('/^(.+)@(\d+)$/', $parts[1], $svnmatches)) {
$dep->name = $svnmatches[1];
$dep->version = $svnmatches[2];
- $dep->metadata = $parts[1];
+ $dep->metadata = $parts[2];
// Strip leading slashes; dep tags are always relative to the site root
if ($dep->metadata{0} == '/') {
$dep->metadata = substr($dep->metadata, 1);
}
} else {
- $this->_debugOutput("Unknown SVN dependency syntax in '$parts[0]'", self::DEBUG_WARNING);
+ $this->_debugOutput("Unknown SVN dependency syntax in '$parts[1]'", self::DEBUG_WARNING);
}
} else {
$this->_debugOutput("Unknown SVN dependency syntax in '$matches[2]'", self::DEBUG_WARNING);
| ||||
|
|
Thanks for spotting this! Of course technically the dep tags file is formatted incorrectly but this is probably not a very elegant way to handle it. Unfortunately I don't have an environment just now where I can test it, but please could you try the attached patch? I think it should fix it and ignore the excess space. |
|
|
Fixed in SVN r2239 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 14 Nov 2011 12:01 | mkierat | New Issue | |
| 15 Nov 2011 22:07 | timj | File Added: WADF-bug397.patch | |
| 15 Nov 2011 22:08 | timj | Note Added: 410 | |
| 15 Nov 2011 22:08 | timj | Assigned To | => timj |
| 15 Nov 2011 22:08 | timj | Status | new => feedback |
| 20 Feb 2012 20:41 | timj | Note Added: 444 | |
| 20 Feb 2012 20:41 | timj | Status | feedback => resolved |
| 20 Feb 2012 20:41 | timj | Resolution | open => fixed |
| 20 Feb 2012 20:41 | timj | Fixed in Version | => 0.13.6 |
| 20 Feb 2012 20:41 | timj | Target Version | => 0.13.6 |
| 20 Feb 2012 20:41 | timj | Summary | Incorrectly formatted dependency-tags file causes overwrite of the client application => Incorrectly formatted dependency-tags file causes overwrite of the end-user application |
| 20 Feb 2012 21:40 | timj | Status | resolved => closed |
| 20 Feb 2012 21:40 | timj | Category | CLI => Core |