expand/hcollapse limitations?

   5595   16   1
User Avatar
Member
133 posts
Joined: July 2005
Offline
I tried to use the hip cpio expand feature to distribute multiple node parameters to files without opening them, however it fails on hcollapse. Is it just the contents maniphest problem? Is it even possible?

More documentation on this topic would be more than welcome. Also how it pertains to different Houdni versions (Indie).
User Avatar
Member
133 posts
Joined: July 2005
Offline
It doesnt even work if I just expand and collapse the same file without any changes. Houdini complains with invalid CPIO header on file load.
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Are you trying to use hexpand/hcollapse on an Indie file? I don' think they are supported for Indie (and Apprentice) files.
Andrew / アンドリュー
User Avatar
Member
133 posts
Joined: July 2005
Offline
No the commercial version hip files.
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Which version of Houdini are you trying this with? I just tried it in a simple scene with only a box in it, and it seems to work. I did this:
$ hexpand foo.hip
84 blocks
table of contents for foo.hip stored in foo.hip.contents
84 blocks
foo.hip expanded into the directory foo.hip.dir
$ rm -f foo.hip
$ hcollapse foo.hip
collapsed foo.hip.dir into foo.hip

I used the latest 14.0.
Edited by - Sept. 24, 2015 09:44:26
Andrew / アンドリュー
User Avatar
Member
133 posts
Joined: July 2005
Offline
Did you try to load the resulting .hip? For me it errors out.

The version we are currently on is 14.0.441 I guess.
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Yeah, I was able to open up the file in Houdini with no errors at all. I tried this on both Linux and OS X. This is basically what I tried:
# Generate the hip file
rm -f foo.hip
hbatch -c “cd /obj; opadd geo; mwrite foo.hip; quit”

# hexpand/hcollapse
rm -fr foo.hip.*
hexpand foo.hip
rm -f foo.hip
hcollapse foo.hip

# Load the hip file
hbatch -c “mread foo.hip; ls; quit;”

Can you attach the hip file that you generated? Maybe that'll give a hint to the problem…
Edited by - Sept. 30, 2015 11:35:09
Andrew / アンドリュー
User Avatar
Member
133 posts
Joined: July 2005
Offline
I get this back from hbatch on file load:


hbatch -c “mread foo.hip; ls; quit;”
hbatch Version 14.0.441 (Compiled on Aug 31 2015)
Error loading: foo.hip
Error: Unknown operator on load “000237.start”.
Unexpected end of .hip file
Unknown command: ls
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
That's weird. Can you attach the hip files? The hip file before hexpand, and the hip file after hcollapse.
Andrew / アンドリュー
User Avatar
Member
133 posts
Joined: July 2005
Offline
Sorry for delay in the reply, was busy on a project.

hbatch -c “mread foo.hip; ls; quit;”
hbatch Version 14.0.441 (Compiled on Aug 31 2015)
Error loading: foo.hip
Error: Bad header in CPIO packet ().
Bad header in CPIO packet ().
Invalid .hip file header
Unknown command: ls


foo.hip.zip is generated by hbatch, foo-result.hip.zip is the result of hexpand->hcollapse.

Houdini 14.0.441, CentOS Linux release 7.1.1503

Attachments:
foo-result.hip.zip (4.1 KB)
foo.hip.zip (4.0 KB)

User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Hm, the resulting file does indeed seem wrong. I suspect this might have something to do with the OS actually. Let me install CentOS and give this a try.
Andrew / アンドリュー
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
I just tried Houini 14.0.441 (gcc4.4) on CentOS 7.1.1503, and I can't reproduce the issue. This is really strange…
Can you try running these commands? You'll need to setup the usual Houdini environment. It'll generate a “foo.hcpio” file. Can you post that file?
$ echo “hello world” > foo.txt
$ echo foo.txt | hcpio -o -O foo.hcpio -H odc
Andrew / アンドリュー
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Oh, can you also run this command, and post the output?
stat foo.txt
You should see an output like:
hello world
File: ‘foo.txt’
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 205317290 Links: 1
Access: (0664/-rw-rw-r–) Uid: ( 1000/ andrew) Gid: ( 1000/ andrew)
Context: unconfined_ubject_r:user_tmp_t:s0
Access: 2015-09-30 12:06:49.312734647 -0400
Modify: 2015-09-30 12:06:49.312734647 -0400
Change: 2015-09-30 12:06:49.312734647 -0400
Birth: -
Andrew / アンドリュー
User Avatar
Member
133 posts
Joined: July 2005
Offline
This I get back from stat

File: ‘foo.txt’
Size: 12 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 134459845 Links: 1
Access: (0666/-rw-rw-rw-) Uid: (16777218/user)
Gid: (16777216\domain users)
Context: unconfined_ubject_r:user_home_t:s0
Access: 2015-09-30 19:06:33.480448865 +0200
Modify: 2015-09-30 19:06:18.714266400 +0200
Change: 2015-09-30 19:06:18.714266400 +0200
Birth: -


BTW, thanks for your help!

Attachments:
foo.hcpio.zip (196 bytes)

User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Ah, yes, I see why you're having the problem now. Hopefully, it should be easy to fix…
Andrew / アンドリュー
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
I just made a fix. It should be in tomorrow's build (14.0.472). Hopefully that fixes your issue.
Andrew / アンドリュー
User Avatar
Member
133 posts
Joined: July 2005
Offline
Thanks, it works fine now!
  • Quick Links