Debian Bug report logs - #648319
bash-completion: /etc/bash_completion script doesn't do the job.

version graph

Package: bash-completion; Maintainer for bash-completion is Gabriel F. T. Gomes <gabriel@debian.org>; Source for bash-completion is src:bash-completion (PTS, buildd, popcon).

Reported by: Simon Chopin <chopin.simon@gmail.com>

Date: Thu, 10 Nov 2011 15:03:08 UTC

Severity: grave

Tags: confirmed

Found in version bash-completion/1:1.90-1

Fixed in version bash-completion/1:1.99-2

Done: David Paleino <dapal@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Thu, 10 Nov 2011 15:03:11 GMT) (full text, mbox, link).


Acknowledgement sent to Simon Chopin <chopin.simon@gmail.com>:
New Bug report received and forwarded. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Thu, 10 Nov 2011 15:03:12 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Simon Chopin <chopin.simon@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: bash-completion: /etc/bash_completion script doesn't do the job.
Date: Thu, 10 Nov 2011 16:01:54 +0100
Package: bash-completion
Version: 1:1.90-1
Severity: normal

Hi !

When using the experimental bash-completion package, I noticed that the
completion wouldn't work anymore when using the code snippet found in
the default /etc/bash.bashrc, which refers to /etc/bash_completion.

I assume that at some point, the bash package will update this location
to point to /usr/share/bash-completion/bash_completion, but in the mean
time, I think it would be better if the /etc file would be dropped, or
at least be changed into a symlink to the /usr/share. This way, the
point of break would be more evident.

Since the package doing the breaking is in experimental, I did not file
a bug report for the bash package itself, I hope it is OK ?

Best regards,

Simon

-- System Information:
Debian Release: wheezy/sid
  APT prefers experimental
  APT policy: (990, 'experimental'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash  4.2-1~exp1

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information




Severity set to 'important' from 'normal' Request was from Josh Triplett <josh@joshtriplett.org> to control@bugs.debian.org. (Sun, 08 Jan 2012 00:18:09 GMT) (full text, mbox, link).


Severity set to 'grave' from 'important' Request was from Josh Triplett <josh@joshtriplett.org> to control@bugs.debian.org. (Sun, 08 Jan 2012 00:39:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Sun, 08 Jan 2012 10:39:32 GMT) (full text, mbox, link).


Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Sun, 08 Jan 2012 10:39:34 GMT) (full text, mbox, link).


Message #14 received at 648319@bugs.debian.org (full text, mbox, reply):

From: David Paleino <dapal@debian.org>
To: 648319@bugs.debian.org
Cc: Simon Chopin <chopin.simon@gmail.com>, Josh Triplett <josh@joshtriplett.org>, bash@packages.debian.org
Subject: Re: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job.
Date: Sun, 8 Jan 2012 11:37:47 +0100
[Message part 1 (text/plain, inline)]
clone 648319 -1
retitle -1 please fix /etc/bash.bashrc to point to new bash-completion location
severity -1 important
reassign -1 bash
thanks

On Thu, 10 Nov 2011 16:01:54 +0100, Simon Chopin wrote:

> Hi !
> 
> When using the experimental bash-completion package, I noticed that the
> completion wouldn't work anymore when using the code snippet found in
> the default /etc/bash.bashrc, which refers to /etc/bash_completion.
> 
> I assume that at some point, the bash package will update this location
> to point to /usr/share/bash-completion/bash_completion, but in the mean
> time, I think it would be better if the /etc file would be dropped, or
> at least be changed into a symlink to the /usr/share. This way, the
> point of break would be more evident.

Ok, I'll use a symlink. I totally forgot to drop /etc/bash_completion. Sorry
for the noise.

Bash maintainers: the new bash-completion location is
at /usr/share/bash-completion/bash_completion . Please update the files of your
package (bash.bashrc, but there may be others) to reflect the new location. TIA!

Kindly,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Bug 648319 cloned as bug 655071. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Sun, 08 Jan 2012 10:39:39 GMT) (full text, mbox, link).


Added tag(s) confirmed and pending. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Sun, 08 Jan 2012 10:51:42 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Mon, 09 Jan 2012 10:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Mon, 09 Jan 2012 10:00:10 GMT) (full text, mbox, link).


