Hi Shawn,
Initially the plan was to introduce a new attribute named pkg.icon.24px in set action. But I think introducing a new action type
is better than modifying the set action.
1. Modifying the set action for an attribute "pkg.icon.24px" and setting the hash value is totally different from how the other attributes in set action works. I think it is undesirable for set action to have two different things, a opaque value and a filename/hashvalue. The set action doesn't allow one to know to know if the value is a simple text value or a filename/hashname.

2. pkgrecv would not know that the value of a set action is actually a hash value that indicates a filename.

3. set action doesn't doesn't give the information about caching the information in metadata area.

One advantage in using InfoAction is , we have the option of expanding it in future to accommodate more data related to package.

For this reason I propose the InfoAction , which can be used for pkg.icon.24px as of now and can be used in future for others data's without
any modifications to the code.


*Info Actions*
   The 'info' action represents an informational file associated with the
   package contents. For example, an icon for the package can be represented
   using this action. The payload of the info action will be delivered into
   the image metadata directory associated with the package.
        
        The following attributes are recognized:
        
type The keyword identifying the information type, for use in filter and query operations. The 'type' attribute is the key attribute for the info action.
        

At present, the only type value allowed is pkg.icon.24px but in future we can 
extend
this action to use other types of informational payloads.

Now the syntax is
*pkgsend add info* */home/rajkumar/package-24x24.png type=pkg.icon.24px
**
*metadata location*
.org.opensolaris,pkg/pkg/sample/1.0.1%2C5.1.2600%3A20090324T133153Z/info.pkg.icon.24px*

Manifest entry
*info cd8e2e19900beccecd829d37195e5f6b92e97394 chash=9d77be964b27e4b52fd17625facd25de138bf54c pkg.csize=4118 pkg.size=4095 type=pkg.icon.24px*

I think we need one more attribute to set the icon file type (svg or png ), but I think there is no need to expose this attribute to the user we can use internally in the code. This will be used by the client UI to find the type of file and direct it to the corresponding loader.
Is there any other way to do this?

I have also attached the action file which I coded and it works fine.

Thoughts?

regards,
Rajkumar
Shawn Walker wrote:
On Thu, 2009-04-02 at 17:19 +0530, rajkumar wrote:
Shawn,
           I have designed a new action as per your suggestion, this
action is similar to the license action.
It install's the content/file in the metadata area like the license
action.

I think there's been some miscommunication.  I was asking for feedback
on what others thought about having a new action for this, and the
resulting consensus was that a new attribute was the preferred direction
as Danek said.

I'd go back to working out:

* what attribute you'd like to add

* which actions should have it

* what it's possible values are, etc.

Cheers,

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

Reply via email to