pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/47706
The following reply was made to PR pkg/47706; it has been noted by GNATS.
From: Onno van der Linden <o.vd.linden%quicknet.nl@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: pkg/47706
Date: Sat, 30 Mar 2013 15:28:36 +0100
Here's a fix. The first part fixes the double quote problem
which eval doesn't like. The second part is to workaround
the cpuctl output format containing a ( and a ) which
eval doesn't like as well.
--- /usr/pkgsrc/devel/cpuflags/files/subr_NetBSD 2010-12-05
20:12:11.000000000 +0100
+++ /usr/pkg/share/cpuflags/subr_NetBSD 2013-03-30 15:23:40.000000000
+0100
@@ -44,7 +44,7 @@
# cpu_name="NAME" taken from the first cpu0: line
# cpu_brand="BRAND" the CPU branding string
echo "$cpu_details" | $AWK '
- { if (/cpu0:/ && !n) { sub("cpu0: ",""); n=1; print "cpu_name=\""$0"\"" }
}
+ { if (/cpu0:/ && !n) { sub("cpu0: ",""); n=1; print "cpu_name=\\\""$0
"\\\"" } }
/cpu0: ".*"/ { sub("[^\"]*", ""); print "cpu_brand="$0 }
/cpu0: features/ {
sub(".*<","");
@@ -55,6 +55,8 @@
print "cpu_feature_"features[f]"=1";
}
/cpu0: family/ {
+ sub("[(]","");
+ sub("[)]","");
for (i = 2; i < NF; i = i + 2) {
f=$(i+1);
sub(/^0/, "", f);
Home |
Main Index |
Thread Index |
Old Index