Summary: | sys-apps/portage: filenames containing a \n causes corrupt CONTENTS files | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jimmy.Jazz |
Component: | New packages | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ferringb |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 216231 |
Description
Jimmy.Jazz
2008-04-04 14:22:16 UTC
The pkg_config block of mysql does NOT edit CONTENTS in any way. Either it was corrupt after the initial emerge, or something else on your system broke it. Attach the CONTENTS file here, in it's present state, as well as after 'emerge --unmerge mysql && emerge mysql'. Additionally, the pkg_config block (via mysql_init_vars) should look at the [mysqld] section of your config, which does exist right? (I'm aware of a lot of other stuff that will break otherwise). The CONTENTS file is never edited by portage, nor any tool that I know of. Please post emerge --info. (In reply to comment #1) > The pkg_config block of mysql does NOT edit CONTENTS in any way. If I understand well how portage works, CONTENTS is used to properly uninstall the package during the unmerge process. so it is necessarily generated during the emerge install process ... and corrupted during that time. > Additionally, the pkg_config block (via mysql_init_vars) should look at the > [mysqld] section of your config, which does exist right? (I'm aware of a lot of > other stuff that will break otherwise). > In fact, not necessary. You won't have any [mysqld] but [mysqld1], [mysqld2], etc. like instances, otherwise msqlmanager will be lost. please warn when you modify the script. (after an daily scheduled emerge --sync) # diff -ruN /var/tmp/mysql.eclass /usr/portage/eclass/mysql.eclass --- /var/tmp/mysql.eclass 2008-04-05 12:10:20.000000000 +0200 +++ /usr/portage/eclass/mysql.eclass 2008-04-05 03:05:52.000000000 +0200 @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.88 2008/03/10 02:47:20 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.89 2008/04/05 00:43:26 robbat2 Exp $ # Author: Francesco Riosa (Retired) <vivo@gentoo.org> # Maintainer: MySQL Team <mysql-bugs@gentoo.org> @@ -226,7 +226,8 @@ | tail -n1` if [[ -z "${MY_DATADIR}" ]] ; then MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//'` + | sed -e 's/.*=\s*//' \ + | tail -n1` fi fi if [[ -z "${MY_DATADIR}" ]] ; then Indeed, tail corrects the issue but that is not really elegant. Actually, it would be great if mysqld eclass takes account of all mysqld instances and not just the last one ;) Thx for the fast reply It's extremely difficult to find them all, because there are no constraints on what they are named at all. I know some folks that don't even have 'mysqld' as a substring of the name. zmedico, as a test, if you make a filename with \n in it, does Portage handle the generation of CONTENTS correctly? Newlines in filenames aren't currently handled. It seem like we could escape them without hurting anything. It shouldn't cause any compatibility issues since the current behavior is severely broken in that case anyway. (In reply to comment #4) > It's extremely difficult to find them all, because there are no constraints on > what they are named at all. I agree with you but they didn't need to have a /n or /r in their names to reproduce the issue. Just create two [mysqld1] and [mysqld2] in my.cf. I know some folks that don't even have 'mysqld' as > a substring of the name. Yes, but in that case emerge config won't recognize any instances at all .The CONTENTS file as well the database directory name won't be corrupt then. mysql.eclass has the tail fix already, just portage left on this bug. removing mysql-bugs. In svn r11918, it's fixed to bail out if the package tries to install any file paths containing newlines. This is fixed in 2.2_rc15. |