Stephen Hahn wrote:
* Brock Pytlik <[email protected]> [2009-10-14 01:57]:
New webrev for bug 7960:
http://cr.opensolaris.org/~bpytlik/ips-7960-v3/

Bug:
7960 client and depot need different organization of files

Note:
Compared to v2, it resyncs with the gate and adds more info to the block comments for file_manager and layout.

  Thanks.

   *.  Use PEP257 for docstrings.  Run pydoc over your .py file to verify
       that your documentation is relatively complete.

  **.  I think a use case to consider/document is the hypothetical
  depotadm(1M) "update-repo" use case, where we would move every file in
  the Original/V0 layout to its Fan256Once/V1 location.
I'll adjust walk just slightly and add a reverse mapping function to the layout classes to address this. Then this "update-repo" case becomes:
for i in file_manager.walk():
   file_manager.lookup(i)

since with the reverse lookup, it will return hashes to feed into lookup instead of file names. (Most likely, I'll make this an option to walk so that it can either return file names or return hashes.)
  layout.py:

  [snip]

  56ff.  Write up seems to suggest one must use all 4 bits of a
         particular hex digit.  If you restrict to 0-7, or 0-3, then
         more fanout choices are available...
True, but then more computation needs to be done (like I said, multiples of 16 are convenient , but we did look into other multiples).
 108.  No get_preferred_layout() method?

Sure, I can add one if that'd be helpful.
  file_manager.py:

  [snip]

  I wonder if my use case "**" above suggests making a single
  Layout-based FileManager, as well as the multiple Layout case we need
  for the current depot?  (FileManagerFactory?)
I probably just haven't had enough caffeine today, but why is this different than/preferable to having FileManager take the layouts to be used as arguments (like it does now)? (I'll admit that while i'm somewhat familiar with the factory pattern, it's not one I often see much use for.)

Thanks for taking a look. I'll work in the rest of the changes and put a new webrev out before too long hopefully.
Brock
  Thanks
  Stephen


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to