Hi all,

I've put together a new webrev for the fix for bug #5141:


  http://defect.opensolaris.org/bz/show_bug.cgi?id=5141
  gen_os_files.py doesn't correctly handle packages that
  are no longer classified.

You can find it at:

  http://cr.opensolaris.org/~richb/pkg-5141-v2/

The previous fix was a rush job on Sunday night in order
for David to have something he could use correctly for
the RC2 changes.

Now I've had more time to think about it (and I'm not so
tired), the approach given in the new version of gen_os_files.py
is much cleaner (and simpler).

It generates identical results to the previous version.

It might be easier to just look at the new script in its
entirely, so the Raw version would be the best.

Thanks.



-------- Original Message --------
Subject:        [pkg-discuss] Code review request for opensolaris packaging 
bug #5141.
Date:   Sun, 16 Nov 2008 23:54:38 -0800
From:   Rich Burridge <[EMAIL PROTECTED]>
To:     pkg discuss <[email protected]>



Hi all,

I'm looking for a review of the fix for bug #5141:

  http://defect.opensolaris.org/bz/show_bug.cgi?id=5141
  gen_os_files.py doesn't correctly handle packages that
  are no longer classified.

Webrev is at:

  http://cr.opensolaris.org/~richb/pkg-5141-v1/

David spotted that SUNWipkg-gui-data was still being classified
even though the version in 101a should have prevented that.

The new version of the gen_os_files.py script makes the
following changes:

1/ Now looks at tokens[1] not tokens[0] when extracting the build number.
2/ Adds in a new check at the end of the extract_info() method:

       if self.package_name and not classification_found:
           self.check_if_not_classified(pathname)

3/ In the check_if_not_classified() method, if we already have a
   dictionary entry for this package, check to see if this one is
   for a newer build. If so, then set the dictionary entry to be a
   list just containing the build number. If there is no dictionary
   entry yet for this package, then also set the dictionary entry
   to be a list just containing the build number.

4/ Where ever it was getting the value of self.packages[self.package_name],
   that's now surrounded by a try:/except: block so that if the value
   isn't a list containing three items (build number, category, 
sub-category),
   then it's caught, and just the build_number of the latest package
   looked at, is extracted.

David and myself have both successfully run this new version of the script.
We would like to get this change in for OpenSolaris 2008.11 RC2 tomorrow
morning.

Thanks.

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

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

Reply via email to