summaryrefslogtreecommitdiff
path: root/precise-armhf-libc-dev/customization/hooks/50-force-remove-all-packages.binary
blob: 7087f34c1e83311dcc3508a2e4827dceaba7846a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh


cd binary/boot/filesystem.dir

for pkg in `dpkg --root . -l |cut -d' ' -f3|tail -n+6 | egrep -v "^(libc6|linux-libc-dev|dpkg|zlib)"`
do
	LIST=`sed -e 's+^\/++g' var/lib/dpkg/info/${pkg}.list`
	for file in $LIST
	do
		rm $file 2>/dev/null
	done
	pkg2=`echo $pkg|sed -e 's+:armhf++g' `
	LIST=`sed -e 's+^\/++g' var/lib/dpkg/info/${pkg2}.list`
	for file in $LIST
	do
		rm $file 2>/dev/null
	done
done

LIST=`sed -e 's+^\/++g' var/lib/dpkg/info/dpkg.list`
for file in $LIST
do
	rm $file 2>/dev/null
done