Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133103 - phpmyadmin-2.8.0.3 with php built with USE="-session -mysql" dies twice
Summary: phpmyadmin-2.8.0.3 with php built with USE="-session -mysql" dies twice
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-12 04:12 UTC by Petteri Räty (RETIRED)
Modified: 2006-05-13 09:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2006-05-12 04:12:03 UTC
pkg_setup() {
        webapp_pkg_setup
        require_php_with_use pcre session
        # see bug #124954
        if ! built_with_use -o =${PHP_PKG} mysql mysqli ; then
                eerror "${PHP_PKG} needs to be re-installed with one of the following"
                eerror "USE flags enabled:"
                eerror
                eerror "mysql or mysqli if using dev-lang/php-5"
                eerror "mysql if using dev-lang/php-4"
                die "Re-install ${PHP_PKG}"
        fi
}

So it first instructed me to rebuild php with session and pcre support and after I did that it instructed me to turn on the mysql use flag. It would be better that it would inform me once about every needed use flag.. 

Portage 2203-svn (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.5-r2, 2.6.14-hardened-r3 i686)
=================================================================
System uname: 2.6.14-hardened-r3 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.6.14
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0-r1
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/init.d /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/src/distfiles"
FEATURES="autoconfig collision-protect distlocks sandbox sfperms strict"
GENTOO_MIRRORS=" http://trumpetti.atm.tut.fi/gentoo http://lame.lut.fi/linux/gentoo "
LC_ALL="en_US.UTF-8"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/foobar"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex acl acpi apache2 bash-completion berkdb bzip2 bzlib cdr crypt cups curl dlloader expat foomaticdb gd gdbm gmp gpm hardened jpeg lua makecheck mmx ncurses nls nptl ogg pam pcre php pic png ppds readline recode ruby samba sse ssl tcpd tiff udev unicode usb userlocales vhosts vorbis x86 xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-05-12 06:57:34 UTC
Well, so what you are requesting here? eutils.eclass can't do both built_with_use -o and -a checks at the same time and die just once either, so can't depend.php eclass. We've already reinvented the built_with_use wheel in phpconfutils.eclass and implemented a nasty hack for those who complained that "php breaks non-interactivity". Bug 2272 is the way to go, enough of hacks... Also, how many ebuilds in the whole tree are affected by this "problem"?
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-05-12 07:01:39 UTC
While at it, please add unicode to the use flags check, it's needed for mbstring which is sort of required by phpmyadmin.

<snip>
The mbstring PHP extension was not found and you seem to be using multibyte charset. Without mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
</snip>
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2006-05-12 07:09:04 UTC
(In reply to comment #1)
> Well, so what you are requesting here?

Just to adjust the die messages or checks so that I will be informed about all the needs already with the first die and as such don't have to rebuild php twice.
Comment 4 Luca Longinotti (RETIRED) gentoo-dev 2006-05-12 08:02:59 UTC
pkg_setup() {
        webapp_pkg_setup
        require_php_with_use pcre session unicode
        require_php_with_any_use mysql mysqli
}

Would be actually the way to go, as built_with_use is no more guaranteed to return always correct results with dev-lang/php. But the problem of the double die would reimain... I'll work on this today and comment here as soon as I commit the updated eclasses, basically I'll change the require_php_with_* functions to check for a DONTDIE var, if it's set, the checks instead of dieing and outputting their message, will simply return false, so you can use them in if/else checks and output your custom error message, that can tell the user what to do, even if the checks are two (needed USE and "any" USE in this case).
Best regards, CHTEKK.
Comment 5 Luca Longinotti (RETIRED) gentoo-dev 2006-05-13 08:48:03 UTC
pkg_setup() {
    webapp_pkg_setup

    if PHPCHECKNODIE="yes" require_php_with_use pcre session unicode \
    || PHPCHECKNODIE="yes" require_php_with_any_use mysql mysqli ; then
        eerror
        eerror "${PHP_PKG} needs to be re-installed with all of the following"
        eerror "USE flags enabled:"
        eerror
        eerror "pcre session unicode"
        eerror
        eerror "as well as any of the following USE flags enabled:"
        eerror 
        eerror "mysql or mysqli if using dev-lang/php-5"
        eerror "mysql if using dev-lang/php-4"
        eerror
        die "Re-install ${PHP_PKG}"
    fi
}

This should do it, the PHPCHECKNODIE var set to "yes" (or anything else than NULL) lets the checks not die, but simply return true or false, that way they can be used in the if/else checks, and the custom error message outputted (updated accordingly).
Best regards, CHTEKK.
Comment 6 Renat Lumpau (RETIRED) gentoo-dev 2006-05-13 09:04:29 UTC
Fixed in 2.8.0.4, thanks