[Scons-users] Problem that has me scratching my head...

Bill Deegan bill at baddogconsulting.com
Fri Oct 20 11:55:00 EDT 2017


If you run scons -k does the file get copied?

On Fri, Oct 20, 2017 at 8:39 AM, <syost at triad.rr.com> wrote:

> I have a few packaging artifacts in my CVS package that I want to carry
> along with my build into my variant dir.   From everything I can tell, the
> builder for these resources is getting called.   In the end, its just a
> Copy() statement.   While the source for these artifacts are getting
> propagated to the variant_dir, the Copy() does not seem to be getting
> executed even though I have wrapped it in a "Command()" call.   Any idea??
>
> Here is the build output.   Just choosing one artifact out of the log as
> an example - several are needing to be copied and are not:
>
> (from reading SConscript)
> Invoking generic file copy builder...
> TARGET/SOURCE IS: mypackage-1.1.1/debian/changelog,packaging/changelog
> <...snip...>
>
> (from actual build)
> Preparing target Remote/com/mycompany/so/utility/myprogram/myprogram-1.
> 1.1/debian/changelog...
> generic_file_copy_builder(["Remote/com/mycompany/so/
> utility/myprogram/myprogram-1.1.1/debian/changelog"],
> ["Remote/com/mycompany/so/utility/myprogram/packaging/changelog"])
> TARGET/SOURCE IS: Remote/com/mycompany/so/utility/myprogram/myprogram-1.
> 1.1/debian/changelog,Remote/com/mycompany/so/utility/
> myprogram/packaging/changelog
>
> <...snip...>
>
> (failure mode)
> Preparing target myprogram_1.1.1-1.1.1_amd.deb...
> cd /home/myaccount/git/app-genesis/lsql-build/Remote/com/
> mycompany/so/utility/myprogram/myprogram-1.1.1 && debuild -b
> debuild: fatal error at line 633:
> cannot find readable debian/changelog anywhere!
> Are you in the source code tree?
>
>
> Sure enough, changelog was propagated to the variant_dir ("Remote") but
> not copied to "debian"   Any clues?  Using --tree=prune does not show it so
> I suspect a dependency I am missing
>
> ========================================
> Relevant code from SConscript(there is more but this is all that is
> relevant):
>
> def generic_file_copy_builder(target, source, env ):
>
>     # Now we specify the general package related files (ie copyright, etc)
> to be included in the .deb
>     print("TARGET/SOURCE IS: "+str(target[0])+","+str(source[0]))
>     env.Command(target, source, Copy('$TARGET', '$SOURCE'))
>
> # This is the debian package we're going to create
> debpkg = '#%s_%s-%s_%s.deb' % (DEBPACKAGE, DEBVERSION, svn_version,
> DEBARCH)
> # and we want it to be built when we build 'debian'
> env.Alias("debian", debpkg)
>
> copyBld = Builder(action = generic_file_copy_builder)
> env.Append(BUILDERS = {'GenericCopy' : copyBld})
>
> for packageFile in Glob('packaging/*'):
>     myTarget = os.path.join(DEBPACKAGEDIR,"debian/" +
> os.path.basename(str(packageFile)))
>     print("Invoking generic file copy builder...")
>     print("TARGET/SOURCE IS: "+str(myTarget)+","+str(packageFile))
>     finalFileLocation = env.GenericCopy(myTarget, packageFile)
>     env.Depends(debpkg, finalFileLocation)
>
>
> ============================================
> Here is the directory structure of the code:
>
> +-com/lowes/so/utility/myprogram
>   +-com/lowes/so/utility/myprogram/packaging
>   | +-com/lowes/so/utility/myprogram/bunch_of_c_files.c
>   | +-com/lowes/so/utility/myprogram/bunch_of_headers.h
>   | | +-com/lowes/so/utility/myprogram/packaging
>   | | +-com/lowes/so/utility/myprogram/packaging/changelog
>   | | +-com/lowes/so/utility/myprogram/packaging/several_
> more_packaging_artifacts
>   +-com/lowes/so/utility/myprogram/SConscript
>
>
>
> Thanks in advance for any assistance!!!!
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171020/b54575e6/attachment.html>


More information about the Scons-users mailing list