Message #23 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: David Paleino <dapal@debian.org>
Cc: 648319@bugs.debian.org, Simon Chopin <chopin.simon@gmail.com>, Josh Triplett <josh@joshtriplett.org>, bash@packages.debian.org
Subject: Re: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job.
Date: Mon, 9 Jan 2012 04:02:13 -0600
David Paleino wrote:

> clone 648319 -1
> retitle -1 please fix /etc/bash.bashrc to point to new bash-completion location
> severity -1 important
> reassign -1 bash
> thanks

Wow, I can read, really.  Will merge the bugs once a bug number is
assigned.

Sleepily,
Jonathan




Reply sent to David Paleino <dapal@debian.org>:
You have taken responsibility. (Tue, 10 Jan 2012 06:36:04 GMT) (full text, mbox, link).


Notification sent to Simon Chopin <chopin.simon@gmail.com>:
Bug acknowledged by developer. (Tue, 10 Jan 2012 06:36:05 GMT) (full text, mbox, link).


Message #28 received at 648319-close@bugs.debian.org (full text, mbox, reply):

From: David Paleino <dapal@debian.org>
To: 648319-close@bugs.debian.org
Subject: Bug#648319: fixed in bash-completion 1:1.99-2
Date: Tue, 10 Jan 2012 06:32:20 +0000
Source: bash-completion
Source-Version: 1:1.99-2

We believe that the bug you reported is fixed in the latest version of
bash-completion, which is due to be installed in the Debian FTP archive:

bash-completion_1.99-2.debian.tar.gz
  to main/b/bash-completion/bash-completion_1.99-2.debian.tar.gz
bash-completion_1.99-2.dsc
  to main/b/bash-completion/bash-completion_1.99-2.dsc
bash-completion_1.99-2_all.deb
  to main/b/bash-completion/bash-completion_1.99-2_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 648319@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
David Paleino <dapal@debian.org> (supplier of updated bash-completion package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 10 Jan 2012 07:26:30 +0100
Source: bash-completion
Binary: bash-completion
Architecture: source all
Version: 1:1.99-2
Distribution: unstable
Urgency: low
Maintainer: Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>
Changed-By: David Paleino <dapal@debian.org>
Description: 
 bash-completion - programmable completion for the bash shell
Closes: 648319 655286
Changes: 
 bash-completion (1:1.99-2) unstable; urgency=low
 .
   * Make /etc/bash_completion a symlink to the new location, waiting
     for bash to update its scripts (Closes: #648319)
   * Dropped debian/NEWS
   * Drop references to old triggers-mechanism (Closes: #655286)
Checksums-Sha1: 
 3bb370c041ec26c16dabb356a370853a4bb2994b 1394 bash-completion_1.99-2.dsc
 81ebd90c1271ce7de3bc5425d7f9fcaccc704a64 13029 bash-completion_1.99-2.debian.tar.gz
 ab016d86ac431797a16ace10b2c6128d87dc3bcc 188594 bash-completion_1.99-2_all.deb
Checksums-Sha256: 
 2dfb78279812b00767873495d99f678b81653a8784b2f21849c64baecb11dd96 1394 bash-completion_1.99-2.dsc
 44e5530c403b83e149a2f858b408b335e931c52c6c50a1571942ff4a1b2aa277 13029 bash-completion_1.99-2.debian.tar.gz
 d56e77526909233fa3927f00b79a881163ac3bceb73c25751224515098abd05c 188594 bash-completion_1.99-2_all.deb
Files: 
 04dd8f68ee0b75df3df94aa6a09c63b2 1394 shells standard bash-completion_1.99-2.dsc
 69a6d84c4431a06a8d8221906bd861d2 13029 shells standard bash-completion_1.99-2.debian.tar.gz
 64204c2cfb9911e033d575174196375c 188594 shells standard bash-completion_1.99-2_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk8L2qsACgkQ5qqQFxOSsXRKRACgwPmE37msRL0woVeTSVxAyTue
LzIAnieEk9YDfiOnxDNiAH6f8w5qazUu
=WbHS
-----END PGP SIGNATURE-----





Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Tue, 10 Jan 2012 21:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Christoph Anton Mitterer <calestyo@scientia.net>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Tue, 10 Jan 2012 21:17:20 GMT) (full text, mbox, link).


Message #33 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Christoph Anton Mitterer <calestyo@scientia.net>
To: <648319@bugs.debian.org>
Subject: Re: bash-completion: /etc/bash_completion script doesn't do the job.
Date: Tue, 10 Jan 2012 23:10:25 +0200
Hi.

Seems the symlink doesn't help, as it's target is not marked 
executable?!


Cheers,
Chris.




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Tue, 10 Jan 2012 21:33:11 GMT) (full text, mbox, link).


Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Tue, 10 Jan 2012 21:33:12 GMT) (full text, mbox, link).


