[Bug 1856840] Re: bash-completion.pc doesn't allow to redefine prefix variable

Enrique 1856840 at bugs.launchpad.net
Thu Mar 26 07:33:28 UTC 2020


Hi,

this bug seems to be have a well defined patch upstream. Would it be possible to apply it to Ubuntu 19.10?
Also, it would be good that a patched version of bash-completion is included in 20.04.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1856840

Title:
  bash-completion.pc doesn't allow to redefine prefix variable

Status in bash-completion package in Ubuntu:
  New

Bug description:
  On Ubuntu 19.10 the file /usr/share/pkgconfig/bash-completion.pc has
  hard-coded values for completionsdir and helpersdir:

  # cat /usr/share/pkgconfig/bash-completion.pc
  prefix=/usr
  compatdir=/etc/bash_completion.d
  completionsdir=/usr/share/bash-completion/completions
  helpersdir=/usr/share/bash-completion/helpers

   whereas in Ubuntu 19.04 it looks like this:

  # cat /usr/share/pkgconfig/bash-completion.pc
  prefix=/usr
  compatdir=/etc/bash_completion.d
  completionsdir=${prefix}/share/bash-completion/completions
  helpersdir=${prefix}/share/bash-completion/helpers

   the problem with the first one is that one cannot override the prefix
  variable:

  Ubuntu 19.10:
  # pkg-config --variable=completionsdir --define-variable=prefix=/other_dir  bash-completion
  /usr/share/bash-completion/completions

  Ubuntu 19.04:
  # pkg-config --variable=completionsdir --define-variable=prefix=/other_dir  bash-completion
  /other_dir/share/bash-completion/completions

   This is a problem for software that tries to install as a non-root
  user software in non-system directories.

   The problem is known upstream and has been fixed:
  https://github.com/scop/bash-completion/commit/8c5302581ad20954cfa164dcae26f1ed6277dd90#diff-42e567633e7af054a0d01d8f2b93ddf1

  Updating the version of bash-completion to 2.10
  (https://github.com/scop/bash-completion/releases/tag/2.10) will help
  to fix the issue. In the new version completionsdir is defined in
  terms of datadir, so a way to verify that the bug is fixed and one
  gets the same thing in Ubuntu 19.06 and Ubuntu 19.10 would be:

  # pkg-config --variable=completionsdir --define-variable=datadir=/other_dir/share --define-variable=prefix=/other_dir  bash-completion
  /other_dir/share/bash-completion/completions

   The currently installed package in my system:

  # apt-cache policy bash-completion
  bash-completion:
    Installed: 1:2.9-1ubuntu1
    Candidate: 1:2.9-1ubuntu1
    Version table:
   *** 1:2.9-1ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
          100 /var/lib/dpkg/status

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: bash-completion 1:2.9-1ubuntu1
  ProcVersionSignature: Ubuntu 4.15.0-65.74-generic 4.15.18
  Uname: Linux 4.15.0-65-generic x86_64
  ApportVersion: 2.20.11-0ubuntu8.2
  Architecture: amd64
  Date: Wed Dec 18 11:44:40 2019
  Dependencies:
   
  PackageArchitecture: all
  SourcePackage: bash-completion
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1856840/+subscriptions



More information about the foundations-bugs mailing list