Giter Site home page Giter Site logo

microsoft / pal Goto Github PK

View Code? Open in Web Editor NEW
66.0 28.0 34.0 22.85 MB

Platform Abstraction Layer (both SCXCoreLib and SCXSystemLib)

License: Other

Makefile 1.38% Shell 0.32% Batchfile 0.01% Python 1.39% C++ 96.67% Assembly 0.05% XSLT 0.07% C 0.12%

pal's Issues

Path containing whilespaces

We are facing this bug in OMSAgent just when we added nokogiri library. Because nokogiri has a dependency on mini_portile2 gem that has 2 filepaths containing whitespaces:

mini_portile/test/assets/patch 1.diff
mini_portile/test/assets/test mini portile-1.0.0/

I can reproduce it by including a filename with whitespace in Build-OMS-Agent-for-Linux/omsagent/installer/datafiles/ruby.data :

${{RUBY_DEST}}/lib/ruby/gems/2.4.0/doc/my test.txt; ${{RUBY_DEST}}/lib/ruby/gems/2.4.0/doc/my test.txt;; 644; root; root

Error:

root@abder-pad:~/OMS/Build-OMS-Agent-for-Linux/omsagent/build# python /root/OMS/Build-OMS-Agent-for-Linux/pal/installer/InstallBuilder/installbuilder.py \
 --BASE_DIR=/root/OMS/Build-OMS-Agent-for-Linux/omsagent \
 --TARGET_DIR=/root/OMS/Build-OMS-Agent-for-Linux/omsagent/target/Linux_UBUNTU_18.04_x64_64_Debug \
 --INTERMEDIATE_DIR=/root/OMS/Build-OMS-Agent-for-Linux/omsagent/intermediate/Linux_UBUNTU_18.04_x64_64_Debug/installer_tmp \
 --STAGING_DIR=/root/OMS/Build-OMS-Agent-for-Linux/omsagent/intermediate/Linux_UBUNTU_18.04_x64_64_Debug/staging \
 --BUILD_TYPE=Debug \
 --BUILD_CONFIGURATION=Linux_UBUNTU_18.04_x64_64_Debug \
 --RUBY_INT=intermediate/Linux_UBUNTU_18.04_x64_64_Debug/ruby \
 --RUBY_ARCH=x86_64-linux \
 --RUBY_ARCM=x86_64-linux \
 --PFARCH=x64 \
 --PFDISTRO=UBUNTU \
 --PFMAJOR=18 \
 --PFMINOR=04 \
 --VERSION=1.8.1 \
 --RELEASE=370 \
 --VERSION_IDENT="20190206 Developer_Build" \
 --DATAFILE_PATH=/root/OMS/Build-OMS-Agent-for-Linux/omsagent/installer/datafiles \
 --OUTPUTFILE=omsagent-1.8.1-370.ubuntu.18.x64 \
 base_omsagent.data linux.data ruby.data linux_dpkg.data

chown: cannot access '/root/OMS/Build-OMS-Agent-for-Linux/omsagent/intermediate/Linux_UBUNTU_18.04_x64_64_Debug/staging/opt/microsoft/omsagent/ruby/lib/ruby/gems/2.4.0/gems/mini_portile2-2.4.0/test/assets/test': No such file or directory
chown: cannot access 'mini': No such file or directory
chown: cannot access 'portile-1.0.0/configure': No such file or directory
Unable to chown /root/OMS/Build-OMS-Agent-for-Linux/omsagent/intermediate/Linux_UBUNTU_18.04_x64_64_Debug/staging/opt/microsoft/omsagent/ruby/lib/ruby/gems/2.4.0/gems/mini_portile2-2.4.0/test/assets/test mini portile-1.0.0/configure.

As a workaround, I've removed these 2 paths since its only related to testing, but we need to fix this issue.

Errors when using Python 3

Error when using Python 3:

Traceback (most recent call last):
  File "/home/ubuntu/a_latest/build-omi-script-provider/pal/installer/InstallBuilder/installbuilder.py", line 3, in <module>
    import datafileparser
  File "/home/ubuntu/a_latest/build-omi-script-provider/pal/installer/InstallBuilder/datafileparser.py", line 310
    sectionPriority = m.group(1)
    ^
IndentationError: expected an indented block

and

Traceback (most recent call last):
  File "/home/ubuntu/a_latest/build-omi-script-provider/pal/installer/InstallBuilder/installbuilder.py", line 4, in <module>
    import linuxrpm
  File "/home/ubuntu/a_latest/build-omi-script-provider/pal/installer/InstallBuilder/linuxrpm.py", line 2, in <module>
    import scxutil
  File "/home/ubuntu/a_latest/build-omi-script-provider/pal/installer/InstallBuilder/scxutil.py", line 21
    print "Symbolic link: " + srcname + " -> " + dstname
                          ^
SyntaxError: Missing parentheses in call to 'print'

In Python 3, mixing tabs with spaces is a syntax error.
Also, it's required for print to have parenthesis around the string which will be printed.

None of these changes affect Python 2 in any way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.