Message #38 received at 648319@bugs.debian.org (full text, mbox, reply):

From: David Paleino <dapal@debian.org>
To: 648319@bugs.debian.org
Cc: Christoph Anton Mitterer <calestyo@scientia.net>
Subject: Re: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job.
Date: Tue, 10 Jan 2012 22:28:54 +0100
[Message part 1 (text/plain, inline)]
On Tue, 10 Jan 2012 23:10:25 +0200, Christoph Anton Mitterer wrote:

> Seems the symlink doesn't help, as it's target is not marked 
> executable?!

Uh? Why should it?

David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 07:42:05 GMT) (full text, mbox, link).


Acknowledgement sent to rush <rush1503@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 07:42:06 GMT) (full text, mbox, link).


Message #43 received at 648319@bugs.debian.org (full text, mbox, reply):

From: rush <rush1503@gmail.com>
To: 648319@bugs.debian.org
Cc: chopin.simon@gmail.com, dapal@debian.org, jrnieder@gmail.com, calestyo@scientia.net
Date: Wed, 11 Jan 2012 10:37:53 +0300
Hey, guys, just adding symlink doesn't resolve the issue.

You can find string

  : ${BASH_COMPLETION_COMPAT_DIR:=/etc/bash_completion.d}

in /usr/share/bash-completion/bash_completion file.

Therefore most of completions do not working.

Just changing it to /usr/share/bash-completion/completions also break
completions, that left in /etc/bash_completion.d. But most of them
already are in new place.

So we are should wait, while all developers will move it from old
destination to new.

But it would be better to change string with COMPAT_DIR variable. Here is patch:

--- /usr/share/bash-completion/bash_completion_broken 2012-01-11
11:34:13.534680333 +0400
+++ /usr/share/bash-completion/bash_completion  2012-01-11
11:34:04.618636189 +0400
@@ -40,7 +40,7 @@

 # Set the following to the location of the backwards compat completion dir.
 #
-: ${BASH_COMPLETION_COMPAT_DIR:=/etc/bash_completion.d}
+: ${BASH_COMPLETION_COMPAT_DIR:=/usr/share/bash-completion/completions}
 readonly BASH_COMPLETION_COMPAT_DIR

 # Blacklisted completions, causing problems with our code.




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 07:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 07:54:04 GMT) (full text, mbox, link).


Message #48 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: rush <rush1503@gmail.com>
Cc: 648319@bugs.debian.org, chopin.simon@gmail.com, dapal@debian.org, calestyo@scientia.net
Subject: Re: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 01:51:56 -0600
Hi,

rush wrote:

> [Subject: ]

Please use a subject line.  Often, preserving the subject
line of the message you are replying to is enough.

> You can find string
>
>   : ${BASH_COMPLETION_COMPAT_DIR:=/etc/bash_completion.d}
>
> in /usr/share/bash-completion/bash_completion file.
>
> Therefore most of completions do not working.

I don't follow.  Isn't COMPAT_DIR _supposed_ to point to
/etc/bash_completion.d?  Which completion is not working?

Puzzled,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 08:09:07 GMT) (full text, mbox, link).


Acknowledgement sent to rush <rush1503@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 08:09:08 GMT) (full text, mbox, link).


Message #53 received at 648319@bugs.debian.org (full text, mbox, reply):

From: rush <rush1503@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 648319@bugs.debian.org, chopin.simon@gmail.com, dapal@debian.org, calestyo@scientia.net
Subject: Re: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 11:07:18 +0300
Sorry again, just missed all others in CC.

2012/1/11, Jonathan Nieder <jrnieder@gmail.com>:
>
> Please use a subject line.  Often, preserving the subject
> line of the message you are replying to is enough.
>

Oh, I'm sorry.

> I don't follow.  Isn't COMPAT_DIR _supposed_ to point to
> /etc/bash_completion.d?  Which completion is not working?

