Re: [Scons-dev] packaging tests: tar; and an xz question
Arg. Yes this is an existing problem. Generally it may mean that the tool finding logic needs to be improved inside SCons. Though in this case it may mean that for some where_is()'s it may make sense to have a list of default excluded paths.. On Thu, Sep 6, 2018 at 2:21 PM Mats Wichmann wrote: > On 09/06/2018 10:52 AM, Bill Deegan wrote: > > bz2= test.where_is('bzip2') > > so that works, but doesn't work. ;) > > > where_is('bzip2') locates bzip2 from my cygwin install apparently, but > when the Windows tar is launched, *it* doesn't find a bzip2. > > I think we may have some other instances of that "problem" - finding > something (in cygwin) during the discovery step, but not having it be > available at runtime. > > ideas? do I have that wrong? > > > ___ > Scons-dev mailing list > Scons-dev@scons.org > https://pairlist2.pair.net/mailman/listinfo/scons-dev > ___ Scons-dev mailing list Scons-dev@scons.org https://pairlist2.pair.net/mailman/listinfo/scons-dev
Re: [Scons-dev] packaging tests: tar; and an xz question
On 09/06/2018 10:52 AM, Bill Deegan wrote: > bz2= test.where_is('bzip2') so that works, but doesn't work. ;) where_is('bzip2') locates bzip2 from my cygwin install apparently, but when the Windows tar is launched, *it* doesn't find a bzip2. I think we may have some other instances of that "problem" - finding something (in cygwin) during the discovery step, but not having it be available at runtime. ideas? do I have that wrong? ___ Scons-dev mailing list Scons-dev@scons.org https://pairlist2.pair.net/mailman/listinfo/scons-dev
Re: [Scons-dev] packaging tests: tar; and an xz question
bz2= test.where_is('bzip2') ... On Thu, Sep 6, 2018 at 12:40 PM Mats Wichmann wrote: > On 09/06/2018 09:25 AM, Bill Deegan wrote: > > So it sounds like if there's native windows tar, then there's no need to > > check for bzip2 executable for windows to be able to handle .tar.bz2 > files? > > no, if there's native windows tar it tries to use bzip2 which doesn't > exist, and the test fails. that's why it never failed before... it never > found tar before. > > so rather, I think in this case we do have to check for bzip2 (we don't > now). it's less likely to be missing on Linux, but a quick experiment > shows if I manually get rid of bzip2, tar fails the same way: > > # tar -tjf glibc-2.9.tar.bz2 > tar (child): bzip2: Cannot exec: No such file or directory > tar (child): Error is not recoverable: exiting now > tar: Child returned status 2 > tar: Error is not recoverable: exiting now > > > If that's the case then the test should be updated to figure out which > tar > > and if bzip2 is indeed needed to run skip otherwise. > > would a check for bzip2 look like this? > > bz2 = test.Environment().WhereIs('bzip2') > > looks like "figure out which tar" is not needed, just figure out if > bzip2 is there. > > > > > Regarding xz, pull requests welcome.. ;) > > > > -Bill > ___ > Scons-dev mailing list > Scons-dev@scons.org > https://pairlist2.pair.net/mailman/listinfo/scons-dev > ___ Scons-dev mailing list Scons-dev@scons.org https://pairlist2.pair.net/mailman/listinfo/scons-dev
Re: [Scons-dev] packaging tests: tar; and an xz question
On 09/06/2018 09:25 AM, Bill Deegan wrote: > So it sounds like if there's native windows tar, then there's no need to > check for bzip2 executable for windows to be able to handle .tar.bz2 files? no, if there's native windows tar it tries to use bzip2 which doesn't exist, and the test fails. that's why it never failed before... it never found tar before. so rather, I think in this case we do have to check for bzip2 (we don't now). it's less likely to be missing on Linux, but a quick experiment shows if I manually get rid of bzip2, tar fails the same way: # tar -tjf glibc-2.9.tar.bz2 tar (child): bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now > If that's the case then the test should be updated to figure out which tar > and if bzip2 is indeed needed to run skip otherwise. would a check for bzip2 look like this? bz2 = test.Environment().WhereIs('bzip2') looks like "figure out which tar" is not needed, just figure out if bzip2 is there. > > Regarding xz, pull requests welcome.. ;) > > -Bill ___ Scons-dev mailing list Scons-dev@scons.org https://pairlist2.pair.net/mailman/listinfo/scons-dev
Re: [Scons-dev] packaging tests: tar; and an xz question
So it sounds like if there's native windows tar, then there's no need to check for bzip2 executable for windows to be able to handle .tar.bz2 files? If that's the case then the test should be updated to figure out which tar and if bzip2 is indeed needed to run skip otherwise. Regarding xz, pull requests welcome.. ;) -Bill On Thu, Sep 6, 2018 at 10:09 AM Mats Wichmann wrote: > > I'm still poking at getting tests passing "everywhere". > > PR#3172 should have taken care of the platforms that use a more > aggressive development branch of rpm - funnily enough my main system is > Fedora, which falls in this category, so I had some motivation :). My > Fedora systems now fail two, one of which can also be seen in the > buildbot Centos builder - trying to guess things about Qt. > > === > > Some packaging tests fail on Windows. My own tests fail these three: > > test\packaging\guess-package-name.py > test\packaging\strip-install-dir.py > test\packaging\tar\bz2_packaging.py > > The bz2 one is interesting and the topic of this email: it finds tar, > but then tar fails to find bzip2, apparently used as a helper: > > STDERR > = > tar: Can't launch external program: bzip2 > > The same thing is what fails guess-package-name. The middle test is a > pathname format issue, easily fixed, but also caused by: > > it seems there is now a tar command provided in recent Windows! But it > wants to use helper functions for some formats, which are not provided! > > > https://blogs.technet.microsoft.com/virtualization/2017/12/19/tar-and-curl-come-to-windows/ > > this was a build preview leading up to Windows 10 1803, and indeed there > is on my system: > > c:\Windows\System32\tar.exe > > which is: > bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp > > Our tests don't know how to check for this sort of thing - they check > for tar itself, but don't know to avoid the test because an unknown > helper program is not found. > > Our Appveyor CI build presumably uses an older Windows, it passes both > the bzip2 and gz tests, which are a little odd... the test is inside an > if: block based on finding tar, after that block it says > test.pass_test(). Most tests take the route of skipping the test if > they don't find the tool, rather than passing... > > - do we just consider this (no bzip2) a bug in Windows and move along? > - should these tests get the usual skip logic? > > apparently gzip format is handled internally by Windows tar, though > there is no hint of it in the help message. > > === > > While on the subject of bzip2, there's support for the bz2 format in > scons, but not for xz. Is there any point in adding xz support? should > be pretty close to trivial. > > ___ > Scons-dev mailing list > Scons-dev@scons.org > https://pairlist2.pair.net/mailman/listinfo/scons-dev > ___ Scons-dev mailing list Scons-dev@scons.org https://pairlist2.pair.net/mailman/listinfo/scons-dev