Bart Smaalders wrote:
http://cr.opensolaris.org/~barts/8604/
http://defect.opensolaris.org/bz/show_bug.cgi?id=8604

(yes, I'll fix the copyright date :-)).

Slurps up the catalog from a repo; find the specified pkgs
(recursively if requested) and prints a list of files to
copy from one repo hierarchy to another to move those pkgs.

Apparently, build 111 requires 264244 files for manifests
and data.  Yow.

gen_copy_list.py:
  line 41: Unused import ptf

  line 47: Unused import gunzip_from_stream (also this line is a bit long)

  line 43: Unused import actions

  line 36: Unused import urllib

  line 47: Unused import msg

  line 48: Unused import global_settings

  lines 51, 53: spaces around '='

lines 142-148: why not just reuse catalog.cache_fmri() here? It will take care of the version sorting for you, and the structure it provides makes lookups fast. Just call read_catalog and pass it a dict for the first argument. You'll get back a pretty structure with everything you appear to need.

  line 160: > 80 characters


Finally, with a few small additions, you could get this program to copy all of the packages for a specific release and build. Its easy to get all of the fmris from the catalog (assuming you have a catalog object).

For example, to get the fmris of all build 110 packages:

pkg.catalog.extract_matching_fmris(cat_object.fmris(), patterns=["*,0.5.11-0.110"])

...or multiple builds:

pkg.catalog.extract_matching_fmris(cat_object.fmris(), patterns=["*,0.5.11-0.110", "*,0.5.11-0.111"])

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

Reply via email to