Patch to remove Bashism in /usr/share/acpi-support/power-funcs

Bug #1096641 reported by Antonis Kanouras on 2013-01-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Low
Unassigned

Bug Description

Hello,

Please accept this patch to remove a bashism in /usr/share/acpi-support/power-funcs .

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: acpi-support 0.141 [modified: usr/share/acpi-support/power-funcs]
ProcVersionSignature: Ubuntu 3.5.0-22.33-generic 3.5.7.2
Uname: Linux 3.5.0-22-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
Date: Sun Jan 6 19:17:16 2013
MarkForUpload: True
ProcEnviron:
 LANGUAGE=el_GR:en_GB:en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=el_GR.UTF-8
 SHELL=/bin/bash
SourcePackage: acpi-support
UpgradeStatus: No upgrade log present (probably fresh install)

Antonis Kanouras (akanouras) wrote :

The attachment "power-funcs_remove-bashism.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in acpi-support (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Steve Langasek (vorlon) wrote :

this entire checkStateChanged() function appears to be unused by acpi-support. It's also not very well-written, calling 'exit' instead of 'return'. Why should we patch out the bashism, instead of removing the function entirely?

Changed in acpi-support (Ubuntu):
importance: Medium → Low
status: Triaged → Incomplete
Antonis Kanouras (akanouras) wrote :

Hello and thanks for the fast reply :)

I guess an argument for it would be for use as a helper in local scripts.

While writing a local workaround for #467825, it happened to suit my needs. I would have written a proper one if it didn't exist though. However, since then I caved in and patched upowerd, meaning I have no use for it anymore.

Another issue with it is that if it's used by multiple scripts, it'll only work for the first one that happens to be called by acpid per power state change.

So it's up to you in the end. If you decide its functionality is useful indeed, and since I seem to have stirred the waters here :), I could send you an improved version of it (or of the whole file while I'm at it).

Changed in acpi-support (Ubuntu):
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers