*Synopsis*: validate_pkg traceback when manifest contains an untargeted link

CR 6963318 changed on Jun 23 2010 by <User 1-5Q-313>

=== Field ============ === New Value ============= === Old Value =============

Description            New Note                                               
Status                 3-Accepted                  1-Dispatched               
====================== =========================== ===========================

     
*Change Request ID*: 6963318

*Synopsis*: validate_pkg traceback when manifest contains an untargeted link

  Product: solaris
  Category: consolidation
  Subcategory: os-net-tools
  Type: Defect
  Subtype: 
  Status: 3-Accepted
  Substatus: 
  Priority: 4-Low
  Introduced In Release: 
  Introduced In Build: 
  Responsible Engineer: 
  Keywords: 

=== *Description* ============================================================
Due to a copy-paste error, I accidentally added a link to one of my
package manifests that had no target:

link path=usr/X11/lib/mesa=../../lib/mesa

Amazingly, this got all the way through the package build and publication,
but when it got to validate_pkg instead of printing a user-friendly
"invalid link" message, it instead threw a traceback that required me to
dig through the python code to try to find the cause, then grep all my
manifests to try to find which was broken:

Traceback (most recent call last):
  File "/opt/onbld/bin/validate_pkg", line 878, in <module>
    main(sys.argv[1:])
  File "/opt/onbld/bin/validate_pkg", line 836, in main
    manifesttree.adddir(mdir, arch, modechecks, exceptions)
  File "/opt/onbld/bin/validate_pkg", line 659, in adddir
    self.addmanifest(mdir, mfile, arch, modechecks, exceptions)
  File "/opt/onbld/bin/validate_pkg", line 642, in addmanifest
    self[path] = ActionInfo(action)
  File "/opt/onbld/bin/validate_pkg", line 307, in __init__
    target = action.attrs["target"]
KeyError: 'target'
*** Error code 1
The following command caused the error:
validate_pkg -a i386 -M -m build-i386
dmake: Warning: Command failed for target `pmodes'
Traceback (most recent call last):
  File "/opt/onbld/bin/validate_pkg", line 878, in <module>
    main(sys.argv[1:])
  File "/opt/onbld/bin/validate_pkg", line 836, in main
    manifesttree.adddir(mdir, arch, modechecks, exceptions)
  File "/opt/onbld/bin/validate_pkg", line 659, in adddir
    self.addmanifest(mdir, mfile, arch, modechecks, exceptions)
  File "/opt/onbld/bin/validate_pkg", line 642, in addmanifest
    self[path] = ActionInfo(action)
  File "/opt/onbld/bin/validate_pkg", line 307, in __init__
    target = action.attrs["target"]
KeyError: 'target'
*** Error code 1
The following command caused the error:
validate_pkg -a i386 -v -e 
/export/alanc/hg/xnv-ips/pkg/../exception_lists/packaging -e 
build-i386/generated-exceptions \
        -m build-i386 -p /export/alanc/hg/xnv-ips/proto/root_i386

*** (#1 of 2): 2010-06-23 02:48:16 GMT+00:00 <User 1-5Q-1267>

Additionally, an invalid link (link not satisfied in the proto area) will
not always be an error.  This will be required to address situations like
the one described in 6726586.  I'm not convinced validate_pkg should grow
an explicit check, and this may be better handled by pkglint, which could
support a tag which specified that the lack of target is expected.  But,
validate_pkg definitely shouldn't traceback.

*** (#2 of 2): 2010-06-23 14:28:18 GMT+00:00 <User 1-5Q-313>


=== *Public Comments* ========================================================

=== *Workaround* =============================================================

=== *Additional Details* =====================================================
        Targeted Release: 
        Commit To Fix In Build: 
        Fixed In Build: 
        Integrated In Build: 
        Verified In Build: 
  See Also: 
  Duplicate of: 
  Hooks:
        Hook1: 
        Hook2: 
        Hook3: 
        Hook4: 
        Hook5: 
        Hook6: 
  Program Management: 
  Root Cause: 
  Fix Affects Documentation: No
  Fix Affects Localization: No

=== *History* ================================================================
        Date Submitted: 2010-06-23 02:48:15 GMT+00:00
        Submitted By: <User 1-5Q-1267>

        Status Changed    Date Updated                  Updated By
        3-Accepted        2010-06-23 14:28:18 GMT+00:00 <User 1-5Q-313>


=== *Service Request* ========================================================
        Impact: Limited
        Functionality: Secondary
        Severity: 4
        Product Name: solaris
        Product Release: solaris_nevada
        Product Build: 
        Operating System: solaris
        Hardware: generic
        Submitted Date: 2010-06-23 02:48:16 GMT+00:00


=== *Multiple Release (MR) Cluster* - 0 ======================================

_______________________________________________
on-ips-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/on-ips-dev

Reply via email to