Thank you, Tim.

I tried putting the following in the ruby-18.p5m pkg manifest:

dir path=usr/ruby/$(RUBY_VER)/lib/ruby/gems/$(RUBY_VER)/bin \
        salvage-from=var/ruby/$(RUBY_VER)/gem_home/bin
dir path=usr/ruby/$(RUBY_VER)/lib/ruby/gems/$(RUBY_VER)/cache \
        salvage-from=var/ruby/$(RUBY_VER)/gem_home/cache
dir path=usr/ruby/$(RUBY_VER)/lib/ruby/gems/$(RUBY_VER)/doc \
        salvage-from=var/ruby/$(RUBY_VER)/gem_home/doc
dir path=usr/ruby/$(RUBY_VER)/lib/ruby/gems/$(RUBY_VER)/gems \
        salvage-from=var/ruby/$(RUBY_VER)/gem_home/gems
dir path=usr/ruby/$(RUBY_VER)/lib/ruby/gems/$(RUBY_VER)/specifications \
        salvage-from=var/ruby/$(RUBY_VER)/gem_home/specifications

Only the usr/ruby/$(RUBY_VER)/lib/ruby/gems/$(RUBY_VER)/bin
and var/ruby/$(RUBY_VER)/gem_home/bin directories did not exist in the previous version of the package. One wrinkle is that there *could* be duplicate ruby gems already installed by the user in the target /usr/ruby/1.8/lib/ruby/gems/1.8/{bin,cache,doc, gems,specifications}
directories, in which case I would say that we should *not* move them.

I wasn't able to get the above entries to move any files, installing the new ruby-18 pkg onto a S11 Update 1 build 23 system. I even tried it with no conflicting duplicate files/dirs between the salvage-from dir and the target dir. Do you have any ideas on
what I might be missing?

Thanks,
April

On 09/10/12 02:44 PM, Tim Foster wrote:
On 09/11/12 07:29 AM, April Chin wrote:
If not, what other method should I be using?

Note that I also played with using the "salvage-from" action on the
directories into which
I want to move the in files; salvage-from can be used to move unpackaged
contents from
a directory it names.  I haven't been successful in getting this action
to work either.

Yep, 'salvage-from' is exactly what you should be using - it's designed for exactly this reason: to move unpackaged files from a directory that's disappearing as part of this package operation (either the old package becomes uninstalled, or the package previously delivering that dir action stops delivering it)


So, this might look like:

set name=pkg.fmri value=pkg:/runtime/[email protected]
dir path=usr/ruby/1.8/lib/ruby/gems/1.8 salvage-from=var/ruby/1.8/gem_home

Note that salvage-from isn't recursive, so if you have multiple *packaged* directories beneath /var/ruby that each contain unpackaged content, then you'll need multiple dir actions, each with their own 'salvage-from' attribute, for each directory that's being migrated.

If any unpackaged content in a given packaged directory has unpackaged subdirectories and files, that content is moved recursively though.

    cheers,
            tim
_______________________________________________
userland-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/userland-discuss

Reply via email to