•  
      request #8863 FRS: can not copy file
    Infos
    #8863
    Adrien H. (sogiadrien)
    2016-03-03 10:57
    2016-02-11 16:50
    8972
    Details
    FRS: can not copy file

    We put a file toto.txt in the same directory than XMLs to be imported :

    
    [root@35d2c76c525a playground_project]# ls -lrth
    -rw-r--r-- 1 root root   16 Feb  5 17:10 toto.txt
    -rw-rw-r-- 1 1000 1000 3.1K Feb  5 19:35 users.xml
    -rw-rw-r-- 1 1000 1000 415K Feb  5 19:35 project.xml

     

     

    According to the documentation file src path need to be relative to XML location. As it is in the same directory, we put "toto.txt" as src.

     

     

     <file arch="x86_64" filetype="text" name="toto.txt" post-date="2011-04-19T01:35:09+01:00" release-time="2011-04-19T01:35:09+01:00" src="toto.txt"/>

     

    Then, import failed due to incorrect path.

    Could you please clarify values to use. XML files used are in attachement.

     

    [root@35d2c76c525a playground_project]# .././import.sh -s .
    no type of import given. We will perform a full import
    ### Importing user
    ### Importing user
    ### Importing project
    info Nothing to do for eloojam
    info Nothing to do for efadmeh
    info Nothing to do for epkpart
    info Nothing to do for lmcmgag
    info Nothing to do for lmcpcar
    info Nothing to do for system
    info Nothing to do for lmcpare
    info Nothing to do for gen_swptfsync_local
    info Nothing to do for ethocov
    info Nothing to do for gen_swptfresync_local
    info Nothing to do for edomale
    info admin will be mapped to admin
    info Nothing to do for erezcha
    info Nothing to do for lmcempa
    info Start importing new project from archive .
    info Create project agileplayground53
    info Execute system events to finish creation of project 154, this can take a while...
    info System events success
    info Importing project in project agileplayground53
    info Check if there are ugroups to add
    info Some ugroups are defined in the XML
    debug XML Ugroups is valid
    info Add user gen_swptfresync_local to project.
    info Add user gen_swptfsync_local to project.
    info Add user edomale to project.
    info Add user lmcpcar to project.
    info Add user lmcmgag to project.
    info Add user lmcempa to project.
    debug Creating empty ugroup product_tester
    debug No user to add in ugroup product_tester
    debug Creating empty ugroup product_owner
    debug Adding users to ugroup product_owner
    debug Adding user gen_swptfresync_local to product_owner
    debug Adding user gen_swptfsync_local to product_owner
    debug Creating empty ugroup product_executive
    debug No user to add in ugroup product_executive
    debug Creating empty ugroup product_developer
    debug No user to add in ugroup product_developer
    debug Adding users to ugroup project_admins
    debug Adding user lmcmgag to project_admins
    debug Adding user edomale to project_admins
    debug Adding user lmcpcar to project_admins
    debug Adding user lmcempa to project_admins
    debug Creating empty ugroup project_manager
    debug Adding users to ugroup project_manager
    debug Adding user edomale to project_manager
    debug Adding user lmcpcar to project_manager
    debug Creating empty ugroup lurker
    debug No user to add in ugroup lurker
    debug Creating empty ugroup observer
    debug No user to add in ugroup observer
    debug Creating empty ugroup developer
    debug No user to add in ugroup developer
    PHP Warning:  md5_file(./toto.txt): failed to open stream: No such file or directory in /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php on line 177
    PHP Stack trace:
    PHP   1. {main}() /usr/share/tuleap/src/utils/import_project_xml.php:0
    PHP   2. ProjectXMLImporter->importNewFromArchive() /usr/share/tuleap/src/utils/import_project_xml.php:147
    PHP   3. ProjectXMLImporter->importContent() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:78
    PHP   4. FRSXMLImporter->import() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:138
    PHP   5. FRSXMLImporter->importPackage() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:112
    PHP   6. FRSXMLImporter->importRelease() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:139
    PHP   7. FRSXMLImporter->importFile() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:168
    PHP   8. md5_file() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:177
    
    Warning: md5_file(./toto.txt): failed to open stream: No such file or directory in /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php on line 177
    
    Call Stack:
        0.0002     698784   1. {main}() /usr/share/tuleap/src/utils/import_project_xml.php:0
        0.1086   28940312   2. ProjectXMLImporter->importNewFromArchive() /usr/share/tuleap/src/utils/import_project_xml.php:147
        0.5480   58035896   3. ProjectXMLImporter->importContent() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:78
        0.7084   58850944   4. FRSXMLImporter->import() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:138
        0.7084   58852464   5. FRSXMLImporter->importPackage() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:112
        0.7319   58954480   6. FRSXMLImporter->importRelease() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:139
        0.7426   58964328   7. FRSXMLImporter->importFile() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:168
        0.7426   58965296   8. md5_file() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:177
    
    PHP Warning:  copy(./toto.txt): failed to open stream: No such file or directory in /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php on line 206
    PHP Stack trace:
    PHP   1. {main}() /usr/share/tuleap/src/utils/import_project_xml.php:0
    PHP   2. ProjectXMLImporter->importNewFromArchive() /usr/share/tuleap/src/utils/import_project_xml.php:147
    PHP   3. ProjectXMLImporter->importContent() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:78
    PHP   4. FRSXMLImporter->import() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:138
    PHP   5. FRSXMLImporter->importPackage() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:112
    PHP   6. FRSXMLImporter->importRelease() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:139
    PHP   7. FRSXMLImporter->importFile() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:168
    PHP   8. copy() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:206
    
    Warning: copy(./toto.txt): failed to open stream: No such file or directory in /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php on line 206
    
    Call Stack:
        0.0002     698784   1. {main}() /usr/share/tuleap/src/utils/import_project_xml.php:0
        0.1086   28940312   2. ProjectXMLImporter->importNewFromArchive() /usr/share/tuleap/src/utils/import_project_xml.php:147
        0.5480   58035896   3. ProjectXMLImporter->importContent() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:78
        0.7084   58850944   4. FRSXMLImporter->import() /usr/share/tuleap/src/common/project/ProjectXMLImporter.class.php:138
        0.7084   58852464   5. FRSXMLImporter->importPackage() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:112
        0.7319   58954480   6. FRSXMLImporter->importRelease() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:139
        0.7426   58964328   7. FRSXMLImporter->importFile() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:168
        0.7439   59009216   8. copy() /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php:206
    
    error Exception: Could not copy ./toto.txt to /var/lib/tuleap/ftp/incoming/toto.txt in /usr/share/tuleap/src/common/frs/FRSXMLImporter.class.php L207

     

    Import | Export
    development
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Adrien H. (sogiadrien)
    Closed
    2016-02-11
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    Corresponds to gerrit #5083 and merged in 8.11.99.16


    • Status changed from New to Closed
    • Assigned to changed from None to Adrien H. (sogiadrien)
    • Close date set to 2016-02-11