#314 Issue closed: Log 'ERROR: BUG BUG BUG! Function get_version could not detect parted version

Labels: support / question

sirtow opened issue at 2013-10-16 19:05:

Hi, i'm just starting with rear .cloned from git and run usr/sbin/rear -vD mkrescue
As result i got the following :

++ FEATURE_PARTED_OLDNAMING=
+++ get_version parted -v
+++ parted -v
+++ sed -rn 's/^[^0-9\.]*([0-9]+\.[-0-9a-z\.]+).*$/\1/p'
+++ head -1
++ parted_version=
++ [[ -n '' ]]
++ BugIfError 'Function get_version could not detect parted version.'
++ ((  1 != 0  ))
++ BugError 'Function get_version could not detect parted version.'
++ '[' Function get_version could not detect parted version. -eq Function get_version could not detect parted version. ']'
++ EXIT_CODE=1
++ Error 'BUG BUG BUG! ' 'Function get_version could not detect parted version.' '
=== Issue report ===
Please report this unexpected issue at: https://github.com/rear/rear/issues
Also include the relevant bits from /opt/rear/var/log/rear/rear-pluto.log

I have parted :

rear # parted -v
parted (GNU parted) 1.9.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://parted.alioth.debian.org/cgi-bin/trac.cgi/browser/AUTHORS>.

seems that current regexp

parted -v | sed -rn 's/^[^0-9\.]*([0-9]+\.[-0-9a-z\.]+).*$/\1/p'

cannot extract my parted version. Greatly appreciate your advice.

gdha commented at 2013-10-17 14:10:

Just tried it out:

$ cat /tmp/xx
parted (GNU parted) 1.9.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://parted.alioth.debian.org/cgi-bin/trac.cgi/browser/AUTHORS>.

$ cat /tmp/xx | sed -rn 's/^[^0-9\.]*([0-9]+\.[-0-9a-z\.]+).*$/\1/p'
1.9.0

Can you show the output it generates on your server?

sirtow commented at 2013-10-17 16:06:

How did you generate your /tmp/xx? Anyway i run the following :

pluto rear # parted -v > /tmp/xx
pluto rear # cat /tmp/xx | sed -rn 's/^[^0-9\.]*([0-9]+\.[-0-9a-z\.]+).*$/\1/p'
pluto rear #

and my sed (just in case ) :

pluto rear # sed --version
GNU sed version 4.2.1

also noticed that my /tmp/xx (generated by parted -v > /tmp/xx) have some escape seq :

^[[?1034hparted (GNU parted) 1.9.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://parted.alioth.debian.org/cgi-bin/trac.cgi/browser/AUTHORS>.

sirtow commented at 2013-10-17 16:09:

It seems related to
https://bugzilla.redhat.com/show_bug.cgi?id=304181
and
http://www.incenp.org/notes/2012/python-term-smm-fix.html

gdha commented at 2013-10-18 11:10:

Interesting links - thanks. Did you try it out already?

TERM=dumb parted -v > /tmp/xx
od -a /tmp/xx

sirtow commented at 2013-10-18 14:05:

I'm still trying to figure out the root cause. Changing the terminal string did help. I was able to run rear but of course it broke my terminal (putty).
So the problem remains :)

gdha commented at 2013-10-18 14:42:

And, if you do like this?

# export TERM=vt100
# parted -v
GNU Parted 1.8.1
# TERM=dumb parted -v > /tmp/xx
# od -a /tmp/xx
0000000   G   N   U  sp   P   a   r   t   e   d  sp   1   .   8   .   1
0000020  nl
0000021
# echo $TERM
vt100

sirtow commented at 2013-10-18 15:06:

Here it is. Seems ok

pluto rear # echo $TERM
xterm
pluto rear # TERM=dumb  parted -v | od -a
0000000   p   a   r   t   e   d  sp   (   G   N   U  sp   p   a   r   t
0000020   e   d   )  sp   1   .   9   .   0  nl   C   o   p   y   r   i
0000040   g   h   t  sp   (   C   )  sp   2   0   0   9  sp   F   r   e
0000060   e  sp   S   o   f   t   w   a   r   e  sp   F   o   u   n   d
0000100   a   t   i   o   n   ,  sp   I   n   c   .  nl   L   i   c   e
0000120   n   s   e  sp   G   P   L   v   3   +   :  sp   G   N   U  sp
0000140   G   P   L  sp   v   e   r   s   i   o   n  sp   3  sp   o   r
0000160  sp   l   a   t   e   r  sp   <   h   t   t   p   :   /   /   g
0000200   n   u   .   o   r   g   /   l   i   c   e   n   s   e   s   /
0000220   g   p   l   .   h   t   m   l   >   .  nl   T   h   i   s  sp
0000240   i   s  sp   f   r   e   e  sp   s   o   f   t   w   a   r   e
0000260   :  sp   y   o   u  sp   a   r   e  sp   f   r   e   e  sp   t
0000300   o  sp   c   h   a   n   g   e  sp   a   n   d  sp   r   e   d
0000320   i   s   t   r   i   b   u   t   e  sp   i   t   .  nl   T   h
0000340   e   r   e  sp   i   s  sp   N   O  sp   W   A   R   R   A   N
0000360   T   Y   ,  sp   t   o  sp   t   h   e  sp   e   x   t   e   n
0000400   t  sp   p   e   r   m   i   t   t   e   d  sp   b   y  sp   l
0000420   a   w   .  nl  nl   W   r   i   t   t   e   n  sp   b   y  sp
0000440   <   h   t   t   p   :   /   /   p   a   r   t   e   d   .   a
0000460   l   i   o   t   h   .   d   e   b   i   a   n   .   o   r   g
0000500   /   c   g   i   -   b   i   n   /   t   r   a   c   .   c   g
0000520   i   /   b   r   o   w   s   e   r   /   A   U   T   H   O   R
0000540   S   >   .  nl
0000544
pluto rear # echo $TERM
xterm

gdha commented at 2013-10-25 13:12:

@sirtow could you try the latest snapshot version?
URL: http://download.opensuse.org/repositories/Archiving:/Backup:/Rear:/Snapshot/

sirtow commented at 2013-10-25 14:49:

Just did git pull and it seems working.
Big thanks for the support!!!!


[Export of Github issue for rear/rear.]