Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 845141 - sys-apps/dbus: uses sys-apps/which unnecessarily
Summary: sys-apps/dbus: uses sys-apps/which unnecessarily
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: which-hunt
  Show dependency tree
 
Reported: 2022-05-17 06:58 UTC by Sam James
Modified: 2022-06-20 03:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-17 06:58:08 UTC
files/80-dbus:
```
#!/bin/bash

# launches a session dbus instance

dbuslaunch="`which dbus-launch 2>/dev/null`"
if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
  if [ -n "$command" ]; then
    command="$dbuslaunch --exit-with-session $command"
  else
    eval `$dbuslaunch --sh-syntax --exit-with-session`
  fi
fi
```

We shouldn't really be using which there (nor is there a need to use the bash shebang).

Kindly pointed out by Eli Schwartz.
Comment 1 Larry the Git Cow gentoo-dev 2022-06-20 01:19:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8abff68e4ed7ce2563a36c144c88ec0253964aba

commit 8abff68e4ed7ce2563a36c144c88ec0253964aba
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-20 01:18:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-20 01:19:09 +0000

    sys-apps/dbus: drop which, bash dependency
    
    Closes: https://bugs.gentoo.org/845141
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/dbus/dbus-1.14.0-r3.ebuild | 292 ++++++++++++++++++++++++++++++++++++
 sys-apps/dbus/files/80-dbus-r1      |  13 ++
 2 files changed, 305 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=409d4c49168384b389a1f6156dbdc78fa36589cb

commit 409d4c49168384b389a1f6156dbdc78fa36589cb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-20 01:14:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-20 01:16:06 +0000

    sys-apps/dbus: add which RDEPEND (temporarily)
    
    Needed by our `files/80-dbus`. Making this change for correctness
    first as the which-less version is going to be in ~arch first.
    
    Bug: https://bugs.gentoo.org/845141
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/dbus/{dbus-1.12.20-r4.ebuild => dbus-1.12.20-r5.ebuild} | 1 +
 sys-apps/dbus/{dbus-1.12.22-r1.ebuild => dbus-1.12.22-r2.ebuild} | 1 +
 sys-apps/dbus/{dbus-1.14.0-r1.ebuild => dbus-1.14.0-r2.ebuild}   | 1 +
 3 files changed, 3 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2022-06-20 03:02:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d312126538f24aed777addc15e0a572f9e670f58

commit d312126538f24aed777addc15e0a572f9e670f58
Author:     Andrew Udvare <audvare@gmail.com>
AuthorDate: 2022-06-20 02:59:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-20 03:02:20 +0000

    sys-apps/dbus: minor shellcheck fixes
    
    * [x]  Run shellcheck
    * [x]  Use `$(...)` syntax instead of backticks
    * [x]  Quote eval arguments
    
    Bug: https://bugs.gentoo.org/845141
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Andrew Udvare <audvare@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/25988
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/dbus/{dbus-1.14.0-r3.ebuild => dbus-1.14.0-r4.ebuild} | 0
 sys-apps/dbus/files/80-dbus-r1                                 | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)