Bug 7046 - client intent is not sent if same api object used for multiple operations / reasons
: client intent is not sent if same api object used for multiple operations / r...
Status: RESOLVED FIXINSOURCE
Product: pkg
api-python
: unspecified
: ANY/Generic All
: P4 normal (vote)
: ---
Assigned To: Shawn Walker
: pkg/api-python watcher
:
:
:
: 5871
:
  Show dependency treegraph
 
Reported: 2009-03-02 11:00 UTC by Shawn Walker
Modified: 2009-03-09 14:27 UTC (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Shawn Walker 2009-03-02 11:00:57 UTC
If an api object instance is used for more than one operation for the same
fmri, client intent will not be sent.

For example, if (using the same api object) you:

* perform install
* perform uninstall

Intent will only be sent for the install and will not be sent for the
uninstall.

Likewise, if you:

* perform a noexecute install
* perform an install

Intent will only be sent for the noexecute install, and not the install.

This needs to be fixed so that clients (such as the GUI) that re-use the same
API object will still properly send intent for different operations on the same
FMRI or the same operation for different reasons on the same FMRI.
Comment 1 Shawn Walker 2009-03-02 11:01:17 UTC
Cause described in comment 0; work already in progress.
Comment 2 Brock Pytlik 2009-03-02 11:09:39 UTC
You might consider having reset recreate an image object. Bart and I discussed
the issue of image state on pkg-discuss a week or so back and I think we came
to the conclusion that it probably made the most sense to have the reset call
in api.py create a new image object, at least for now, rather than trying to
determine which state to keep and which to remove.
Comment 3 Shawn Walker 2009-03-02 11:14:07 UTC
I actually managed to fix this particular issue already by including intent
(imagestate.INTENT_INFO, etc.) when tracking which manifests have been touched.

I'm going to go with that option for now as changing reset to actually create a
new image object, etc. seems like a bigger change I'd rather leave to bug 6758.

I appreciate the note though as I hadn't thought of it.
Comment 4 Shawn Walker 2009-03-09 14:27:49 UTC
Fixed in changeset 926 / 6ee411c9026af426a657cb1f5e4b73c14c2e1112.