Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222933 - php should depend on virtual/postgresql-base, not libpq (through php*_sapi.eclass)
Summary: php should depend on virtual/postgresql-base, not libpq (through php*_sapi.ec...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-20 08:46 UTC by Pascal BERTIN
Modified: 2010-02-02 08:20 UTC (History)
7 users (show)

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


Attachments
proposed changes to php{4_4,5_1,5_2}-sapi.eclass and php-common-r1.eclass (php-eclass-postgres-base.diff,3.53 KB, patch)
2008-05-24 17:46 UTC, Christian Hoffmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal BERTIN 2008-05-20 08:46:05 UTC
now the DEPEND in php*_sapi.eclass for use postgres is dev-db/libpq,

it should be virtual/postgresql-base.

Reproducible: Always

Steps to Reproduce:
1. emerge postgresql-server (after unmerging old style postgresql)
2. emerge -NuDv world
3. 

Actual Results:  
conflict if php is installed with postgresql USE flag
Comment 1 kfm 2008-05-24 16:44:59 UTC
Just in case it isn't clear, emploing the virtual would still facilitate the usage of libpq. Also, as 7.4 is the earliest version in portage now it might as well be changed as follows:

-               postgres? ( >=dev-db/libpq-7.1 )
+               postgres? ( >=virtual/postgresql-base-7.4 )

Also, something would need to be done about line 215 in php-common-r1.eclass:

        && ! built_with_use ">=dev-db/libpq-8.1.3-r1" "threads" ; then

Does built_with_use support virtuals? If not, then I can't see any way around it other than to run a check on postgresql-base also using an || operator.
Comment 2 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-24 17:46:57 UTC
Created attachment 154167 [details, diff]
proposed changes to php{4_4,5_1,5_2}-sapi.eclass and php-common-r1.eclass

First, sorry for the long delay.
I've prepared a patch for the problem now but would like someone to review it, dev-zero? ;)
I still have a bad feeling about hardcoding dev-db/postgresql-base while not depending on it directly but rather virtual/postgresql-base, but as I don't have any better suggestions I cannot do much about it.

Any testing by php+postgresql users would also be highly appreciated. =)
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2008-05-25 09:20:52 UTC
I'd depend directly on dev-db/postgresql-base since you're depending on libpq as well and virtual/postgresql-base is a virtual for both dev-db/libpq and dev-db/postgresql-base (after dev-db/libpq is gone, we'll add pgcluster-base instead).
But the rest looks good.
Comment 4 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-25 09:28:31 UTC
Committed the attached patch after doing s:virtual/postgres:dev-db/postgres:g. Thanks =)
Comment 5 Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-05-29 12:23:26 UTC
So you require libpq >=7.1 and then ignore it if what you happen to get isn't >=8.1.3-r1 ;)
Comment 6 Christian Hoffmann (RETIRED) gentoo-dev 2008-05-29 14:47:41 UTC
You are right (thanks for the clarification on IRC as well), that's probably similar to the problem description in bug 223797.
Hopefully finally fixed.
Comment 7 Sam Iam 2008-08-22 15:09:01 UTC
I recently upgraded to postgresql-base-8.3.1 and now I see a similar problem.

My page.keywords contains:
=virtual/postgresql-base-8.3* ~amd64
=virtual/postgresql-server-8.3 ~amd64

--------
asela ~ # emerge -pv --tree php

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/php-5.2.6-r6  USE="apache2 berkdb bzip2 cli crypt gdbm iconv ipv6 ncurses nls pcre pdo postgres readline reflection session simplexml spl ssl unicode xml xmlrpc zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -exif -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd -gd-external -gmp -hash -imap -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap -sockets (-solid) -spell -sqlite -suhosin (-sybase) (-sybase-ct) -sysvipc -threads -tidy -tokenizer -truetype -wddx -xmlreader -xmlwriter -xpm -xsl -yaz -zip -zip-external" 0 kB
[ebuild  N    ]  dev-db/libpq-8.0.15  USE="nls pam readline ssl zlib -kerberos -pg-intdatetime -threads" 0 kB
[blocks B     ] dev-db/libpq (is blocking app-admin/eselect-postgresql-0.3, dev-db/postgresql-base-8.3.3)
[blocks B     ] dev-db/postgresql-base (is blocking dev-db/libpq-8.0.15)

Total: 2 packages (1 new, 1 reinstall, 2 blocks), Size of downloads: 0 kB

-----------------
asela ~ # emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r8 x86_64 Intel(R) Core(TM)2 Quad CPU @ 2.40GHz
Timestamp of tree: Mon, 18 Aug 2008 09:17:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/postgresql /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles http://adelie.polymtl.ca ttp://gentoo.mirrors.tera-byte.com http://distfiles.gentoo.org http://www.ibiblio.o rg/pub/Linux/distributions/gentoo"
LINGUAS="en"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt dri fortran gdbm gpm iconv ipv6 isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl postgres pppd python readline reflection session spl sse sse2 ssl tcpd unicode vhosts xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
------------
Comment 8 Rolf Eike Beer archtester 2010-02-02 08:20:09 UTC
If you have still problems with this: first unmerge libpq and the old postgres stuff, then merge the new postgres stuff, and than the things that depend on postgres (i.e. php).