On Thu, Sep 18, 2003, Ralf S. Engelschall wrote:

>   OpenPKG CVS Repository
>   http://cvs.openpkg.org/
>   ____________________________________________________________________________
>
>   Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
>   Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
>   Module: openpkg-src openpkg-web          Date:   18-Sep-2003 13:45:09
>   Branch: HEAD                             Handle: 2003091812450404
>
>   Added files:
>     openpkg-src/openpkg     rpmdb
>   Modified files:
>     openpkg-src/openpkg     HISTORY openpkg.boot openpkg.spec rpm.patch.bugfix
>                             rpm.patch.feature rpm.patch.porting
>                             rpm.patch.regen rpmpopt
>     openpkg-web             news.txt
>
>   Log:
>     Completely revamp the RPM database fiddling:
>
>     1. Introduce new <prefix>/lib/openpkg/rpmdb utility for administrating
>        the RPM database on the lower level and hook it into the
>        <prefix>/bin/rpm command line with four options:
>
>        --db-build     RPM database administration: build new
>                       database (destructive operation; you have
>                       to know what you are doing)
>
>        --db-rebuild   RPM database administration: rebuild new
>                       from old database (upgrading operation;
>                       reasonable after upgrades or on DB
>                       corruption)
>
>        --db-cleanup   RPM database administration: cleanup
>                       existing database (cleaning operation;
>                       reasonable after DB out-of-sync situations)
>
>        --db-fixate    RPM database administration: fixate
>                       existing database (harmless operation; for
>                       fixating files only)
>
>     2. Use rpmdb from within openpkg.boot to create initial database the
>        correct way and to query the list of filenames of all database files.
>
>     3. Use rpmdb from within openpkg.spec:%post to fixate the
>        database on upgrades only (no more rebuilding) but drop note to RPM
>        4.0 to 4.2 upgraders about "rpm --db-rebuild" and "rpm --db-cleanup".
>
>     4. Patch RPM's embedded Berkeley-DB to accept zero-size DB region files.
>        Because permissions and ownership on Berkeley-DB region files
>        __db.XXX have to be already fixed in advance and those files cannot
>        be created in advance on the command line with some reasonable
>        default (as it is the case for the other files which are created
>        with [rpm]db_load), we have to force Berkeley-DB to accept those
>        zero-sized files and (on DB_CREATE) create/overwrite them (instead of
>        thinking another process is currently creating them).
>
>        This especially workarounds the "Resource temporarily unavailable"
>        problems we've seen on some platforms, which were mainly caused by
>        the pre-existing DB region files.
>
>     5. Patch RPM so it passes flag DB_CREATE to Berkeley-DB also if DB
>        region file __db.001 exists, but is (still) zero-size.
>
>     With those changes all together we are now able to perform lower-level
>     administration of the RPM database, have moved all RPM database fiddling
>     into a single script (rpmdb), this way removed all redundancy related to
>     this database fiddling, and should workround the "Resource temporarily
>     unavailable" problems we experienced.
>
>     OpenPKG-CURRENT drivers are strongly advised to immediately upgrade to
>     this "openpkg-20030918-20030918" release of the bootstrap package and
>     especially perform an "rpm --db-rebuild" once after the installation.
>
>     If you have already trouble ("Resource temporarily unavailable" or
>     other hangs) in upgrading the previous "openpkg" package to this latest
>     version, you can workaround it with the following more upgrade procedure
>     (note the "private" on the __dbi_cdb macro definition):
>
>     $ <prefix>/bin/rpm --rebuild openpkg-20030918-20030918.src.rpm
>     $ rm <prefix>/RPM/DB/__db.*
>     $ <prefix>/bin/rpm -Uvh \
>       --define '__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb private' \
>       <prefix>/RPM/PKG/openpkg-20030918-20030918.*.rpm
>     $ <prefix>/bin/rpm --db-rebuild

Those of you who experiences "Resource temporarily unavailable"
problems, please perform the upgrade procedure above and give feedback
whether it solved your problems. If not, first make sure no other still
hanging around "rpm" processes exists and then try to figure out what is
happening by applying "truss" (FreeBSD, Solaris) or "strace" (Linux) to
your "rpm -Uvh" command and send me your output.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to