First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 158227
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Alin Năstac <mrness@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: arno@disconnect.de
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
dspam-3.6.8-r1.ebuild ebuild lets the user choose the backend in pkg_config text/plain arno@disconnect.de 2006-12-17 06:37 0000 16.27 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 158227 depends on: Show dependency tree
Show dependency graph
Bug 158227 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-15 08:54 0000
# emerge --info
Portage 2.1.1-r1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r4, 2.6.17.13
i686)
=================================================================
System uname: 2.6.17.13 i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.6
Last Sync: Fri, 15 Dec 2006 04:20:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/X11/xkb /usr/lib/fax /var/bind
/var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/"
LINGUAS="de en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://193.190.198.20/gentoo-portage"
USE="x86 acl alsa apache2 apm arts berkdb bitmap-fonts cli cracklib crypt cups
dlloader dri eds elibc_glibc emboss encode esd foomaticdb fortran gdbm gif gpm
gstreamer gtk2 iconv imlib input_devices_evdev input_devices_keyboard
input_devices_mouse ipv6 isdnlog jpeg kernel_linux ldap libg++ libwww
linguas_de linguas_en mad mikmod mmx motif mp3 mpeg mysql ncurses nls nptl
nptlonly ogg opengl oss pam pcre perl png postgres pppd python qt3 qt4
quicktime readline reflection sdl session spell spl ssl tcpd truetype
truetype-fonts type1-fonts udev userland_GNU vhost video_cards_apm
video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus
video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint
video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt
video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv
video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage
video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx
video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l
video_cards_vesa video_cards_vga video_cards_via video_cards_vmware
video_cards_voodoo vorbis xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

As you can see, both the mysql and the postgres use-flags are set (I need the
mysql-database on that specific server, but postgres-support for
 other apps, like eg. ipac-ng, if you wonder why I do this). With this
configuration, the ebuild will try to create a mysql-db AND a postgres-db for
dspam, w/o asking which one to use. Furthermore, the dspam.cron-script won't
work correctly because in line 18 /etc/mail/dspam/*.data is expanded to two
files by the shell, resulting in an error (from bash -x dspam.cron):
...
+ '[' -f /etc/mail/dspam/mysql.data /etc/mail/dspam/pgsql.data ']'
dspam.cron: line 18: [: /etc/mail/dspam/mysql.data: binary operator expected

Possible solutions:
1. Cancel ebuild if more than one database use-flag is set, and maybe instruct
the user how to set the use-flags right in package.use
2. Ask the use in pkg_config which database to use

------- Comment #1 From Alin Năstac 2006-12-15 23:35:25 0000 -------
(In reply to comment #0)
> Possible solutions:
> 1. Cancel ebuild if more than one database use-flag is set, and maybe instruct
> the user how to set the use-flags right in package.use

Obviously NO. Being able to switch between backends is an important feature of
dspam.

> 2. Ask the use in pkg_config which database to use

Sure, why not? Care to attach a patch?

------- Comment #2 From arno@disconnect.de 2006-12-17 06:37:11 0000 -------
Created an attachment (id=104207) [edit]
ebuild lets the user choose the backend in pkg_config

------- Comment #3 From arno@disconnect.de 2006-12-17 06:44:33 0000 -------
(From update of attachment 104207 [edit])
It's not perfect, but it should do the job. I don't really know how to handle
the unused *.data files in /etc/mail/dspam. The filename must be changed to
something other than *.data, because otherwise the dspam.cron-script won't
work. For now, they are renamed to *.data.not.in.use, but maybe it's a better
idea to delete them.

------- Comment #4 From Alin Năstac 2006-12-19 01:55:55 0000 -------
I've fixed in -r1 using a more robust approach:
 - now cron script is able to work even if you have multiple *.data files
 - pkg_config asks you what backend you want to configure and it does only
that. Unless your variant, it doesn't accept selection of uninstalled backends.

First Last Prev Next    No search results available      Search page      Enter new bug