[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] tla inventory
Re: [Gnu-arch-users] tla inventory
Sat, 18 Sep 2004 08:49:50 +1000
On Sat, 2004-09-18 at 02:15, David Allouche wrote:
> On Fri, 2004-09-17 at 13:29 +1000, Zenaan Harkness wrote:
> > * When I add the -p|--precious option to tla inventory, I get "P? "
> > prefixes to the files listed. This makes it useless for piping a list of
> > such files to tar (jar in my case).
> Here, it works as expected.
> tlash pyarch> inventory -p
> tlash pyarch>
> Using 1.2.2rc2.
Ahah! it seems that inventory's -p and -s options are at least partially
A little testing throws up this, again, from my build/ output dir, the
contents of which is not arch controlled:
$ tla inventory -p media
$ tla inventory -p media/
$ tla inventory -pB media
$ tla inventory -pB media/
My point is, in all cases, I can't get the directory "media" to be
included in the output of inventory. When I create a tar/jar/zip file,
it should have that directory, as well as its contents, and so I am
forced to manually include that parent file on the right hand side eg:
$ tla inventory -p media/|xargs tar -cvf t.tar
$ tla inventory -p media/|xargs tar -cvf t.tar media
Of course, as you can see, when I do so, tar includes the contents of
Again, I am inside build/, the contents of which is not arch controlled.
> > * tla inventory has an option, --nested. That does not follow symlinks.
> > Would it be approrpriate to add an equivalent to tar's --follow (follow
> > symlinks) option?
> This would conflicts with the contract of "tla inventory" as I
> understand it, which is "list all arch-controlled files". Symlinks are
> version-controlled, traversing them would not expose the actual
> > The reason for needing --follow is, my build/ output dir is built by
> > both compiling stuff from my src/ dir (Java classes), as well as
> > symlinking some stuff (media/images directory and the line). So my
> > build/ output hierary has symlinks, which need to be descended for the
> > purpose of building my release files (.jar zip files).
> > Now, I could (am currently) chaining tar --follow and an inverse (-v)
> > grep (to remove .arch-ids directories etc), but it would seem that tla
> > inventory should be able to do this .. that's exactly the type of thing
> > it's for, right?
> GNU tar has no --follow option.
Sorry, you're right - it's "find" that has the -follow option...
> If I understand you well, you want to export a Arch tree (a la make
> dist) by traversing the symlinks. Actually, you want to export _part_ of
> an arch tree...
I run bin/build, which populates my build/ dir.
Nothing inside of build/ is arch version controlled.
Some of the things inside build/ are files generated by the build
process (compiled output files).
Other things in build/ include symlinks to some things (in my case,
directories) in my src/ directory.
src/ is fully arch version controlled, therefore has .arch-ids dirs.
The final step of my build is to create a tar/zip/jar file.
So I "cd build/", then attempt to create this .jar (zip) release file.
I guess what I was assuming was that the "grep rules" of tla inventory,
could be used in my build/ hierarchy, to extract the files I need.
Instead, I manually reacreate (some of) inventory's grep rules, which
seems unnecessarily redundant.
Of course, the question at least for -follow becomes "what if you've got
symlinks that _should_ be part of the tar ball, rather than followed".
In my case the zip files don't contain symlinks, so symlinks should
always be followed, but I simply want to exclude .arch-ids and friends.
Since inventory already knows about these tla meta files, I shouldn't be
having to recreate those rules with manual greps. ??
> You could do it in several steps:
> 1. Export your _whole_ tree using something like
> tla inventory --whatever --nested | \
> cpio --pass-through --link --make-directories ../export-stuff
A symlink farm. Thanks for the tip. I haven't before seen a command that
could do it so cleanly - that's a useful thing to know.
> 2. Prepare the tarball
> cd ../export-stuff
> mv build javafrob-1.0
> find -follow javafrob-1.0 | tar cTzf - javafrob-1.0.tar.gz
> Or something like that.
> Anyway, your approach seems broken because if "--whatever" is source,
> then you'll probably miss your build files (which _should_ not be
> source) and if it is --precious or something else like that you will be
> likely to get random crap precious files as well.
It's my build/ directory, so I'm only building/ linking stuff in there
that I need for my tar balls.
> I guess there is probably a better way to organize your source trees.
The reason I have it this way is for these (number of) directories of
images. They're binary files, never change, although I want tla to
version control them for, because conceivably they could change one day.
And for my build/ release process, I simply want to include them (along
with other stuff) in my tar balls.
Of course, I don't want arch's meta files.