Your message dated Wed, 07 Dec 2022 13:43:04 -0800
with message-id <871qpax53r.fsf@contorta>
and subject line Re: Bug#946966: Fix some minor issues and improve the code
slightly
has caused the Debian Bug report #946966,
regarding Fix some minor issues and improve the code slightly
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
946966: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946966
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: u-boot-menu
Version: 4.0.1
Severity: minor
Tags: patch
Dear Maintainer,
Attached patch fixes some issues reported by shellcheck as well as make
some minor optimizations (use bash code instead of external programs
where this makes sense).
Kind regards,
Andrei
-- System Information:
Debian Release: 10.2
APT prefers proposed-updates
APT policy: (500, 'proposed-updates'), (500, 'stable'), (100, 'unstable')
Architecture: arm64 (aarch64)
Kernel: Linux 5.3.0-3-arm64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=ro_RO.UTF-8, LC_CTYPE=ro_RO.UTF-8 (charmap=UTF-8),
LANGUAGE=ro_RO.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages u-boot-menu depends on:
ii linux-base 4.6
u-boot-menu recommends no packages.
Versions of packages u-boot-menu suggests:
pn flash-kernel <none>
-- Configuration Files:
/etc/default/u-boot changed [not included]
-- no debconf information
>From cc07598067c71e422651c81d0ec34779956e612d Mon Sep 17 00:00:00 2001
From: Andrei POPESCU <[email protected]>
Date: Wed, 18 Dec 2019 12:59:10 +0200
Subject: [PATCH 2/2] Fix issues reported by shellcheck and other optimizations
---
u-boot-update | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/u-boot-update b/u-boot-update
index 2cfe3ca..2a25531 100755
--- a/u-boot-update
+++ b/u-boot-update
@@ -103,10 +103,10 @@ EOF
done < /etc/fstab
fi
-# if not in fsrab, try from current kernel arguments
+# if not in fstab, try from current kernel arguments
if [ -z "${U_BOOT_ROOT}" ]
then
- for param in `cat /proc/cmdline`
+ for param in $(< /proc/cmdline)
do
if [[ $param == root=* ]]
then
@@ -157,16 +157,16 @@ do
_NUMBER="${_NUMBER:-0}"
_ENTRY="${_ENTRY:-1}"
- if [ -e /boot/initrd.img-${_VERSION} ]
+ if [ -e "/boot/initrd.img-${_VERSION}" ]
then
_INITRD="initrd ${_BOOT_DIRECTORY}/initrd.img-${_VERSION}"
else
_INITRD=""
fi
- if [ -e ${_BOOT_PATH}${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT} ] && [
-n "${U_BOOT_FDT}" ]
+ if [ -e "${_BOOT_PATH}${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT}" ] &&
[ -n "${U_BOOT_FDT}" ]
then
_FDT="fdt ${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT}"
- elif [ -d ${_BOOT_PATH}${U_BOOT_FDT_DIR}${_VERSION}/ ]
+ elif [ -d "${_BOOT_PATH}${U_BOOT_FDT_DIR}${_VERSION}/" ]
then
_FDT="fdtdir ${U_BOOT_FDT_DIR}${_VERSION}/"
elif [ -f "${_BOOT_PATH}/${U_BOOT_FDT:-dtb-${_VERSION}}" ] && [
/usr/lib/linux-image- = "${U_BOOT_FDT_DIR}" ]
@@ -176,7 +176,7 @@ do
_FDT=""
fi
- if echo ${U_BOOT_ALTERNATIVES} | grep -q default
+ if [[ "${U_BOOT_ALTERNATIVES}" == *default* ]]
then
# Writing default entry
@@ -191,7 +191,7 @@ label l${_NUMBER}
fi
- if echo ${U_BOOT_ALTERNATIVES} | grep -q recovery
+ if [[ "${U_BOOT_ALTERNATIVES}" == *recovery* ]]
then
# Writing recovery entry
@@ -202,12 +202,12 @@ label l${_NUMBER}r
linux ${_BOOT_DIRECTORY}/${_KERNEL}
${_INITRD}
${_FDT}
- append ${U_BOOT_ROOT} $(echo ${U_BOOT_PARAMETERS} | sed -e 's|
quiet||') single
+ append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS# quiet} single
"
fi
- _NUMBER="$((${_NUMBER} + 1))"
+ _NUMBER="$((_NUMBER + 1))"
if [ "${U_BOOT_ENTRIES}" = "${_ENTRY}" ]
then
--
2.20.1
--- End Message ---
--- Begin Message ---
Version: 4.1.0
On 2022-12-07, Vagrant Cascadian wrote:
> On 2022-12-07, Vagrant Cascadian wrote:
>> On 2019-12-18, Andrei POPESCU wrote:
>>> @@ -202,12 +202,12 @@ label l${_NUMBER}r
>>> linux ${_BOOT_DIRECTORY}/${_KERNEL}
>>> ${_INITRD}
>>> ${_FDT}
>>> - append ${U_BOOT_ROOT} $(echo ${U_BOOT_PARAMETERS} | sed -e 's|
>>> quiet||') single
>>> + append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS# quiet} single
>>
>> Will have to take another look at this one, but it sure *looks*
>> cleaner. :)
>
> This seems to be the only thing outstanding... which I'll try to
> remember to test.
This does not appear to work as reliably, so sticking with the older but
working implementation.
As this was the only outstanding issue, marking this as done.
live well,
vagrant
signature.asc
Description: PGP signature
--- End Message ---