[R-sig-Debian] Configuration problem installing backport to jessie

Johannes Ranke jranke at uni-bremen.de
Fri Mar 3 08:51:10 CET 2017


Hi,

Am Donnerstag, 2. März 2017, 14:36:31 schrieb Jim Ottaway:
> I came across this problem moving from the standard jessie package to
> the backport:
> 
>     $ sudo dpkg --configure r-base-core
>     Setting up r-base-core (3.3.2-1~jessiecran.0) ...

I am the one building and uploading those backports to Debian stable to 
CRAN...

>     Preserving user changes to /usr/share/bash-completion/completions/R
> (renamed from /etc/bash_completion.d/R)... 
> mv: cannot stat
> ‘/usr/share/bash-completion/completions/R’: No such file or directory
> dpkg:
> error processing package r-base-core (--configure):
>      subprocess installed post-installation script returned error exit
> status 1 Errors were encountered while processing:
>      r-base-core

OK, to check this, I just installed R from jessie on a fresh jessie 
installation, and upgraded using the CRAN backports. I get

Configuration file '/etc/bash_completion.d/R'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** R (Y/I/N/O/D/Z) [default=N] ? 

"Deleted (by you or by a script) since installation" points to a packaging 
problem, as I have not touched anything in this installation. Indeed, there is 
no file /etc/bash_completion.d/R in the system.

I accepted the default (keep the currently-installed version) and the 
installation proceeded without errors.

Then I purged r-base and r-base-core, installed R 3.1.1 from jessie again, and 
repeated the upgrade, selecting the other option (install the package 
maintainers version).

Then I get:

Installing new version of config file /etc/bash_completion.d/R ...
Preserving user changes to /usr/share/bash-completion/completions/R (renamed 
from /etc/bash_completion.d/R)...
mv: cannot stat ‘/usr/share/bash-completion/completions/R’: No such file or 
directory
dpkg: error processing package r-base-core (--configure):
 subprocess installed post-installation script returned error exit status 1

which is exactly the error you got!

> I managed to fix this by manually copying the R completion script
> /etc/bash_completion.d/R to /usr/share/bash-completion/completions/

Thanks for sharing the workaround.

> I thought I'd best post something about this in case either I haven't
> actually fixed it or it means something in the backporting is slightly
> wrong with respect to bash completion.

Somehow the R 3.3.2 package deletes /etc/bash_completion.d/R before it tries 
to move it. Then, if you select to keep your current version, this current 
version is empty which leads to the error.

According to the changelog, debian/r-base-core.maintscript was introduced to 
fix

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840506

It seems that the interaction of the maintscript and dh_bash-completion is 
error-prone. Admins should not be bothered by a question about bash completion 
when they did not touch the configuration.

On the other hand, the backports install fine when accepting the default 
option, and we have a workaround for the other case.

Hopefully we can do better when packaging/backporting R 3.3.3, expected for 
next week.

Kind regards,

Johannes

> 
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian



More information about the R-SIG-Debian mailing list