source: ubiquity/trunk/fuentes/d-i/check-manifest

Last change on this file was 1053, checked in by kbut, 4 years ago

add ubiquity

  • Property svn:executable set to *
File size: 717 bytes
Line 
1#! /bin/sh
2set -e
3
4code=0
5
6newline='
7'
8IFS_SAVE="$IFS"
9IFS="$newline"
10for line in $(cat manifest); do
11        IFS="$IFS_SAVE"
12        src="${line%% *}"
13        ver="${line#* }"
14        if [ ! -e "source/$src/debian/changelog" ]; then
15                cat >&2 <<EOF
16Source package $src missing!
17EOF
18                code=1
19                continue
20        fi
21        tree_ver="$(dpkg-parsechangelog -l"source/$src/debian/changelog" | \
22                sed -n -e '/^Version:/s/Version: //p')"
23        if [ "$ver" != "$tree_ver" ]; then
24                cat >&2 <<EOF
25Local copy of source package $src has version $tree_ver,
26but manifest has $ver!
27EOF
28                code=1
29                continue
30        fi
31        IFS="$newline"
32done
33IFS="$IFS_SAVE"
34
35if [ $code -ne 0 ]; then
36        cat >&2 <<EOF
37
38Run debian/rules update to refresh local copies of source packages.
39EOF
40fi
41
42exit $code
Note: See TracBrowser for help on using the repository browser.