/usr/bin/ucfr: ... integer expression expected
I've had a reoccurring issue: https:/
Running: ucf_3.0036_all.deb
http://
http://
I don't know why ucfr is erroring out but the accumulated errors are now enough to stall priority packages which I feel hamstrung about. I've reinstalled the ucf package and danced around the issue enough.
Any maintainers have a shot in the dark for why this would be happening?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu ucf Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Andy
- Solved:
- Last query:
- Last reply:
Related FAQ:
None Link to a FAQ
Revision history for this message
![]() |
#1 |
What is the full Terminal output of the following commands:
ls -lart /var/lib/
cat /var/lib/
file /var/lib/
diff /var/lib/
diff /var/lib/
Revision history for this message
![]() |
#2 |
#ls -lart /var/lib/
-rw-r--r-- 1 root root 28 Jan 30 11:27 /var/lib/
#cat /var/lib/
grub-pc /etc/default/grub
#file /var/lib/
/var/lib/
#diff /var/lib/
Returns nothing.
#diff /var/lib/
Also returns nothing.
eg:
nexus:~> diff /var/lib/
nexus:~>
Revision history for this message
![]() |
#3 |
What is the output of:
apt-cache policy `dpkg -l | grep ucf | awk {'print $1'}`
Thanks
Revision history for this message
![]() |
#4 |
Had to jiggle the syntax but here ya go:
nexus:~> apt-cache policy `dpkg -l | grep ucf | awk '{print $1}'`
ii:
Installed: (none)
Candidate: 1.7-2
Version table:
1.7-2 500
500 http://
Revision history for this message
![]() |
#5 |
Sorry:
apt-cache policy `dpkg -l | grep ucf | awk {'print $2'}`
Thanks
Revision history for this message
![]() |
#6 |
10-4
nexus:~> apt-cache policy `dpkg -l | grep ucf | awk "{print $2}"`
ii:
Installed: (none)
Candidate: 1.7-2
Version table:
1.7-2 500
500 http://
ucf:
Installed: 3.0036
Candidate: 3.0036
Version table:
*** 3.0036 500
500 http://
500 http://
100 /var/lib/
Revision history for this message
![]() |
#7 |
The related lines in the ucfr script probably are:
257 # We have here a configuration file, which can be a symlink, and may
258 # contain characters that are unsafe in regular expressions
259 setq pkg "$1" "The Package name";
260 setq conf_file "$2" "The Configuration file";
261 setq real_conf_file "$(readlink -q -m $conf_file)" "The (real) Configuration file";
262
263 pkg_re="$(echo $pkg | sed -e 's,+,\\+,')"
264 conf_file_
265 real_conf_
...
320 # sanity check
321 count=$(egrep --count "[[:space:
322
323 if [ "$count" -ge 2 ]; then
Apparently in your case the contents of count is not numeric.
Now the question is - why? And if it is not numeric, what the script then should do - probably terminate properly but not giving "/usr/bin/ucfr: line 323: [: : integer expression expected" messages.
I thing this deserves creating a bug report that the developers investigate the case.
Revision history for this message
![]() |
#8 |
Understood. I ported it to a bug. Any thoughts on bypassing the check for the time being or is the fallout from that too great?
Revision history for this message
![]() |
#9 |
What do you get for the commands
egrep --count "[[:space:
which egrep
egrep --version
echo $GREP_OPTIONS
Revision history for this message
![]() |
#10 |
nexus:~> egrep --count "[[:space:
Illegal variable name.
/bin/egrep
nexus:~> egrep --version
nexus:~>
nexus:~> echo $GREP_OPTIONS
GREP_OPTIONS: Undefined variable.
Pulled package version: grep 2.25-1~16.04.1
Revision history for this message
![]() |
#11 |
Do you set GREP_OPTIONS in one of your init scripts (.bashrc, .profile, ...)?
What do you get for
GREP_OPTIONS="" egrep --count "[[:space:
Revision history for this message
![]() |
#12 |
And the general question:
Does grep work at all on your system?
Revision history for this message
![]() |
#13 |
Hah, obvious and good question. Yes, grep is working as advertised.
Checking my init files.. There was an egrep alias for auto colors. I pulled that. No longer any reference to egrep. Relogged.
There are no GREP_OPTIONS set in any init files.
Set GREP_OPTIONS to null/"" just in case.
nexus:~> egrep --count "[[:space:
Illegal variable name.
Revision history for this message
![]() |
#14 |
Ok, some more diagnostics:
what is the output of the commands
alias
echo $GREP_OPTIONS
echo $NONEXISTING_
which grep
which egrep
file /bin/grep
file /bin/egrep
cat /bin/egrep
grep local /etc/hosts
Revision history for this message
![]() |
#16 |
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
echo $GREP_OPTIONS :: blank
echo $NONEXISTING_
which grep :: /bin/grep
which egrep :: /bin/egrep
file /bin/grep ::
/bin/grep: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/
file /bin/egrep ::
/bin/egrep: POSIX shell script, ASCII text executable
cat /bin/egrep ::
#!/bin/sh
exec grep -E "$@"
# grep local /etc/hosts
127.0.0.1 nexus.nuancelab
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
Revision history for this message
![]() |
#17 |
ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Oct 5 17:20 /bin/sh -> dash
Revision history for this message
![]() |
#20 |
That looks pretty much the same as on my system.
What is the output of
grep -E --count "[[:space:
sh -x /bin/egrep --count "[[:space:
Revision history for this message
![]() |
#21 |
Sorry for the duplicates. System had a stutter.
grep -E --count "[[:space:
1
# sh -x /bin/egrep --count "[[:space:
+ exec grep -E --count [[:space:
Revision history for this message
![]() |
#22 |
What is the FULL output of
sh -x /bin/egrep --count "[[:space:
and finally again
egrep --count "[[:space:
?
Revision history for this message
![]() |
#23 |
That was the full output:
nexus:~# sh -x /bin/egrep --count "[[:space:
+ exec grep -E --count [[:space:
Second command returns blank:
nexus:~# egrep --count "[[:space:
nexus:~#
Revision history for this message
![]() |
#24 |
This looks weird.
In #21:
grep -E --count "[[:space:
1
but now
egrep --count "[[:space:
does not give any output, although it is basically the same?
Please repeat for verification
grep -E --count "[[:space:
/bin/grep -E --count "[[:space:
egrep --count "[[:space:
/bin/egrep --count "[[:space:
sh -x /bin/egrep --count "[[:space:
Revision history for this message
![]() |
#25 |
Trial 2: grep -E --count "[[:space:
1
^Not sure, I thought that maybe I had been under a different shell but I can't replicate the blank from the 1. I get Illegal variable name if I do this under non-root. I get 1 when under root. Personal shell is tcsh, roots is bash.
nexus:~# grep -E --count "[[:space:
1
nexus:~# /bin/grep -E --count "[[:space:
1
nexus:~# egrep --count "[[:space:
nexus:~#
@nexus:~# /bin/egrep --count "[[:space:
nexus:~#
nexus:~# sh -x /bin/egrep --count "[[:space:
+ exec grep -E --count [[:space:
nexus:~#
Revision history for this message
![]() |
#26 |
The different shells can be an explanation.
What do you get for
tcsh
grep -E --count "[[:space:
/bin/grep -E --count "[[:space:
egrep --count "[[:space:
/bin/egrep --count "[[:space:
sh -x /bin/egrep --count "[[:space:
exit
bash
grep -E --count "[[:space:
/bin/grep -E --count "[[:space:
egrep --count "[[:space:
/bin/egrep --count "[[:space:
sh -x /bin/egrep --count "[[:space:
exit
Revision history for this message
![]() |
#27 |
tcsh:
grep -E --count "[[:space:
Illegal variable name.
/bin/grep -E --count "[[:space:
Illegal variable name.
egrep --count "[[:space:
Illegal variable name.
/bin/egrep --count "[[:space:
Illegal variable name.
sh -x /bin/egrep --count "[[:space:
Illegal variable name.
bash:
# grep -E --count "[[:space:
1
# /bin/grep -E --count "[[:space:
1
# egrep --count "[[:space:
#
#/bin/egrep --count "[[:space:
#
# sh -x /bin/egrep --count "[[:space:
+ exec grep -E --count [[:space:
Revision history for this message
![]() |
#28 |
Ok, this give some results that can serve for further investigations.
It seems that there is a failure ("Illegal variable name.") if you try the command
grep -E --count "[[:space:
in a tcsh shell.
Interesting is that changing the command to
grep -E --count '[[:space:
(single quotes instead of double quotes) seems to work well even with tcsh.
It seems that the problem shows up if the search string contains $" (dollar followed by double quote).
Also
grep "*$" /dev/null
fails.
There is another strange effect:
If I run a tcsh shell and type the command
grep "*$" /dev/null
it fails, but if I then press the up arrow to recall that command, I suddenly see
grep "*$\" /dev/null
which an added backslash.
Do you see the same?
This all seems to be related to http://
Still there is the open question, why you get different results between "grep -E ..." and "egrep ..."
What I can suggest:
1. avoid tcsh and csh when updating your system, because ucfr might fail
2. suggest that ucfr avoids the string $" because grep will fail if tcsh or csh is used. (this should go into the bug report)
Revision history for this message
![]() |
#29 |
Yes, I am seeing the same behavior under tcsh. History changes "*$" to; grep "*$\" /dev/null
I'll definitely keep the suggestions in mind. I wish just switching to root/bash for the updates would resolve the issue at hand though.
Root/bash:
Setting up grub-pc (2.02~beta2-
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
Installing for i386-pc platform.
[.........]
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 255
Revision history for this message
![]() |
#30 |
As a workaround you could try to modify the ucfr script:
modify line 321 from
count=$(egrep --count "[[:space:
into
count=$(egrep --count "[[:space:
(instead of 'dollar doublequote' make it 'doublequote quote dollar quote')
if this works, this could serve as the base for a patch for ucf.
Revision history for this message
![]() |
#31 |
Sorry for the delay, had an illness which ruled my world for a few days.
Altered ucfr l:321
count=$(egrep --count "[[:space:
Under root/bash I
root@nexus:
(Reading database ... 201899 files and directories currently installed.)
Preparing to unpack grub-pc_
Unpacking grub-pc (2.02~beta2-
Setting up grub-pc (2.02~beta2-
[setup screen/keep local config selected]
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
[....]
Installation finished. No error reported.
dpkg: error processing package grub-pc (--install):
subprocess installed post-installation script returned error exit status 255
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
grub-pc
Revision history for this message
![]() |
#32 |
What do you get for
grep -E --count "[[:space:
grep -E --count "[[:space:
Revision history for this message
![]() |
#33 |
root@nexus:~# grep -E --count "[[:space:
1
root@nexus:~# grep -E --count "[[:space:
1
Revision history for this message
![]() |
#34 |
Please try as normal (not root) user in tcsh
Revision history for this message
![]() |
#35 |
nexus:~> grep -E --count "[[:space:
Illegal variable name.
nexus:~> grep -E --count "[[:space:
1
Revision history for this message
![]() |
#36 |
What do you get for
grep '$"' /usr/bin/ucfr
(eventually in bash instead of tcsh)?
Revision history for this message
![]() |
#37 |
tcsh:
nexus:~> grep '$"' /usr/bin/ucfr
old_pkg=$(egrep "[[:space:
egrep -v "[[:space:
egrep -v "[[:space:
egrep "[[:space:
bash:
andy@nexus:~$ grep '$"' /usr/bin/ucfr
old_pkg=$(egrep "[[:space:
egrep -v "[[:space:
egrep -v "[[:space:
egrep "[[:space:
Revision history for this message
![]() |
#38 |
Ok, one of the previous comments was not going far enough.
Try the following:
modify /usr/bin/ucfr and change ALL occurrences of $" into "'$'
and then re-try installing grub-pc.
Revision history for this message
![]() |
#39 |
I found 5 occurrences that needed changing, and changed them. eg: ile_re}"'$' "$statedi
Tried to install grub-pc_2:
Setting up grub-pc (2.02~beta2-
/usr/bin/ucfr: line 323: [: : integer expression expected
/usr/bin/ucfr: line 110: [: : integer expression expected
I attempted this both as a user via sudo, as root via bash and as root via tcsh, same outcome.
Revision history for this message
![]() |
#40 |
This starts to become inexplicable for me.
Try the following for showing debug information:
Edit the ucfr script and add the line
set +x
after the comments at the beginning of the file (below the line that shows "set +e")
and then re-run the grub installation attempt.
Do you get more output?
Revision history for this message
![]() |
#41 |
Setting up grub-pc (2.02~beta2-
++ basename /usr/bin/ucfr
+ progname=ucfr
+ pversion='Revision 3.00'
+ docmd=YES
+ action=withecho
+ action=
+ DEBUG=0
+ VERBOSE=
+ statedir=
+ THREEWAY=
++ getopt -a -o hd::D::fnvp -n ucfr --long help,debug:
+ TEMP=' --force -- '\''grub-pc'\'' '\''/etc/
+ '[' 0 '!=' 0 ']'
+ eval set -- ' --force -- '\''grub-pc'\'' '\''/etc/
++ set -- --force -- grub-pc /etc/default/grub
+ true
+ case "$1" in
+ FORCE=1
+ shift
+ true
+ case "$1" in
+ shift
+ break
++ id -u
+ test 0 '!=' 0
+ '[' 2 '!=' 2 ']'
+ setq pkg grub-pc 'The Package name'
+ '[' xgrub-pc = x ']'
+ '[' x '!=' x ']'
+ eval 'pkg="$2"'
++ pkg=grub-pc
+ setq conf_file /etc/default/grub 'The Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'conf_file="$2"'
++ conf_file=
++ readlink -q -m /etc/default/grub
+ setq real_conf_file /etc/default/grub 'The (real) Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'real_conf_
++ real_conf_
++ echo grub-pc
++ sed -e 's,+,\\+,'
+ pkg_re=grub-pc
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ conf_file_
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ real_conf_
+ case $conf_file_re in
+ : echo fine
+ '[' -f /etc/ucf.conf ']'
+ . /etc/ucf.conf
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ setq statedir /var/lib/ucf 'The State directory'
+ '[' x/var/lib/ucf = x ']'
+ '[' x '!=' x ']'
+ eval 'statedir="$2"'
++ statedir=
+ '[' X = X0 ']'
+ '[' -e /var/lib/
+ '[' '!' -d /var/lib/ucf ']'
+ '[' '!' -f /var/lib/
+ '[' X '!=' X ']'
++ egrep --count '[[:space:
+ count=
+ true
+ '[' '' -ge 2 ']'
/usr/bin/ucfr: line 324: [: : integer expression expected
+ '[' X '!=' X ']'
+ replace_in_registry
+ '[' '!' -e /var/lib/
+ '[' '' -eq 1 ']'
/usr/bin/ucfr: line 111: [: : integer expression expected
++ /usr/bin/seq 6 -1 0
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ '[' XYES = XYES ']'
+ set +e
+ '[' X '!=' X ']'
+ egrep -v '[[:space:
+ true
+ echo 'grub-pc /etc/default/grub'
+ mv -f /var/lib/
+ set -e
+ exit 0
[.....]
Installation finished. No error reported.
dpkg: error processing package grub-pc (--install):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
grub-pc
Revision history for this message
![]() |
#42 |
Ok, the trace shows an unexpected
++ egrep --count '[[:space:
+ count=
New attempt:
In addition to the $" to "'$' change already done in the ucfr script, modify all occurrences of
"egrep" into "grep -E" and then try again.
Revision history for this message
![]() |
#43 |
Setting up grub-pc (2.02~beta2-
++ basename /usr/bin/ucfr
+ progname=ucfr
+ pversion='Revision 3.00'
+ docmd=YES
+ action=withecho
+ action=
+ DEBUG=0
+ VERBOSE=
+ statedir=
+ THREEWAY=
++ getopt -a -o hd::D::fnvp -n ucfr --long help,debug:
+ TEMP=' --force -- '\''grub-pc'\'' '\''/etc/
+ '[' 0 '!=' 0 ']'
+ eval set -- ' --force -- '\''grub-pc'\'' '\''/etc/
++ set -- --force -- grub-pc /etc/default/grub
+ true
+ case "$1" in
+ FORCE=1
+ shift
+ true
+ case "$1" in
+ shift
+ break
++ id -u
+ test 0 '!=' 0
+ '[' 2 '!=' 2 ']'
+ setq pkg grub-pc 'The Package name'
+ '[' xgrub-pc = x ']'
+ '[' x '!=' x ']'
+ eval 'pkg="$2"'
++ pkg=grub-pc
+ setq conf_file /etc/default/grub 'The Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'conf_file="$2"'
++ conf_file=
++ readlink -q -m /etc/default/grub
+ setq real_conf_file /etc/default/grub 'The (real) Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'real_conf_
++ real_conf_
++ echo grub-pc
++ sed -e 's,+,\\+,'
+ pkg_re=grub-pc
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ conf_file_
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ real_conf_
+ case $conf_file_re in
+ : echo fine
+ '[' -f /etc/ucf.conf ']'
+ . /etc/ucf.conf
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ setq statedir /var/lib/ucf 'The State directory'
+ '[' x/var/lib/ucf = x ']'
+ '[' x '!=' x ']'
+ eval 'statedir="$2"'
++ statedir=
+ '[' X = X0 ']'
+ '[' -e /var/lib/
+ '[' '!' -d /var/lib/ucf ']'
+ '[' '!' -f /var/lib/
+ '[' X '!=' X ']'
++ egrep -E --count '[[:space:
+ count=
+ true
+ '[' '' -ge 2 ']'
/usr/bin/ucfr: line 324: [: : integer expression expected
+ '[' X '!=' X ']'
+ replace_in_registry
+ '[' '!' -e /var/lib/
+ '[' '' -eq 1 ']'
/usr/bin/ucfr: line 111: [: : integer expression expected
++ /usr/bin/seq 6 -1 0
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ for i in '$(/usr/bin/seq 6 -1 0)'
+ '[' -e /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ '[' XYES = XYES ']'
+ cp -f /var/lib/
+ '[' XYES = XYES ']'
+ set +e
+ '[' X '!=' X ']'
+ egrep -E -v '[[:space:
+ true
+ echo 'grub-pc /etc/default/grub'
+ mv -f /var/lib/
+ set -e
+ exit 0
Revision history for this message
![]() |
#44 |
Not "egrep -E" but "grep -E" for all occurrences in the ucfr script, please.
Revision history for this message
![]() |
#45 |
Copy that. Sorry.
Setting up grub-pc (2.02~beta2-
++ basename /usr/bin/ucfr
+ progname=ucfr
+ pversion='Revision 3.00'
+ docmd=YES
+ action=withecho
+ action=
+ DEBUG=0
+ VERBOSE=
+ statedir=
+ THREEWAY=
++ getopt -a -o hd::D::fnvp -n ucfr --long help,debug:
+ TEMP=' --force -- '\''grub-pc'\'' '\''/etc/
+ '[' 0 '!=' 0 ']'
+ eval set -- ' --force -- '\''grub-pc'\'' '\''/etc/
++ set -- --force -- grub-pc /etc/default/grub
+ true
+ case "$1" in
+ FORCE=1
+ shift
+ true
+ case "$1" in
+ shift
+ break
++ id -u
+ test 0 '!=' 0
+ '[' 2 '!=' 2 ']'
+ setq pkg grub-pc 'The Package name'
+ '[' xgrub-pc = x ']'
+ '[' x '!=' x ']'
+ eval 'pkg="$2"'
++ pkg=grub-pc
+ setq conf_file /etc/default/grub 'The Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'conf_file="$2"'
++ conf_file=
++ readlink -q -m /etc/default/grub
+ setq real_conf_file /etc/default/grub 'The (real) Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'real_conf_
++ real_conf_
++ echo grub-pc
++ sed -e 's,+,\\+,'
+ pkg_re=grub-pc
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ conf_file_
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ real_conf_
+ case $conf_file_re in
+ : echo fine
+ '[' -f /etc/ucf.conf ']'
+ . /etc/ucf.conf
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ setq statedir /var/lib/ucf 'The State directory'
+ '[' x/var/lib/ucf = x ']'
+ '[' x '!=' x ']'
+ eval 'statedir="$2"'
++ statedir=
+ '[' X = X0 ']'
+ '[' -e /var/lib/
+ '[' '!' -d /var/lib/ucf ']'
+ '[' '!' -f /var/lib/
+ '[' X '!=' X ']'
++ grep -E --count '[[:space:
+ count=1
+ '[' 1 -ge 2 ']'
+ '[' X '!=' X ']'
+ replace_in_registry
+ '[' '!' -e /var/lib/
+ '[' 1 -eq 1 ']'
++ grep -E '[[:space:
++ awk '{print $1;}'
+ old_pkg=grub-pc
+ '[' grub-pc '!=' grub-pc ']'
+ '[' X '!=' X ']'
+ exit 0
Revision history for this message
![]() |
#46 |
No error messages any more.
So it seems that finally the installation worked, can you confirm this?
Apparently the ucfr script had the following weaknesses:
If tcsh (or csh) is involved, all grep commands fail, if the search string contains $".
Workaround: replace $" by "'$'
For whatever reason egrep did not return any output, but grep -E did.
Workaround: replace egrep by grep -E
Revision history for this message
![]() |
#47 |
You know I didn't even realize that the ucfr error had dissapeared since the outcome was still the same.
[Cont...]
+ exit 0
Installing for i386-pc platform.
[....]
Installation finished. No error reported.
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 255
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
grub-pc
*** dpkg.log ***
2017-02-16 13:48:06 startup archives install
2017-02-16 13:48:06 upgrade grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status half-configured grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status unpacked grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status half-installed grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status triggers-pending man-db:amd64 2.7.5-1
2017-02-16 13:48:06 status half-installed grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status unpacked grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status unpacked grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 configure grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status unpacked grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status unpacked grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status unpacked grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:06 status half-configured grub-pc:amd64 2.02~beta2-
2017-02-16 13:48:09 trigproc man-db:amd64 2.7.5-1 <none>
2017-02-16 13:48:09 status half-configured man-db:amd64 2.7.5-1
2017-02-16 13:48:09 status installed man-db:amd64 2.7.5-1
I've tried to let package maintainer overwrite & keep my configs, doesn't change the outcome.
I have a few frozen packages that had this error in them too. I'm a little reluctant to unfreeze them as they hammed up the mailsystem pretty good requiring in the end a rollback.
Revision history for this message
![]() |
#48 |
Sorry that the installation is still not successful, but it seemed to me that the ucfr error was gone.
What is now the output of
sudo dpkg --audit
sudo dpkg --configure -a
Revision history for this message
![]() |
#49 |
Audit:
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
grub-pc GRand Unified Bootloader, version 2 (PC/BIOS version)
Setting up grub-pc (2.02~beta2-
++ basename /usr/bin/ucfr
+ progname=ucfr
+ pversion='Revision 3.00'
+ docmd=YES
+ action=withecho
+ action=
+ DEBUG=0
+ VERBOSE=
+ statedir=
+ THREEWAY=
++ getopt -a -o hd::D::fnvp -n ucfr --long help,debug:
+ TEMP=' --force -- '\''grub-pc'\'' '\''/etc/
+ '[' 0 '!=' 0 ']'
+ eval set -- ' --force -- '\''grub-pc'\'' '\''/etc/
++ set -- --force -- grub-pc /etc/default/grub
+ true
+ case "$1" in
+ FORCE=1
+ shift
+ true
+ case "$1" in
+ shift
+ break
++ id -u
+ test 0 '!=' 0
+ '[' 2 '!=' 2 ']'
+ setq pkg grub-pc 'The Package name'
+ '[' xgrub-pc = x ']'
+ '[' x '!=' x ']'
+ eval 'pkg="$2"'
++ pkg=grub-pc
+ setq conf_file /etc/default/grub 'The Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'conf_file="$2"'
++ conf_file=
++ readlink -q -m /etc/default/grub
+ setq real_conf_file /etc/default/grub 'The (real) Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'real_conf_
++ real_conf_
++ echo grub-pc
++ sed -e 's,+,\\+,'
+ pkg_re=grub-pc
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ conf_file_
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ real_conf_
+ case $conf_file_re in
+ : echo fine
+ '[' -f /etc/ucf.conf ']'
+ . /etc/ucf.conf
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ setq statedir /var/lib/ucf 'The State directory'
+ '[' x/var/lib/ucf = x ']'
+ '[' x '!=' x ']'
+ eval 'statedir="$2"'
++ statedir=
+ '[' X = X0 ']'
+ '[' -e /var/lib/
+ '[' '!' -d /var/lib/ucf ']'
+ '[' '!' -f /var/lib/
+ '[' X '!=' X ']'
++ grep -E --count '[[:space:
+ count=1
+ '[' 1 -ge 2 ']'
+ '[' X '!=' X ']'
+ replace_in_registry
+ '[' '!' -e /var/lib/
+ '[' 1 -eq 1 ']'
++ grep -E '[[:space:
++ awk '{print $1;}'
+ old_pkg=grub-pc
+ '[' grub-pc '!=' grub-pc ']'
+ '[' X '!=' X ']'
+ exit 0
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
grub-pc
root@nexus:
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
grub-pc GRand Unified Bootloader, version 2 (PC/BIOS version)
root@nexus:
root@nexus:
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
grub-pc GRand Unified Bootloader, version 2 (PC/BIOS version)
root@nexus:
Setting up grub-pc (2.02~beta2-
++ basename /usr/bin/ucfr
+ progname=ucfr
+ pversion='Revision 3.00'
+ docmd=YES
+ action=withecho
+ action=
+ DEBUG=0
+ VERBOSE=
+ statedir=
+ THREEWAY=
++ getopt -a -o hd::D::fnvp -n ucfr --long help,debug:
+ TEMP=' --force -- '\''grub-pc'\'' '\''/etc/
+ '[' 0 '!=' 0 ']'
+ eval set -- ' --force -- '\''grub-pc'\'' '\''/etc/
++ set -- --force -- grub-pc /etc/default/grub
+ true
+ case "$1" in
+ FORCE=1
+ shift
+ true
+ case "$1" in
+ shift
+ break
++ id -u
+ test 0 '!=' 0
+ '[' 2 '!=' 2 ']'
+ setq pkg grub-pc 'The Package name'
+ '[' xgrub-pc = x ']'
+ '[' x '!=' x ']'
+ eval 'pkg="$2"'
++ pkg=grub-pc
+ setq conf_file /etc/default/grub 'The Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'conf_file="$2"'
++ conf_file=
++ readlink -q -m /etc/default/grub
+ setq real_conf_file /etc/default/grub 'The (real) Configuration file'
+ '[' x/etc/default/grub = x ']'
+ '[' x '!=' x ']'
+ eval 'real_conf_
++ real_conf_
++ echo grub-pc
++ sed -e 's,+,\\+,'
+ pkg_re=grub-pc
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ conf_file_
++ echo /etc/default/grub
++ sed -e 's,+,\\+,'
+ real_conf_
+ case $conf_file_re in
+ : echo fine
+ '[' -f /etc/ucf.conf ']'
+ . /etc/ucf.conf
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ '[' '!' x = x ']'
+ setq statedir /var/lib/ucf 'The State directory'
+ '[' x/var/lib/ucf = x ']'
+ '[' x '!=' x ']'
+ eval 'statedir="$2"'
++ statedir=
+ '[' X = X0 ']'
+ '[' -e /var/lib/
+ '[' '!' -d /var/lib/ucf ']'
+ '[' '!' -f /var/lib/
+ '[' X '!=' X ']'
++ grep -E --count '[[:space:
+ count=1
+ '[' 1 -ge 2 ']'
+ '[' X '!=' X ']'
+ replace_in_registry
+ '[' '!' -e /var/lib/
+ '[' 1 -eq 1 ']'
++ grep -E '[[:space:
++ awk '{print $1;}'
+ old_pkg=grub-pc
+ '[' grub-pc '!=' grub-pc ']'
+ '[' X '!=' X ']'
+ exit 0
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
grub-pc
The install pops up with the configuration dialog, it gets configured any which way to sunday and continues to its above conclusions.
From the Stackoverflow commentary all I got was:
The warning about ext2 doesn't support embedding is not related to the problem of being unable to update the package. It's mostly harmless, but if you want to get rid of it, change the partition containing /boot to ext3 or ext4. – Michael Hampton♦ Jan 22 at 21:50
However as I responded to him to no avail the /boot partition is not ext2, everything is ext3. Still not sure how to pull that out to kill the warnings---
I digress; since the other times I've seen UCFR go off the rails I've been assuming it's the culprit in reporting since it's dealing with configurations and each time it's a dialog modal that's being queried when it does so. I might take the time tomorrow to snapshot again and unfreeze those dovecot packages to get another angle on this.
Revision history for this message
![]() |
#50 |
Sorry for the extraneous unkempt paste(s).. not quite sure what happened there and the system doesn't allow me to edit the commentary. :/
Revision history for this message
![]() |
#51 |
What you should do in any case is removing the "set +x" line from the ucfr script.
I am not sure about the ext2 issue and grub.
What is the output of
debconf-show grub-pc
Revision history for this message
![]() |
#52 |
Ok, wasn't sure if that was ready to seal up but will do that.
debconf-show grub-pc
grub2/
grub-
grub2/
grub-
grub-
grub-
* grub-pc/
grub2/
grub-
grub2/
grub-pc/timeout: 10
grub2/
grub-
grub2/
grub-
grub-
grub-
grub-
grub-
Revision history for this message
![]() |
#53 |
your last output looks reasonable.
What is now the final status?
My assumption was that with the two changes in the ucfr script (all $" into "'$' and all egrep into grep -E) the problem that ucfr aborts with "[: : integer expression expected" has been eliminated.
I now do not understand why the grub-pc installation still fails.
Revision history for this message
![]() |
#54 |
Yep, I think we're good. I might have another edge case to get rid of. I removed the holds on my remaining packages that gave me trouble with ucfr and everything else installed without a hiccup through the process. Knowing that I think I've got something else isolated in grub-pc.
I thank you for your time and generous, generous support. My family owns a confectionary and if I can send you some chocolates or caramels as a thank you for your energy drop me an email: andy at thesecretchocol
Revision history for this message
![]() |
#55 |
Thanks for the offer, but taking personal benefit is not the reason for helping here.
If you want, you can donate to a charitable organization of your choice.