If I specify /etc/bash_completion.d in this variable noone from
/usr/share/bash-completion/completions/ will work. I tested on ssh,
ip, apt-get, aptitude and others (nothing happens on TAB [[only dirs
suggested for completion]]). After
changing it to /usr/share/bash-completion/completions/ it works well.
But there are some comletions left in old dir. They do not work in
this case.

$ ls /etc/bash_completion.d/
apache2.2-common  desktop-file-validate  dpatch_edit_patch  git
initramfs-tools  m-a      openvpn  rinse
apt-file          devscripts.chdist      dput               grub
insserv          mpc      pon      vim-addon-manager
debconf           devscripts.pkgnames    dupload            helpers
libreoffice.sh   ncmpcpp  quilt

PS. And yes, I've restarted shell every time after I changed
/usr/share/bash-completion/bash_completion .

Best regards,
Rush.




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 08:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 08:39:03 GMT) (full text, mbox, link).


Message #58 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: rush <rush1503@gmail.com>
Cc: 648319@bugs.debian.org, chopin.simon@gmail.com, dapal@debian.org, calestyo@scientia.net
Subject: Re: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 02:39:43 -0600
rush wrote:
> 2012/1/11, Jonathan Nieder <jrnieder@gmail.com>:

>> I don't follow.  Isn't COMPAT_DIR _supposed_ to point to
>> /etc/bash_completion.d?  Which completion is not working?
>
> If I specify /etc/bash_completion.d in this variable noone from
> /usr/share/bash-completion/completions/ will work. I tested on ssh,
> ip, apt-get, aptitude and others (nothing happens on TAB [[only dirs
> suggested for completion]]).

Ah, I see.  Good catch --- it's due to this line:

    [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"

Probably something like

    local compscript=$(readlink -f "$BASH_SOURCE")
    [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"

in its place would do the trick.

Thanks for finding it.

Sincerely,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 13:45:12 GMT) (full text, mbox, link).


Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 13:45:20 GMT) (full text, mbox, link).


Message #63 received at 648319@bugs.debian.org (full text, mbox, reply):

From: David Paleino <dapal@debian.org>
To: 648319@bugs.debian.org
Cc: Jonathan Nieder <jrnieder@gmail.com>, rush <rush1503@gmail.com>, chopin.simon@gmail.com, calestyo@scientia.net
Subject: Re: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 14:41:06 +0100
[Message part 1 (text/plain, inline)]
On Wed, 11 Jan 2012 02:39:43 -0600, Jonathan Nieder wrote:

> rush wrote:
> > 2012/1/11, Jonathan Nieder <jrnieder@gmail.com>:
> 
> >> I don't follow.  Isn't COMPAT_DIR _supposed_ to point to
> >> /etc/bash_completion.d?  Which completion is not working?
> >
> > If I specify /etc/bash_completion.d in this variable noone from
> > /usr/share/bash-completion/completions/ will work. I tested on ssh,
> > ip, apt-get, aptitude and others (nothing happens on TAB [[only dirs
> > suggested for completion]]).
> 
> Ah, I see.  Good catch --- it's due to this line:
> 
>     [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
> 
> Probably something like
> 
>     local compscript=$(readlink -f "$BASH_SOURCE")
>     [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
> 
> in its place would do the trick.

Oh, thanks for the quick fix, and thanks for finding the bug :)

The proposed patch makes perfectly sense, thanks Jonathan! I committed it
upstream, and I just uploaded 1.99-3 to the repositories.

Enjoy,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 19:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ville Skyttä <ville.skytta@iki.fi>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 19:03:03 GMT) (full text, mbox, link).


Message #68 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Ville Skyttä <ville.skytta@iki.fi>
To: dapal@debian.org, 648319@bugs.debian.org
Cc: rush <rush1503@gmail.com>, calestyo@scientia.net
Subject: Re: [Bash-completion-devel] Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 20:59:19 +0200
On 2012-01-11 15:41, David Paleino wrote:
> On Wed, 11 Jan 2012 02:39:43 -0600, Jonathan Nieder wrote:
>
>> Probably something like
>>
>>     local compscript=$(readlink -f "$BASH_SOURCE")
>>     [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
>>
>> in its place would do the trick.
> 
> Oh, thanks for the quick fix, and thanks for finding the bug :)
> 
> The proposed patch makes perfectly sense, thanks Jonathan! I committed it
> upstream, and I just uploaded 1.99-3 to the repositories.

