Codebase list debian-goodies / 1f40636
Extend dglob to support and emit architecture qualifiers Closes: #792139, #861187 Axel Beckert 6 years ago
2 changed file(s) with 22 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
1414 + Fix mentioned package names in debmany man pages.
1515 * Fix typo in comment in which-pkg-broke-build.
1616 * Change indentation of long package description.
17 * Extend dglob to support and emit architecture qualifiers.
18 (Closes: #792139, #861187)
1719
1820 [ Stefan Fritsch ]
1921 * New tool find-dbgsym-packages. (Closes: #871620)
2424
2525
2626 filter="grep-dctrl -FStatus ' installed'"
27 archfilter="cat"
2728 expand="cat"
2829 grep_dctrl_options=""
2930 all="no"
5758 esac
5859 done
5960
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
6071 # Does the package exist?
6172 if [ "$all" = "no" ] ; then
6273 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")
6476 if [ -z "$packages" ] ; then
6577 exit 1
6678 fi
6779 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' | \
6983 grep -v ^$ | \
7084 (eval $expand)
7185 else
7286 # Use grep-available as the status file does not include all available
7387 # 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' | \
7592 grep -v ^$ | \
7693 (eval $expand)
7794 fi