Extend dglob to support and emit architecture qualifiers
Closes: #792139, #861187
Axel Beckert
6 years ago
14 | 14 |
+ Fix mentioned package names in debmany man pages.
|
15 | 15 |
* Fix typo in comment in which-pkg-broke-build.
|
16 | 16 |
* Change indentation of long package description.
|
|
17 |
* Extend dglob to support and emit architecture qualifiers.
|
|
18 |
(Closes: #792139, #861187)
|
17 | 19 |
|
18 | 20 |
[ Stefan Fritsch ]
|
19 | 21 |
* New tool find-dbgsym-packages. (Closes: #871620)
|
24 | 24 |
|
25 | 25 |
|
26 | 26 |
filter="grep-dctrl -FStatus ' installed'"
|
|
27 |
archfilter="cat"
|
27 | 28 |
expand="cat"
|
28 | 29 |
grep_dctrl_options=""
|
29 | 30 |
all="no"
|
|
57 | 58 |
esac
|
58 | 59 |
done
|
59 | 60 |
|
|
61 |
pattern="$1"
|
|
62 |
if echo "$pattern" | fgrep -q ":"; then
|
|
63 |
package=$(echo "$pattern" | awk -F: '{print $1}')
|
|
64 |
arch=$(echo "$pattern" | awk -F: '{print $2}')
|
|
65 |
archfilter="grep-dctrl -FArchitecture $arch"
|
|
66 |
else
|
|
67 |
package="$pattern"
|
|
68 |
fi
|
|
69 |
|
|
70 |
|
60 | 71 |
# Does the package exist?
|
61 | 72 |
if [ "$all" = "no" ] ; then
|
62 | 73 |
packages=$(eval $filter /var/lib/dpkg/status | \
|
63 | |
grep-dctrl -PnsPackage $grep_dctrl_options "$1")
|
|
74 |
$archfilter | \
|
|
75 |
grep-dctrl -PnsPackage $grep_dctrl_options "$package")
|
64 | 76 |
if [ -z "$packages" ] ; then
|
65 | 77 |
exit 1
|
66 | 78 |
fi
|
67 | 79 |
eval $filter /var/lib/dpkg/status | \
|
68 | |
grep-dctrl -PnsPackage $grep_dctrl_options "$1" | \
|
|
80 |
$archfilter | \
|
|
81 |
grep-dctrl -PnsPackage,Architecture $grep_dctrl_options "$package" | \
|
|
82 |
sed -ze 's/\n/:/g;s/::/\n/g' | \
|
69 | 83 |
grep -v ^$ | \
|
70 | 84 |
(eval $expand)
|
71 | 85 |
else
|
72 | 86 |
# Use grep-available as the status file does not include all available
|
73 | 87 |
# packages
|
74 | |
grep-aptavail -PnsPackage $grep_dctrl_options "$1" | \
|
|
88 |
apt-cache dumpavail | \
|
|
89 |
$archfilter | \
|
|
90 |
grep-dctrl -PnsPackage,Architecture $grep_dctrl_options "$package" | \
|
|
91 |
sed -ze 's/\n/:/g;s/::/\n/g' | \
|
75 | 92 |
grep -v ^$ | \
|
76 | 93 |
(eval $expand)
|
77 | 94 |
fi
|