Hi Tim,

Thanks for the simple case pkg manifests.

On 09/10/12 03:49 PM, Tim Foster wrote:
On 09/11/12 10:15 AM, April Chin wrote:

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.

That salvage operation wouldn't work if var/ruby/$(RUBY_VER)/gem_home/bin wasn't a packaged directory in an older version of the package. salvage-from only moves files from previously-packaged directories. In the past, when we've decided we really need to move content that resides in a previously unpackaged directory, we've back-published an old version of the package, adding a dir action that causes that directory to be packaged, allowing the salvage operation to work when we publish and install the new package.

Okay, it sounds like I might need to do this, but first I have to get salvage-from to work.
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.

Duplicate filenames from the salvage-from directory that already exist in the target dir we'd like to move them to are moved to /var/pkg/lost+found with a timestamp (and an error is emitted during the install operation)
If it saves duplicate filenames in lost+found, that would be fine.

Unfortunately, even for the simple case, I'm getting everything from the
salvage-from directory saved in lost+found.

See the attached pkg manifests, salvage-test-old.p5m contains the [email protected] pkg
and salvage-test-new.p5m contains the [email protected] pkg.
I've also included the resulting raw pkg contents.

What I did, on a S11U1 build 23 system:

install [email protected] pkg containing the foo and bar directories
in the foo directory, create a 0444 file
leave the bar directory empty
install [email protected] pkg, containing only the bar directory with action salvage-from=foo result is an empty bar directory; the foo directory has been removed, but I get this message:

The following unexpected or editable files and directories were
salvaged while executing the requested package operation; they
have been moved to the displayed location in the image:

  foo -> /mnt/var/pkg/lost+found/foo-20120911T141655Z

and the file I put into foo is stored in lost+found.

The message above regarding "editable files and directories" seems to indicate that all the files/dirs we want to salvage-from cannot be writable, otherwise it gets moved to lost+found. Is that really the case? The ruby gems I plan on moving will be directories which
are writable by the owner (root).

Note that in my simple test case, I placed a read-only file into the foo directory,
but the file was still not salvaged into the bar directory.

Thanks,
April
set name=pkg.fmri [email protected]
set name=pkg.summary value="salvage-from test"
set name=info.classification \
    value="org.opensolaris.category.2008:Applications/System Utilities"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
set name=org.opensolaris.arc-caseid \
    value=PSARC/2009/XXX

dir path=bar mode=0755 owner=root group=sys
dir path=foo mode=0755 owner=root group=sys
set name=pkg.fmri [email protected]
set name=pkg.summary value="salvage-from test"
set name=info.classification \
    value="org.opensolaris.category.2008:Applications/System Utilities"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
set name=org.opensolaris.arc-caseid \
    value=PSARC/2009/XXX

dir path=bar mode=0755 owner=root group=sys salvage-from=foo
set name=pkg.fmri value=pkg://userland/[email protected],5.11:20120911T215602Z
set name=pkg.summary value="salvage-from test"
set name=info.classification 
value="org.opensolaris.category.2008:Applications/System Utilities"
set name=info.upstream-url value=http://gnu.org/software/grep/
set name=info.source-url value=http://ftp.gnu.org/gnu/grep/grep-2.10.tar.bz2
set name=org.opensolaris.consolidation value=userland
set name=org.opensolaris.arc-caseid value=PSARC/2009/XXX
set name=variant.arch value=i386
dir group=sys mode=0755 owner=root path=bar salvage-from=foo
set name=pkg.fmri value=pkg://userland/[email protected],5.11:20120911T213728Z
set name=pkg.summary value="salvage-from test"
set name=info.classification 
value="org.opensolaris.category.2008:Applications/System Utilities"
set name=info.upstream-url value=http://gnu.org/software/grep/
set name=info.source-url value=http://ftp.gnu.org/gnu/grep/grep-2.10.tar.bz2
set name=org.opensolaris.consolidation value=userland
set name=org.opensolaris.arc-caseid value=PSARC/2009/XXX
set name=variant.arch value=i386
dir group=sys mode=0755 owner=root path=bar
dir group=sys mode=0755 owner=root path=foo
_______________________________________________
userland-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/userland-discuss

Reply via email to