[OmniOS-discuss] Problem updating ms-omniti local repo

Volker A. Brandt vab at bb-c.de
Thu Jun 25 07:26:26 UTC 2015


Hello Javier!


Hi Javier!


I have a quick and dirty workaround for you now.  I did this manually as a
proof of concept, but it can be scripted easily.


Step 1:

  Create a temporary directory to hold a "raw" copy of the repository
  content.  You can delete the directory after you are finished.  Then,
  create the repository as you showed in your previous mails.

  In the following example, I use /RAW for the temp directory, and /REPO for
  the repository.


Step 2:

  Get the raw repository contents (I use just the latest, and only packages
  with the "omniti/" prefix in their name):

  # /usr/bin/pkgrecv -m latest -s http://pkg.omniti.com/omniti-ms/ -d /RAW --raw 'pkg://ms.omniti.com/omniti/*'

  This will give you a directory tree with file objects and metadata.  Here is
  the directory for pkg://ms.omniti.com/omniti/viewer/xpdf as an example:

  # cd /RAW ; ls -golFR omniti%2Fviewer%2Fxpdf/3.4%2C5.11-0.151006%3A20141016T190442Z
  omniti%2Fviewer%2Fxpdf/3.4%2C5.11-0.151006%3A20141016T190442Z:
  total 20369
  -rw-r--r--   1    9348 Jun 25 08:45 09c7c05f1c49e6bc2aeea6355ca6e45243cfe21c
  -rw-r--r--   1 1882480 Jun 25 08:45 0c966a51f4d9c3e2e3afb984cda715891f1414ac
  [...]
  -rw-r--r--   1 1768656 Jun 25 08:45 fd77184cdab518416fe71a920575a36d363c65f8
  -rw-r--r--   1    7486 Jun 25 08:44 manifest
  -rw-r--r--   1     433 Jun 25 08:44 manifest.depend
  -rw-r--r--   1     514 Jun 25 08:44 manifest.dir
  -rw-r--r--   1     248 Jun 25 08:44 manifest.dircache
  -rw-r--r--   1    6212 Jun 25 08:44 manifest.file
  -rw-r--r--   1       0 Jun 25 08:44 manifest.mediatorcache
  -rw-r--r--   1     446 Jun 25 08:44 manifest.set


Step 3:

  Create the missing subdirectories in the repository.  When you are finished,
  it should look like this:

  # cd /REPO/publisher/ms.omniti.com ; ls -golF
  total 366
  drwxr-xr-x   2       6 Jun 25 08:38 catalog/
  drwxr-xr-x 258     258 Jun 25 08:25 file/
  drwxr-xr-x   2      38 Jun 25 08:40 index/
  drwxr-xr-x 807     807 Jun 25 08:34 pkg/
  -rw-r--r--   1     171 Jun 25 08:24 pub.p5i
  drwxr-xr-x   2       3 Jun 25 08:38 tmp/


Step 4:

  Create the hash directories in the "file" directory:

  # cd file
  # mkdir 00 01 ... fe ff

  Look at an existing repository with data in it to see what it should look
  like.


Step 5:

  Move the file objects from /RAW to /REPO into the correct "file/XX" directory:

  For example (really one line for each file):

  # mv /RAW/omniti%2Fviewer%2Fxpdf/3.4%2C5.11-0.151006%3A20141016T190442Z/09c7c05f1c49e6bc2aeea6355ca6e45243cfe21c \
    /REPO/publisher/ms.omniti.com/file/09/

  # mv /RAW/omniti%2Fviewer%2Fxpdf/3.4%2C5.11-0.151006%3A20141016T190442Z/0c966a51f4d9c3e2e3afb984cda715891f1414ac \
    /REPO/publisher/ms.omniti.com/file/0c/

  Do this for all file objects in all package subdirectories.  I love shell
  loops. :-)


Step 6:

  Copy the manifest of each package into a subdirectory under "pkg" with the
  package version as the file name:

  # mkdir /REPO/publisher/ms.omniti.com/pkg/omniti%2Fviewer%2Fxpdf
  # mv /RAW/omniti%2Fviewer%2Fxpdf/3.4%2C5.11-0.151006%3A20141016T190442Z/manifest \
    omniti%2Fviewer%2Fxpdf/3.4%2C5.11-0.151006%3A20141016T190442Z

  Do this for all manifests in all package subdirectories.  Ignore the other
  "manifest.*" files in the package subdirectory.


Step 7:

  Rebuild the repository catalog, index, etc.:

  # pkgrepo rebuild -s /REPO



You can now use /REPO as an origin for the ms.omniti.com publisher.


Regards -- Volker
-- 
------------------------------------------------------------------------
Volker A. Brandt               Consulting and Support for Oracle Solaris
Brandt & Brandt Computer GmbH                   WWW: http://www.bb-c.de/
Am Wiesenpfad 6, 53340 Meckenheim, GERMANY            Email: vab at bb-c.de
Handelsregister: Amtsgericht Bonn, HRB 10513              Schuhgröße: 46
Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt

"When logic and proportion have fallen sloppy dead"


More information about the OmniOS-discuss mailing list