I think this is not appropriate upstream and should be reverted there.

First, the readlink command does not exist everywhere.

Second, I don't think it's at all clear that if someone loads
bash_completion through a symlink, (s)he wouldn't want the completions
dir to be found relative to the symlink but rather whatever the symlink
points to.




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 19:33:07 GMT) (full text, mbox, link).


Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 19:33:07 GMT) (full text, mbox, link).


Message #73 received at 648319@bugs.debian.org (full text, mbox, reply):

From: David Paleino <dapal@debian.org>
To: 648319@bugs.debian.org
Cc: Ville Skyttä <ville.skytta@iki.fi>, rush <rush1503@gmail.com>, calestyo@scientia.net
Subject: Re: Bug#648319: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 20:30:40 +0100
[Message part 1 (text/plain, inline)]
On Wed, 11 Jan 2012 20:59:19 +0200, Ville Skyttä wrote:

> On 2012-01-11 15:41, David Paleino wrote:
> > On Wed, 11 Jan 2012 02:39:43 -0600, Jonathan Nieder wrote:
> >
> >> Probably something like
> >>
> >>     local compscript=$(readlink -f "$BASH_SOURCE")
> >>     [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
> >>
> >> in its place would do the trick.
> 
> I think this is not appropriate upstream and should be reverted there.
> 
> First, the readlink command does not exist everywhere.

Since it's part of the "coreutils" package in Debian, I supposed it existed on
all Linuxes. Surely I don't know about other Unices though (Solaris, *BSD, ...).
If this is really true, then maybe we/I should find an alternative (considered
that Debian also offers a BSD kernel).

> Second, I don't think it's at all clear that if someone loads
> bash_completion through a symlink, (s)he wouldn't want the completions
> dir to be found relative to the symlink but rather whatever the symlink
> points to.

Do we really want to support that? Wasn't that line intended to facilitate
upstream development?

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 20:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ville Skyttä <ville.skytta@iki.fi>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 20:03:03 GMT) (full text, mbox, link).


Message #78 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Ville Skyttä <ville.skytta@iki.fi>
To: dapal@debian.org
Cc: 648319@bugs.debian.org
Subject: Re: Bug#648319: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 21:59:13 +0200
On 2012-01-11 21:30, David Paleino wrote:
> On Wed, 11 Jan 2012 20:59:19 +0200, Ville Skyttä wrote:
>>
>> First, the readlink command does not exist everywhere.
> 
> Since it's part of the "coreutils" package in Debian, I supposed it existed on
> all Linuxes. Surely I don't know about other Unices though (Solaris, *BSD, ...).
> If this is really true, then maybe we/I should find an alternative (considered
> that Debian also offers a BSD kernel).

It is really true, I didn't say it just to cause trouble.  Solaris boxes
I have access to don't have it, and POSIX doesn't mention a utility by
that name.

>> Second, I don't think it's at all clear that if someone loads
>> bash_completion through a symlink, (s)he wouldn't want the completions
>> dir to be found relative to the symlink but rather whatever the symlink
>> points to.
> 
> Do we really want to support that? Wasn't that line intended to facilitate
> upstream development?

It's not at all clear to me what you mean by "that", or "that line".
I'm just saying that before this patch, completions were always loaded
from a dir relative to the sourced bash_completion, no matter if it was
a symlink or not (so we did in fact support "that" if I guessed right
what you meant by "that").  Now they no longer necessarily are, I don't
think there was anything wrong with the old behavior, and the new
behavior is obviously causing problems -- at least the readlink
availability one, and it can be also argued that the previous behavior
was fine and the new is not.  And I don't see what the symlinking has to
do with upstream development.

Since this is an upstream issue (I guess Debian will have to implement
something like the readlink anyway for backwards compatibility reasons),
I suggest we continue this discussion somewhere else than at
bugs.debian.org.




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#648319; Package bash-completion. (Wed, 11 Jan 2012 22:18:05 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Wed, 11 Jan 2012 22:18:05 GMT) (full text, mbox, link).


Message #83 received at 648319@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 648319@bugs.debian.org
Cc: dapal@debian.org, Ville Skyttä <ville.skytta@iki.fi>
Subject: Re: bash-completion: /etc/bash_completion script doesn't do the job
Date: Wed, 11 Jan 2012 16:20:22 -0600
Ville Skyttä wrote:

