Skip to contentSkip to conversation

adapt scripts/ver_linux to new util-linux version strings

PATCH In review Adrian Bunk 2 participants 5 messages Aug 20, 2005 – Aug 21, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 adapt scripts/ver_linux to new util-linux version strings

scripts/ver_linux renamed from scripts/ver_linux.old +4 -2
@@ -25,9 +25,11 @@
 '/BFD/{print "binutils              ",$NF} \
 /^GNU/{print "binutils              ",$4}'
 
-fdformat --version | awk -F\- '{print "util-linux            ", $NF}'
+fdformat --version | awk '{print "util-linux            ", $NF}' \
+| awk -F\) '{print $1}'
 
-mount --version | awk -F\- '{print "mount                 ", $NF}'
+mount --version | awk '{print "mount                 ", $NF}' | \
+awk -F\) '{print $1}'
 
 depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
 
#1 lore raw

scripts/ver_linux line 32

Quoted 10 lines · Adrian Bunk
scripts/ver_linux renamed from scripts/ver_linux.old +4 -2
 
-fdformat --version | awk -F\- '{print "util-linux            ", $NF}'
+fdformat --version | awk '{print "util-linux            ", $NF}' \
+| awk -F\) '{print $1}'
 
-mount --version | awk -F\- '{print "mount                 ", $NF}'
+mount --version | awk '{print "mount                 ", $NF}' | \
+awk -F\) '{print $1}'
-util-linux             2.12i
-mount                  2.12i
+util-linux             util-linux-2.12i
+mount                  mount-2.12i
			^^^^^^

Is this intentional?

#2 lore raw
Quoted 18 lines · Alexey Dobriyan
Quoted 10 lines · Adrian Bunk
scripts/ver_linux renamed from scripts/ver_linux.old +4 -2
 
-fdformat --version | awk -F\- '{print "util-linux            ", $NF}'
+fdformat --version | awk '{print "util-linux            ", $NF}' \
+| awk -F\) '{print $1}'
 
-mount --version | awk -F\- '{print "mount                 ", $NF}'
+mount --version | awk '{print "mount                 ", $NF}' | \
+awk -F\) '{print $1}'
(quoted diff) +2 -2
-util-linux             2.12i
-mount                  2.12i
+util-linux             util-linux-2.12i
+mount                  mount-2.12i
			^^^^^^
Quoted 1 line

Is this intentional?

After this patch, the new format is parsed correctly instead of completely wrong.

You've found the small regression parsing the old format.

IMHO this is not a problem. If you disagree, feel free to send a better patch.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw

PATCH 1/1 Adapt scripts/ver_linux to new util-linux version strings

Tested with 2.12i and 2.13-pre2.

---

 scripts/ver_linux |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
scripts/ver_linux +4 -2
@@ -25,9 +25,11 @@
 '/BFD/{print "binutils              ",$NF} \
 /^GNU/{print "binutils              ",$4}'
 
-fdformat --version | awk -F\- '{print "util-linux            ", $NF}'
+echo -n "util-linux             "
+fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
 
-mount --version | awk -F\- '{print "mount                 ", $NF}'
+echo -n "mount                  "
+mount --version | awk '{print $NF}' | sed -e s/^mount-// -e s/\)$//
 
 depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
 
#4 lore raw

Re: [PATCH] Adapt scripts/ver_linux to new util-linux version strings

Quoted 2 lines · Alexey Dobriyan

Tested with 2.12i and 2.13-pre2.
...

Looks good.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed