Shawn Walker wrote:
> Ed McKnight wrote:
>>  From Man:: pkg(5):
>>
>> file action attribute: original_name
>>
>> Is this attribute currently supported?
> 
> It should be.
> 
>> Can someone give some scenario examples? The pkg(5) page talks about 
>> editable files migrating around and deletion.
> 
> As an example from our tests/cli/t_pkg_install.py:
> 
>              open [EMAIL PROTECTED],5.11-0
>              add file /tmp/config1 mode=0644 owner=root group=bin 
> path=etc/config1 preserve=true
>              close
> 
>              open [EMAIL PROTECTED],5.11-0
>              add file /tmp/config2 mode=0644 owner=root group=bin 
> path=etc/config2 original_name="gold:etc/config1" preserve=true
>              close
> 
>              open [EMAIL PROTECTED],5.11-0
>              add file /tmp/config2 mode=0644 owner=root group=bin 
> path=etc/config1 original_name="gold:etc/config1" preserve=true
>              close
> 
>> Also, the phrase "part of the same packaging operation" isn't clear to me.
> 
> My guess is that it means that the removal of the old package has to 
> occur during the same operation as the installation of the new one.  In 
> other words, using the example above, gold2.0 would have to be removed 
> and silver2.0 installed during the same "install" or "image-update" 
> operation.
> 
>> TIA, --emk
>>
>> -------------------------------------------------
>>
>>      original_name This attribute is used to handle editable files moving
>>                    from package to package or from place to place, or both.
>>                    The form this takes is the name of the originating 
>> package, 
>>                 followed by a colon and the original path to the file.
>>                 Any file being deleted is recorded either with its 
>>                 package and path, or with the value of the original_name
>>                 attribute if specified.  Any editable file being installed
>>                 that has the original_name attribute set will use the
>>                 file of that name if it is deleted as part of the same
>>                 packaging operation.
>> -------------------------------------------------
> 
> Cheers,

That's correct.

Note that IPS computes a single packaging operation that incorporates
all desired change into a single transformation; first, removals are 
done, then installation of new files and lastly updates.  Note that this
is done across all packages; in other words, IPS always deals with all
changes at once. This permits us to not worry about normal files moving
between packages, for example. However, for editable files we need a way
of recording name changes so that we never delete and then re-install
an editable file. The original_name attribute gives us that mechanism.

- Bart


-- 
Bart Smaalders                  Solaris Kernel Performance
[EMAIL PROTECTED]               http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to