>                                  I guess Debian will have to implement
> something like the readlink anyway for backwards compatibility reasons

Hmm.  I'd rather see the Debian package's behavior remain consistent
with upstream.  How about this?
---
 debian/bash-completion.preinst            |   12 +++++++++++
 debian/changelog                          |    9 ++++++++
 debian/extra/bash_completion              |    1 +
 debian/install                            |    1 +
 debian/links                              |    1 -
 debian/patches/00-fix_symlink_issue.patch |   30 -----------------------------
 debian/patches/series                     |    1 -
 7 files changed, 23 insertions(+), 32 deletions(-)
 create mode 100644 debian/bash-completion.preinst
 create mode 100644 debian/extra/bash_completion
 delete mode 100644 debian/patches/00-fix_symlink_issue.patch
 delete mode 100644 debian/patches/series

diff --git a/debian/bash-completion.preinst b/debian/bash-completion.preinst
new file mode 100644
index 00000000..f0563d4f
--- /dev/null
+++ b/debian/bash-completion.preinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+if dpkg --compare-versions "$2" lt-nl 1:1.99-4 &&
+   dpkg --compare-versions "$2" ge 1:1.99-2 &&
+   [ -L /etc/bash_completion ]&&
+   [ "$(readlink /etc/bash_completion)" = \
+     /usr/share/bash-completion/bash_completion ]; then
+    rm -f /etc/bash_completion
+fi
+
+#DEBHELPER#
diff --git a/debian/changelog b/debian/changelog
index 45e53fa2..23746b1f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+bash-completion (1:1.99-4) UNRELEASED; urgency=low
+
+  * Replace /etc/bash_completion symlink with a shim script
+  * Remove no longer needed symlink-issue patch
+  * Remove /etc/bash_completion symlink to make room for shim script
+    on upgrade from versions 1:1.99-2 and 1:1.99-3.
+
+ -- Jonathan Nieder <jrnieder@gmail.com>  Wed, 11 Jan 2012 16:00:35 -0600
+
 bash-completion (1:1.99-3) unstable; urgency=low
 
   * Fixed issue when loading completions from the /etc/bash_completion
diff --git a/debian/extra/bash_completion b/debian/extra/bash_completion
new file mode 100644
index 00000000..41ffe595
--- /dev/null
+++ b/debian/extra/bash_completion
@@ -0,0 +1 @@
+. /usr/share/bash-completion/bash_completion
diff --git a/debian/install b/debian/install
index bcda3394..d8b573a7 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
+debian/extra/bash_completion			/etc/
 debian/extra/debhelper/dh_bash-completion	/usr/bin/
 debian/extra/debhelper/bash_completion.pm	/usr/share/perl5/Debian/Debhelper/Sequence/
diff --git a/debian/links b/debian/links
index 773dcddb..9a638a9a 100644
--- a/debian/links
+++ b/debian/links
@@ -1,2 +1 @@
 usr/share/doc/bash-completion/README.gz	usr/share/doc/bash/README.bash_completion.gz
-usr/share/bash-completion/bash_completion etc/bash_completion
diff --git a/debian/patches/00-fix_symlink_issue.patch b/debian/patches/00-fix_symlink_issue.patch
deleted file mode 100644
index 5ee60661..00000000
--- a/debian/patches/00-fix_symlink_issue.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Jonathan Nieder <jrnieder@gmail.com>
-Subject: fix issue when loading bash-completion from a symlink
-Forwarded: not-needed
-
----
- bash_completion |    6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
---- bash-completion.orig/bash_completion
-+++ bash-completion/bash_completion
-@@ -1916,7 +1916,8 @@ _minimal()
- _completion_loader()
- {
-     local compdir=./completions
--    [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
-+    local compscript=$(readlink -f $BASH_SOURCE)
-+    [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
- 
-     # Try basename.
-     . "$compdir/${1##*/}" &>/dev/null && return 124
-@@ -1937,7 +1938,8 @@ _xfunc()
-     shift
-     declare -F $1 &>/dev/null || {
-         local compdir=./completions
--        [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
-+        local compscript=$(readlink -f $BASH_SOURCE)
-+        [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
-         . "$compdir/$srcfile"
-     }
-     "$@"
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 4f77fe94..00000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-00-fix_symlink_issue.patch
-- 
1.7.8.3





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 09 Feb 2012 07:35:17 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 09:33:06 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.