Add a rudimentary which-pkg-broke-build
It's a wrapper around which-pkg-broke which does the same but for
build dependencies.
Closes: #795812
Axel Beckert
7 years ago
|
0 |
debian-goodies (0.67) UNRELEASED; urgency=medium
|
|
1 |
|
|
2 |
* Add a rudimentary which-pkg-broke-build. (It's a wrapper around
|
|
3 |
which-pkg-broke which does the same but for build dependencies;
|
|
4 |
closes: #795812)
|
|
5 |
|
|
6 |
-- Axel Beckert <abe@debian.org> Thu, 08 Sep 2016 09:20:01 +0200
|
|
7 |
|
0 | 8 |
debian-goodies (0.66) unstable; urgency=medium
|
1 | 9 |
|
2 | 10 |
[ Paul Wise ]
|
|
0 |
#!/bin/sh
|
|
1 |
# Copyright (C) 2016 by Axel Beckert <abe@debian.org> under GPL-2+
|
|
2 |
|
|
3 |
if [ -z "$1" ]; then
|
|
4 |
srcdir=.
|
|
5 |
fi
|
|
6 |
|
|
7 |
if [ -d "$1" ]; then
|
|
8 |
srcdir="$1"
|
|
9 |
fi
|
|
10 |
|
|
11 |
if [ -z "$srcdir" ]; then
|
|
12 |
pkg="$1"
|
|
13 |
fi
|
|
14 |
|
|
15 |
# For now we ignore that some dependencies myight be
|
|
16 |
# architecture-specific
|
|
17 |
bd=$(
|
|
18 |
echo -n "build-essential "
|
|
19 |
if [ -n "$pkg" ]; then
|
|
20 |
apt-cache showsrc "$pkg"
|
|
21 |
elif [ -n "$srcdir" ]; then
|
|
22 |
cat debian/control | sed ':a;N;$!ba;s/\(Build-Depends[^ ]*:[^\n:]*\)\n/\1 /g'
|
|
23 |
fi | \
|
|
24 |
fgrep Build-Depends | \
|
|
25 |
tr '|,' ' ' | \
|
|
26 |
sed -e 's/^Build-Depends[^ ]*://; s/([^()]*)//g; s/<[^<>]*>//g; s/\[[^]]*\]//g;'
|
|
27 |
)
|
|
28 |
|
|
29 |
# Schwartzian transform in bourne shell
|
|
30 |
for pkg in $bd; do
|
|
31 |
which-pkg-broke $pkg
|
|
32 |
done | \
|
|
33 |
fgrep -v "has no install time info" | \
|
|
34 |
while read pkg date; do
|
|
35 |
echo `date +%s -d "$date"` $pkg
|
|
36 |
done | \
|
|
37 |
sort -n | \
|
|
38 |
uniq | \
|
|
39 |
while read date pkg; do
|
|
40 |
echo $pkg `date +"%x %X" -d "@$date"`
|
|
41 |
done | \
|
|
42 |
column -t
|