Bug 137886 - <=app-emulation/xen-tools-3.0.2-r2 doesn't get_domname reliably enough
Bug#: 137886 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: aross@gentoo.org Reported By: mike@gaima.co.uk
Component: Ebuilds
URL: 
Summary: <=app-emulation/xen-tools-3.0.2-r2 doesn't get_domname reliably enough
Keywords:  Bug
Status Whiteboard: 
Opened: 2006-06-24 15:15 0000
Description:   Opened: 2006-06-24 15:15 0000
Reliably probably isn't the right word.
Many of the docs I've read put semi-colons at the end of each line in the vm
config, so that's what I've done on my test system.
get_domname() doesn't strip that semi-colon off, so making the is_running()
check fail whether the vm is actually running or not.
Changing the sed call to:
sed -ne 's/^[ \t]*name[ \t]*=[ \t]*"\([^"]*\)"[;]*/\1/p' $1
(adding a [;] after the last " and before the last *)
makes it work either way of defining config variables.

------- Comment #1 From Andrew Ross (RETIRED) 2006-08-13 00:35:41 0000 -------
Thanks for your report and proposed fix.

get_domname() has been rewritten for xen-tools-3.0.2-r3 , which should hit the
tree in the next few days (at which point this bug will be resolved).

------- Comment #2 From Andrew Ross (RETIRED) 2006-08-14 00:20:05 0000 -------
Fixed xen-tools-3.0.2-r3.

------- Comment #3 From Mike Williams 2006-12-15 04:06:27 0000 -------
Andrew, while your re-write fixed the problem this bug was originally about,
you've unfortunately introduced a new one.
[[:alpha:]_] should be [[:alnum:]_], or you could use \w.
Numbers are legal in VM names.

------- Comment #4 From Andrew Ross (RETIRED) 2006-12-15 20:31:53 0000 -------
Mike, according to bug #148628 the alpha->alnum fix was included in -r4

Please check to make sure you're using xen-tools-3.0.2-r4, and let me know so I
can properly close this bug.

------- Comment #5 From Mike Williams 2006-12-16 03:38:56 0000 -------
(In reply to comment #4)
> Mike, according to bug #148628 the alpha->alnum fix was included in -r4
> 
> Please check to make sure you're using xen-tools-3.0.2-r4, and let me know so I
> can properly close this bug.

Ahh, yes, sorry. I'm testing 3.0.3, and as it fails to install the init scripts
I took the first one I saw in ${FILESDIR} which is different than
${FILESDIR}/3.0.2-r4.

------- Comment #6 From Andrew Ross (RETIRED) 2007-03-04 08:06:30 0000 -------
Reopening so I can mark as fixed - stupid bugzilla :-)

------- Comment #7 From Andrew Ross (RETIRED) 2007-03-04 08:07:12 0000 -------
Fixed in xen-tools-3.0.2-r4.