Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477958 - app-laptop/laptop-mode-tools-1.63-r2 - replace hardcoded path to /sbin/udevadm
Summary: app-laptop/laptop-mode-tools-1.63-r2 - replace hardcoded path to /sbin/udevadm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-07-24 00:35 UTC by Alexander Mezin
Modified: 2013-08-30 18:48 UTC (History)
2 users (show)

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


Attachments
Replace "/sbin/udevadm" with "which udevadm" (fix-hardcoded-udevadm,678 bytes, patch)
2013-07-24 00:35 UTC, Alexander Mezin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mezin 2013-07-24 00:35:27 UTC
Created attachment 354054 [details, diff]
Replace "/sbin/udevadm" with "which udevadm"

In one place laptop-mode-tools locates udevadm using "which udevadm", but in another line there is hardcoded path. This causes problems with systemd. Attached patch fixes the problem.
Comment 1 Manuel Rüger (RETIRED) gentoo-dev 2013-07-24 02:15:15 UTC
You might want to upstream it, too. https://github.com/rickysarraf/laptop-mode-tools
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2013-07-24 07:37:14 UTC
I think that it can be even mode reduced to udevadm...
Comment 3 Ritesh Raj Sarraf 2013-07-24 08:31:03 UTC
I can't find the email now but from what I recollect there were some differences in the behavior of `which` on different distributions.

On Debian, `which` is shipped as part of the debianutils package. I believe a user reported a differently behaving `which` from Arch.

The patch looks good and I'll pull it. It'd just help if you can confirm which's origin and behavior on your distribution
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2013-07-24 08:38:07 UTC
(In reply to Ritesh Raj Sarraf from comment #3)
> I can't find the email now but from what I recollect there were some
> differences in the behavior of `which` on different distributions.
> 
> On Debian, `which` is shipped as part of the debianutils package. I believe
> a user reported a differently behaving `which` from Arch.
> 
> The patch looks good and I'll pull it. It'd just help if you can confirm
> which's origin and behavior on your distribution

sys-apps/which-2.20 (/usr/bin/which)
HOMEPAGE="http://www.xs4all.nl/~carlo17/which/"

You can try using POSIX sh command.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2013-08-30 18:20:01 UTC
(In reply to Alon Bar-Lev from comment #4)
> (In reply to Ritesh Raj Sarraf from comment #3)
> > I can't find the email now but from what I recollect there were some
> > differences in the behavior of `which` on different distributions.
> > 
> > On Debian, `which` is shipped as part of the debianutils package. I believe
> > a user reported a differently behaving `which` from Arch.
> > 
> > The patch looks good and I'll pull it. It'd just help if you can confirm
> > which's origin and behavior on your distribution
> 
> sys-apps/which-2.20 (/usr/bin/which)
> HOMEPAGE="http://www.xs4all.nl/~carlo17/which/"
> 
> You can try using POSIX sh command.

Ritesh,

Status?
Comment 6 Ritesh Raj Sarraf 2013-08-30 18:43:21 UTC
This is committed. Was committed on July 30th. Will be part of next release.
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2013-08-30 18:48:03 UTC
(In reply to Ritesh Raj Sarraf from comment #6)
> This is committed. Was committed on July 30th. Will be part of next release.

Thanks!

Fixed in laptop-mode-tools-1.63-r3