You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by jiangyt <gi...@git.apache.org> on 2015/03/12 08:06:57 UTC

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

GitHub user jiangyt opened a pull request:

    https://github.com/apache/cloudstack/pull/114

    Fix the bug when build apidoc under windows crygwin environment.

    Currently, when building apidoc under windows error occured caused by python can not understand the directory of gen_toc.py file.
    Besides gen_toc.py can not receive large parameter.The commit works fine with 4.4.1 and 4.4.2 should works fine with other branches.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiangyt/cloudstack apidoc

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/114.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #114
    
----
commit afd2172201dee8570c2c6e0f60314ff8ae85c905
Author: Yitao Jiang <wi...@gmail.com>
Date:   2015-03-12T06:23:43Z

    Fix the bug when build apidoc under windows crygin environment.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/114


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/114#issuecomment-85466253
  
    @jiangyt I'm pushing a fix that I believe should work on Cygwin, please test that using master and let me know here or on dev ML. The fix at least won't break on Linux/Mac environments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by jiangyt <gi...@git.apache.org>.
Github user jiangyt commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/114#discussion_r26299243
  
    --- Diff: tools/apidoc/build-apidoc.sh ---
    @@ -62,7 +62,18 @@ set -e
      sed -e 's,%API_HEADER%,Root Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocforadmin.xsl
      sed -e 's,%API_HEADER%,Domain Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocfordomainadmin.xsl
     
    - python "$thisdir/gen_toc.py" $(find . -type f)
    + WINOS=`uname -s|grep -i WIN`
    + gen_toc_file=''
    + if [ "x$WINOS" != "x" ]; then
    + gen_toc_file="`cygpath -w $thisdir`\\gen_toc.py"
    + else
    + gen_toc_file="$thisdir/gen_toc.py"
    + fi
    + 
    + argfiles=`find . -type f`
    --- End diff --
    
    @bhaisaab Argument list too long erro will triger under windows , so i split the argument.
    Don't know if it exists under other distros.Can you check it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/114#issuecomment-78435060
  
    @jiangyt thanks for the patch. LGTM but I'll wait for anyone who can confirm this on windows for us. Later, I'll test if it works for *nix environment will merge it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/114#issuecomment-85465336
  
    Hi, this commit breaks for unix environments. So I've created a fix using yours which seems to work for me; can you test it on your cygwin environment?
     
    - python "$thisdir/gen_toc.py" $(find . -type f)
    + PLATFORM=`uname -s`
    + if [[ "$PLATFORM" =~ .*WIN.* ]]
    + then
    +     gen_toc_file="`cygpath -w $thisdir`\\gen_toc.py"
    +     argfiles=`find . -type f`
    +     for file in $argfiles; do
    +         echo "Parse file $file";
    +         python $gen_toc_file $file;
    +     done
    + else
    +     python "$thisdir/gen_toc.py" $(find . -type f)
    + fi


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/114#issuecomment-78451206
  
    @Cookie-Wang have you confirmed that this works for you?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/114#issuecomment-85469871
  
    this is the commit https://github.com/apache/cloudstack/commit/52ffccff5f1436dd5762fcc90050aadaf82eedad


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/114#discussion_r26293610
  
    --- Diff: tools/apidoc/build-apidoc.sh ---
    @@ -62,7 +62,18 @@ set -e
      sed -e 's,%API_HEADER%,Root Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocforadmin.xsl
      sed -e 's,%API_HEADER%,Domain Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocfordomainadmin.xsl
     
    - python "$thisdir/gen_toc.py" $(find . -type f)
    + WINOS=`uname -s|grep -i WIN`
    + gen_toc_file=''
    + if [ "x$WINOS" != "x" ]; then
    + gen_toc_file="`cygpath -w $thisdir`\\gen_toc.py"
    + else
    + gen_toc_file="$thisdir/gen_toc.py"
    + fi
    + 
    + argfiles=`find . -type f`
    --- End diff --
    
    Instead of looping on the found files (argfiles), you can simply give pass it to gen_toc_file?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fix the bug when build apidoc under windo...

Posted by Cookie-Wang <gi...@git.apache.org>.
Github user Cookie-Wang commented on the pull request:

    https://github.com/apache/cloudstack/pull/114#issuecomment-78436172
  
    @jiangyt thanks , i resolve my issue by this 。my cygwin is 2.8 and cloudstack is 4.4.2.thanks !


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---