"Ralf S. Engelschall" <[EMAIL PROTECTED]> writes: > On Thu, Sep 22, 2005, Simon J Mudd wrote: > > > When doing a fresh install of openpkg from current I notice the following > > > > installing openpkg binary openpkg-20050920-20050920.powerpc-aix5.1-ope.sh > > OpenPKG CURRENT Binary Bootstrap Package, version 20050920 > > Built for prefix /openpkg on target platform powerpc-aix5.1 > > ++ hooking OpenPKG instance into system environment > > openpkg-20050920-20050920.powerpc-aix5.1-ope.sh[823]: /openpkg/bin/rpm: not > > found. > > ++ fixating OpenPKG instance root directory "/openpkg" > > ++ extracting OpenPKG binary distribution > > ++ installing OpenPKG binary distribution > > ++ fixating OpenPKG instance filesystem hierarchy > > ++ post-processing OpenPKG bootstrap installation > > +-----------------------------------------------------------------------------+ > > | Congratulations! > > | > > [snip] > > > > /openpkg/bin/rpm was not on the system before as it was a clean install. > > > > This section in the openpkg...ope.sh script appears to be what is failing > > > > # remember what OpenPKG RPM version was installed, so we can > > # correctly upgrade the RPM database in the %post section (see below). > > if [ -d ${prefix}/RPM/DB ]; then > > if [ -x "${prefix}/bin/openpkg" -a -x > > "${prefix}/libexec/openpkg/rpm" ]; then > > # OpenPKG 2.0 > > rpm="${prefix}/bin/openpkg rpm" > > else > > # OpenPKG 1.x > > rpm="${prefix}/bin/rpm" > > fi > > rm -f ${prefix}/RPM/DB/.version >/dev/null 2>&1 || true > > $rpm --version |\ > > sed -e 's;^;X;' \ > > -e > > > > 's;^X[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$;\1;' \ > > -e 's;^X[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*$;\1;' \ > > -e 's;^X.*$;4.0;' \ > > >${prefix}/RPM/DB/.version > > fi > > > > (the $rpm --version line above) > > > > No harm seems to be done, but thought it wise to report this. > > Well, seems like your "fresh" installation wasn't fresh enough. Seems > like you at least still had the <prefix>/RPM/DB directory staying around > which allowed this code execute (see the first "if" clause). In a fresh > installation this should not be the case.
Just to follow up you are right. If the openpkg directory (/openpkg in my case) is empty then no message is given. It seems however that the problem is with the previous uninstall which does not clear up the tree properly. See below for example of installing and immediately uninstalling openpkg from CURRENT. [EMAIL PROTECTED]:/data/buildscripts/build>ls /openpkg .profile [EMAIL PROTECTED]:/data/buildscripts/build>cat /openpkg/.profile PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:. export PATH if [ -s "$MAIL" ] # This is at Shell startup. In normal then echo "$MAILMSG" # operation, the Shell checks fi # periodically. [EMAIL PROTECTED]:/data/buildscripts/build>sh openpkg-20050923-20050923.powerpc-aix5.1-ope.sh OpenPKG CURRENT Binary Bootstrap Package, version 20050923 Built for prefix /openpkg on target platform powerpc-aix5.1 ++ hooking OpenPKG instance into system environment ++ fixating OpenPKG instance root directory "/openpkg" ++ extracting OpenPKG binary distribution ++ installing OpenPKG binary distribution ++ fixating OpenPKG instance filesystem hierarchy ++ post-processing OpenPKG bootstrap installation +-----------------------------------------------------------------------------+ | Congratulations! | | | | You have successfully installed an OpenPKG CURRENT instance | | under prefix /openpkg on target platform powerpc-aix5.1. | | | | For details about this OpenPKG instance, run any of the | | following typical OpenPKG RPM query commands: | | | | $ /openpkg/bin/openpkg rpm -qa | | $ /openpkg/bin/openpkg rpm -qi openpkg | $ /openpkg/bin/openpkg rpm -qlv openpkg | | | | To check the integrity of the entire OpenPKG instance, | | run the following OpenPKG RPM verify command: | | | | $ /openpkg/bin/openpkg rpm -Va | | | | To install software packages into this OpenPKG instance, run | | the following two OpenPKG RPM build commands for each package: | | | | $ /openpkg/bin/openpkg rpm --rebuild /path/to/foo-*.src.rpm | | $ /openpkg/bin/openpkg rpm -Uvh /openpkg/RPM/PKG/foo-*.rpm | | | | To remove a software package later, just run: | | | | $ /openpkg/bin/openpkg rpm -e foo | | | | To remove the whole OpenPKG instance under prefix /openpkg, | | just remove every package as shown above. As you finally | | remove the package "openpkg", the OpenPKG instance itself | | will be unlinked from the system and removed as well. | | | | Thank you for flying OpenPKG... | | Ralf S. Engelschall | | The OpenPKG Project | | [EMAIL PROTECTED] | +-----------------------------------------------------------------------------+ [EMAIL PROTECTED]:/data/buildscripts/build>/openpkg/bin/openpkg rpm -e openpkg error: failed to open /etc/mtab: No such file or directory openpkg:WARNING: skipping deletion of OpenPKG super-user user root openpkg:WARNING: (would remove system standard user) openpkg:WARNING: skipping deletion of OpenPKG super-user group system openpkg:WARNING: (would remove system standard group) rpmdb: /openpkg/RPM/DB/Requirename: No such file or directory error: cannot open Requirename index using db3 - No such file or directory (2) [EMAIL PROTECTED]:/data/buildscripts/build>ls /openpkg .profile RPM [EMAIL PROTECTED]:/data/buildscripts/build>ls /openpkg/RPM DB [EMAIL PROTECTED]:/data/buildscripts/build>ls /openpkg/RPM/DB Dirnames Installtid Provideversion Sha1header Filemd5s Providename Requireversion Sigmd5 The /etc/mtab is "expected" on AIX 5.1, but what is not is the rpm error message when uninstalling the package. As can be seen /openpkg/RPM/DB/ still has several files left in the directory and I assume that these should have been removed. Reinstalling without clearing up lead to the error I reported in my previous post. This is not serious but probably worth tidying up. I'll try the same thing with the 2.4.2 package to see if the behaviour is identical. Regards, Simon ______________________________________________________________________ The OpenPKG Project www.openpkg.org User Communication List openpkg-users@openpkg.org