On 10/29/07, Stéphane Magnenat <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > > I'm looking at diverse SConstruct towards the goal of building the
> deb.
> > > Yet
> > > there is undocumented code whose reason of existance is not obvious
> for
> > > me:
> > > - in main SConstruct, why does PackTar have case for files beginning
> with
> > > "/",
> > > this does not happen in glob2?
> >
> > This is for directories->files, like, src/File.cpp, it has to consider
> the
> > directory portion separately.
>
> I still do not understand the tar part. env.Install() seems to do
> everything
> correctly, so I do not understand why you don't simply install everything
> in
> the rep to be tared and tar it later. Is it because you need to call Tar
> which is something that, executed after all the installs, will make the
> tar
> file? I haven't found Tar() in SCons documentation.


Look in the Scons user Manual. Tar is bassically as it sounds, it puts files
into a tar file. The 'Install' builder is bassically a copy operation. I
could tar directly, but unfortenetely I needed to get the top level
directory to be 'glob2-0.9.1', and there is no easy way to do this without
copying all the files to a temporary first, and Install does this for me.



> If I understand correctly, nothing gets executed until main() is called at
> the
> end of SConstruct? If so, and if I want to build a deb using env.Install(),
> I
> must make sure the deb building command gets executed afterwards.


All you need to do is set up a the env.Install, and use the Alias to make
one 'debbuild' install all the files to the temporary deb directory.


 The web
> page I found about making debs does seems to do it another way, by
> executing
> commands from SConscript, using Copy() and not using the deferred
> mechanism.


Either way works, really.


It would help a lot if you (I presume you are the authors of those scripts)
> could document them a bit.


I could do that next time I maintain them.


> > - why is "dist" and "install" targets considered together? I imagine
> that
> > it
> >
> > > is to iterate on files only once but that reduce readability,
> specially
> > > because there is a test in PackTar to exclude the non "dist" case.
> >
> > That seems odd. That was likely accidental, or without thinking.
>
> Do you plan to change it?


If I get back to working on glob2 I might.

> - path seems to be concatenated by hand, shouldn't we use os.path.join() ?
> >
> > That works just the same.
>
> The doc seems to say that in special cases, for instance on windows, it
> behaves better; anyway I imagine we have no such case.


Probably, it hasn't caused me any trouble so far.


Thanks!
>
> Have a nice day,
>
> Steph
>
> --
> http://stephane.magnenat.net




-- Extra cheese comes at a cost. Bradley Arsenault.
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to