Re: [sabayon] new function in storage module to get a path to a file/directory in uncompressed temp profile



On Mon, 2005-06-20 at 10:14 +0100, Mark McLoughlin wrote:
> Hi John,
> 	Looks fine, some comments:
> 
>   1) The function name isn't great, but I can't think of anything much 
>      better :-)
> 
>   2) I don't think we need to return item_revision

Yes, I agree its somewhat redundant.

> 
>   3) I'm also not sure we need expose the item type either - the source
>      should know whether a given item is a directory or either because 
>      it was the one who added it in the first place or stat()ing it. We 
>      don't e.g. have the item type in the foreach() callback

It's used to determine copy method in extract. You're right, extract
could determine this by stat()'ing. 
> 
>      So, I reckon it should just return the path

O.K. I'll change them.


>   4) The copy_tree (foo, bar, "") thing is making me nervous too. 
>      Perhaps you should have a private function (which would return the 
>      dst_base and dst_name) which both extract() and 
>      get_extract_src_path() would use

Agreed, this seems cleaner, I'll code something up.
-- 
John Dennis <jdennis redhat com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]