458
by Martin Pitt
add script for calculating the sources shipped on ubuntu-touch |
1 |
#!/bin/bash
|
2 |
set -eu
|
|
3 |
||
478
by Martin Pitt
update-touch-packages: blacklist a few packages which we do not want on touch |
4 |
# these have a high priority for the desktop, but we don't want them on touch
|
5 |
BLACKLIST="exiv2 |
|
6 |
colord
|
|
7 |
gnome-icon-theme
|
|
8 |
gtk+2.0
|
|
9 |
python-apt
|
|
10 |
software-properties
|
|
11 |
sound-theme-freedesktop
|
|
12 |
totem-pl-parser
|
|
13 |
xz"
|
|
550.1.6
by Michael Terry
use whitelist for pam |
14 |
WHITELIST="pam" |
478
by Martin Pitt
update-touch-packages: blacklist a few packages which we do not want on touch |
15 |
|
458
by Martin Pitt
add script for calculating the sources shipped on ubuntu-touch |
16 |
if [ $# != 1 ]; then |
17 |
echo "Usage: $0 <release>" >&2 |
|
18 |
exit 1 |
|
19 |
fi
|
|
20 |
RELEASE="$1" |
|
21 |
||
22 |
MYDIR=$(dirname $(readlink -f $0)) |
|
23 |
||
24 |
WORKDIR=$(mktemp -t -d germinate.XXXXXX) |
|
25 |
trap "rm -rf $WORKDIR" EXIT TERM INT QUIT PIPE |
|
26 |
||
27 |
cd "$WORKDIR" |
|
28 |
# download package indexes for mapping binaries to sources
|
|
29 |
declare -A binsrc
|
|
30 |
for c in main universe; do |
|
569
by Martin Pitt
update-touch-packages: Packages.bz2 is no more, use xz |
31 |
wget -O- http://ports.ubuntu.com/dists/$RELEASE/$c/binary-armhf/Packages.xz | \ |
32 |
xz -cd | grep-dctrl -n -sPackage,Source:Package . > Packages-$c |
|
458
by Martin Pitt
add script for calculating the sources shipped on ubuntu-touch |
33 |
while true; do |
34 |
read bin || break |
|
35 |
read src _
|
|
36 |
read _ # skip empty line |
|
37 |
binsrc["$bin"]="$src" |
|
38 |
done < Packages-$c |
|
39 |
done
|
|
40 |
||
41 |
# determine list of binary packages in ubuntu-touch seed
|
|
42 |
germinate --no-rdepends --no-installer -s ubuntu-touch.$RELEASE -d $RELEASE -a armhf -c main,universe -m http://ports.ubuntu.com/ |
|
550.1.6
by Michael Terry
use whitelist for pam |
43 |
# Don't consider 'required' since most of those aren't user visible (but there
|
44 |
# is a whitelist at the top for anything we want anyway)
|
|
45 |
grep -h '^[0-9a-z]' touch sdk-libs minimal touch-core touch-android touch | cut -f1 -d ' ' | grep -v ^language-pack > binaries |
|
458
by Martin Pitt
add script for calculating the sources shipped on ubuntu-touch |
46 |
|
47 |
# map binaries to sources, generate output
|
|
550.1.6
by Michael Terry
use whitelist for pam |
48 |
sources="$WHITELIST" |
458
by Martin Pitt
add script for calculating the sources shipped on ubuntu-touch |
49 |
for pkg in $(cat binaries); do |
478
by Martin Pitt
update-touch-packages: blacklist a few packages which we do not want on touch |
50 |
s=${binsrc[$pkg]} |
51 |
if ! echo "$s" | grep -qF "$BLACKLIST"; then |
|
52 |
sources="$sources ${binsrc[$pkg]}" |
|
53 |
fi
|
|
458
by Martin Pitt
add script for calculating the sources shipped on ubuntu-touch |
54 |
done
|
55 |
echo "$sources" | xargs -n1 | sort -u > "$MYDIR/maps/pkglist-touch-$RELEASE" |