Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #17627 Pyrus: AtomicFileTransaction rename bin_dir
Submitted: 2010-07-24 00:03 UTC
From: boekkooi Assigned: cweiske
Status: Closed Package: PEAR (version SVN)
PHP Version: 5.3.1 OS: Windows 7 x64
Roadmaps: (Not assigned)    
Subscription  


 [2010-07-24 00:03 UTC] boekkooi (Warnar Boekkooi)
Description: ------------ When installing PEAR2_Pyrus the following exception occures: 'PEAR2\Pyrus\AtomicFileTransaction\Exception' with message 'Cannot rollback - not in a transaction' in E:\workspace\all\Pyrus\src\Pyrus\AtomicFileTransaction.php:535 This exception originates in AtomicFileTransaction.php line 655. The reason for the exception is that it tries to rename 'C:\xampp\.old-php' to 'C:\xampp\php' and this is not possible because php.exe is in use. Maybe related to https://pear.php.net/bugs/bug.php?id=17195 Test script: --------------- php scripts/pyrus e:\test php scripts/pyrus e:\test set preferred_state alpha php scripts/pyrus e:\test install PEAR2_Pyrus Expected result: ---------------- - A successful installation or - Better exception indicating that the bin_dir needs to be changed. Actual result: -------------- exception 'PEAR2\Pyrus\AtomicFileTransaction\Exception' with message 'Cannot rollback - not in a transaction' in E:\workspace\all\Pyrus\src\Pyrus\AtomicFileTransaction.php:535 Stack trace: #0 E:\workspace\all\Pyrus\src\Pyrus\Installer.php(329): PEAR2\Pyrus\AtomicFileTransaction::rollback() #1 E:\workspace\all\Pyrus\src\Pyrus\ScriptFrontend\Commands.php(482): PEAR2\Pyrus\Installer::commit() #2 E:\workspace\all\Pyrus\src\Pyrus\ScriptFrontend\Commands.php(276): PEAR2\Pyrus\ScriptFrontend\Commands->install(Array, Array) #3 E:\workspace\all\Pyrus\scripts\pyrus(37): PEAR2\Pyrus\ScriptFrontend\Commands->run(Array) #4 {main}PEAR2\Pyrus\AtomicFileTransaction\Exception: Cannot rollback - not in a transaction

Comments

 [2010-12-19 00:18 UTC] looksup (François Poirotte)
As stated by Warnar, changing the bin_dir option will allow you to pass through this exception and successfully install the package, but you will get the same exception the next time some package tries to install an executable. Also, I got a similar exception while trying to uninstall a package installed using the workaround above : $ pyrus.phar un erebot/Erebot Using PEAR installation found at /var/www/Erebot/pear/ PHP Warning: copy(/var/local/buildbot/.journal-ubin//var/local/buildbot/ubin/Erebot): failed to open stream: No such file or directory in /home/clicky/pear2/Pyrus/src/Pyrus/AtomicFileTransaction.php on line 438 PHP Stack trace: PHP 1. {main}() /home/clicky/pear2/Pyrus/scripts/pyrus:0 PHP 2. PEAR2\Pyrus\ScriptFrontend\Commands->run() /home/clicky/pear2/Pyrus/scripts/pyrus:37 PHP 3. PEAR2\Pyrus\ScriptFrontend\Commands->uninstall() /home/clicky/pear2/Pyrus/src/Pyrus/ScriptFrontend/Commands.php:277 PHP 4. PEAR2\Pyrus\Uninstaller::commit() /home/clicky/pear2/Pyrus/src/Pyrus/ScriptFrontend/Commands.php:549 PHP 5. PEAR2\Pyrus\Uninstaller->uninstall() /home/clicky/pear2/Pyrus/src/Pyrus/Uninstaller.php:168 PHP 6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObject() /home/clicky/pear2/Pyrus/src/Pyrus/Uninstaller.php:234 PHP 7. PEAR2\Pyrus\AtomicFileTransaction->beginTransaction() /home/clicky/pear2/Pyrus/src/Pyrus/AtomicFileTransaction.php:142 PHP 8. PEAR2\Pyrus\AtomicFileTransaction->copyToJournal() /home/clicky/pear2/Pyrus/src/Pyrus/AtomicFileTransaction.php:521 PHP 9. copy() /home/clicky/pear2/Pyrus/src/Pyrus/AtomicFileTransaction.php:438 PEAR2\Pyrus\AtomicFileTransaction\Exception: Unable to begin transaction for /var/local/buildbot/ubin/ PEAR2\Pyrus\AtomicFileTransaction\Exception: Unable to complete journal creation for transaction Not sure if this is the same issue, but it does look quite similar. If it's not the same, I can file a separate bug report.
 [2011-06-03 19:48 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cweiske
moved to https://github.com/pear2/PEAR2_Pyrus/issues/24