[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] Odd package format
- Subject: Re: [cobalt-developers] Odd package format
- From: Michael Stauber <devel@xxxxxxxxxxxxxx>
- Date: Sun Nov 17 09:33:02 2002
- Organization: SOLARSPEED.NET
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Hi Gavin,
> Is it me on a Sunday or has something odd been done to the Qube system
> pkg's normally you can open them up with tar xvfz [name of package]
> now when I try it tells me its not a gzip archive, but its not a tar
> archive either.
>
> Is it me or has anyone else found the same and found the answer - when I do
> the same command to open say a pkgmaster pkg no problem and in the same
> sense no problem when I create a pkg with tar cvfz packagename.pkg *. The
> really odd thing is the pkg will install as normal so it doesn't appear to
> be corrupted.
I've run into the same issue a couple of times with Qube3 and XTR PKG files -
all from Sun Cobalt themselves.
I'm not sure how or why they do it that way, but there are still ways to take
the PKG apart for analysis, although you have to take a little roundtrip
through some Sausalito innards:
Find the file /usr/sausalito/sbin/pkg_prepare.pl and make a copy of it. Lets
say we name the copy pkg_extractor.pl and we store it in /usr/sausalito/sbin/
Open that new file in an editor. At the botton you find the following code:
------------------------------------------------------------------------------
unlink($opt_f);
if ($packageOID && $opt_R) {
$ret = system("/usr/sausalito/sbin/pkg_install.pl $packageOID -R")
} elsif ($packageOID) {
$ret = system("/usr/sausalito/sbin/pkg_install.pl $packageOID")
}
exit $ret;
------------------------------------------------------------------------------
Delete all the above listed lines except for the last line of it:
------------------------------------------------------------------------------
exit $ret;
------------------------------------------------------------------------------
Make the file pkg_extractor.pl executable and then run it this way:
cd /usr/sausalito/sbin/
./pkg_extractor.pl -i -f <Path to PKG>
It will unpack the PKG file to /home/tmp/.swupdate/pkgunpack.<NUMBER>
<NUMBER> will be an automatically assigned number, so check the dates of the
present folders in there to see which one is newer - if you find more than
one directory in there.
That should do the trick.
--
With best regards,
Michael Stauber
mstauber@xxxxxxxxxxxxxx
Unix/Linux Support Engineer