dead symlink removal and pkg_postinst no longer blindly creates a new database if...
authorBruce A. Locke <blocke@gentoo.org>
Sat, 12 Oct 2002 09:31:49 +0000 (09:31 +0000)
committerBruce A. Locke <blocke@gentoo.org>
Sat, 12 Oct 2002 09:31:49 +0000 (09:31 +0000)
app-arch/rpm/ChangeLog
app-arch/rpm/files/digest-rpm-4.0.4-r4 [moved from app-arch/rpm/files/digest-rpm-4.0.4-r2 with 100% similarity]
app-arch/rpm/rpm-4.0.4-r4.ebuild [moved from app-arch/rpm/rpm-4.0.4-r2.ebuild with 57% similarity]

index 20f09382b8280cf841f78e4d2980d5f41efe677e..daa321291cebc4764c1985cd5f6ddeed893ef99b 100644 (file)
@@ -1,16 +1,22 @@
 # ChangeLog for app-arch/rpm
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/ChangeLog,v 1.8 2002/09/16 00:42:32 murphy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/ChangeLog,v 1.9 2002/10/12 09:31:49 blocke Exp $
 
-*rpm-4.0.4-r3 (23 Jul 2002)
+*rpm-4.0.4-r4 (12 Oct 2002)
+
+  12 Oct 2002; Bruce A. Locke <blocke@shivan.org> rpm-4.0.4-r4.ebuild:
+  Remove dead symlink (bug #8578) and ebuild no longer blindly creates
+  a database if one already exists.
 
-  14 Sep 2002; Maarten Thibaut <murphy@gentoo.org> ChangeLog rpm-4.0.4-r3.ebuild: This
-  package can not compile on sparc64 without a --host option to configure, so I added
-  that flag. Revamped ChangeLog layout according to new guidelines.
+*rpm-4.0.4-r3 (23 Jul 2002)
 
-  07 Sep 2002; Seemant Kulleen <seemant@gentoo.org> rpm-4.0.4-r3.ebuild: This package
-  can not compile with autoconf-2.53a, so autoconf-2.1 is forced.  Thanks to:
-  garion@garion.mnbsyr.com (John Sutherland) in bug #7595
+  14 Sep 2002; Maarten Thibaut <murphy@gentoo.org> ChangeLog rpm-4.0.4-r3.ebuild: 
+  This package can not compile on sparc64 without a --host option to configure,
+  so I added that flag. Revamped ChangeLog layout according to new guidelines.
+  
+  07 Sep 2002; Seemant Kulleen <seemant@gentoo.org> rpm-4.0.4-r3.ebuild: 
+  This package can not compile with autoconf-2.53a, so autoconf-2.1 is forced. 
+  Thanks to:  garion@garion.mnbsyr.com (John Sutherland) in bug #7595
 
   23 Jul 2002; Seemant Kulleen <seemant@gentoo.org> rpm-4.0.4-r3.ebuild: In keeping
   with RH tradition, this package requires bloat.  As such, gettext is not optional,
similarity index 57%
rename from app-arch/rpm/rpm-4.0.4-r2.ebuild
rename to app-arch/rpm/rpm-4.0.4-r4.ebuild
index 88a9fbdee686b7482a2b29dee8aac9e79504fcbe..04672181b7c5153edc7130aabcae0466bb1ea346 100644 (file)
@@ -1,8 +1,6 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.0.4-r2.ebuild,v 1.12 2002/10/05 05:39:05 drobbins Exp $
-
-IUSE="nls"
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.0.4-r4.ebuild,v 1.1 2002/10/12 09:31:49 blocke Exp $
 
 # note to self: check for java deps
 
@@ -13,17 +11,20 @@ HOMEPAGE="http://www.rpm.org/"
 
 SLOT="0"
 LICENSE="GPL-2 LGPL-2"
-KEYWORDS="x86 ppc sparc sparc64"
+KEYWORDS="x86 ppc sparc sparc64 alpha"
 
 RDEPEND="=sys-libs/db-3.2*
        >=sys-libs/zlib-1.1.3
        >=sys-apps/bzip2-1.0.1
        >=dev-libs/popt-1.6.3"
 
-DEPEND="$RDEPEND nls? ( sys-devel/gettext )"
+DEPEND="${RDEPEND}
+       sys-devel/gettext"
 
 src_unpack() {
 
+       export WANT_AUTOCONF_2_1=1
+
        unpack ${A}
        cd ${S}
        patch -p1 < ${FILESDIR}/${P}-system-popt.diff || die
@@ -31,13 +32,14 @@ src_unpack() {
        # Suppress pointer warnings
        cp configure configure.orig
        sed -e "s:-Wpointer-arith::" configure.orig > configure
-
 }
 
 src_compile() {
 
        local myconf
        use nls || myconf="--disable-nls"
+       use sparc64 && myconf="$myconf --host=${CHOST}"
+
        econf ${myconf} || die
        make || die
 }
@@ -48,11 +50,22 @@ src_install() {
        mv ${D}/bin/rpm ${D}/usr/bin
        rm -rf ${D}/bin
 
+       # Fix for bug #8578 (app-arch/rpm create dead symlink)
+       # Local RH 7.3 install has no such symlink anywhere
+       rm -f ${D}/usr/lib/rpmpopt
+
+    keepdir /var/lib/rpm
+
        dodoc CHANGES COPYING CREDITS GROUPS README* RPM* TODO
 }
 
 pkg_postinst() {
 
-       ${ROOT}/usr/bin/rpm --initdb --root=${ROOT}
-
+       if [ -f ${ROOT}/var/lib/rpm/nameindex.rpm ]; then
+               einfo "RPM database found... Rebuilding database (may take a while)..."
+               ${ROOT}/usr/bin/rpm --rebuilddb --root=${ROOT}
+       else
+               einfo "No RPM database found... Creating database..."
+               ${ROOT}/usr/bin/rpm --initdb --root=${ROOT}
+       fi
 }