~ubuntu-branches/ubuntu/wily/devscripts/wily

« back to all changes in this revision

Viewing changes to scripts/mergechanges.sh

  • Committer: Package Import Robot
  • Author(s): James McCoy, Dominique Dumont, Daniel Kahn Gillmor, James McCoy, Johannes Schauer, Iain Lane, Fabian Greffrath, Ian Jackson, Hideki Yamane, Peter Eisenstraut, Antonio Terceiro, Simon McVittie
  • Date: 2015-04-25 21:58:50 UTC
  • mfrom: (10.10.21 sid)
  • Revision ID: package-import@ubuntu.com-20150425215850-wts1g5jzrkaveqh9
Tags: 2.15.4
[ Dominique Dumont ]
* licensecheck:
  + Handle license like GPL version 2 or 3 (which is not GPL-2+)
  + Ignore .pc directories
  + print copyrights in a non random-order

[ Daniel Kahn Gillmor ]
* uscan: explicitly dearmor, rather than --import upstream signing key
  (Closes: #768345)

[ James McCoy ]
* debsnap: When specified version or architectures aren't available, warn
  and exit with error code 2.  (Closes: #774276)
* rmadison:
  + Display the usage to the specified fd instead of ignoring it.
  + Display the known URL aliases in the usage.
  + Display all the URLs in --help when $default_url is a comma-separated
    list.
  + Remove 404ing myon and debug URLs
  + Use https://api.ftp-master.debian.org/madison for debian and new URLs.
    This also fixes support for the -b option.  (Closes: #775084)
  + Strip arch-qualifiers from package names.  (Closes: #780167)
* mk-origtargz: Avoid adding the same file to the "to be deleted" list
  multiple times.  This may also cause patterns to be declared as unused if
  a file is matched by multiple patterns.  (Closes: #776318)
* who-uploads:
  + Fix extraction of uploader's key id.
  * Create a temporary GNUPGHOME to avoid “gpg --list-key” erroring when no
    ~/.gnupg exists.  (Closes: #776209)
* bts: Cancel the mail if the spawned editor exits with a non-zero exit
  code.  This is an alternative way to cancel a command, rather than saving
  an empty message.  (Closes: #778648)
* who-permits-upload: Update URL to use https.
* Replace use of Parse::DebControl with Dpkg::Control to work around
  #780138 and remove a dependency.
* uscan:
  + Always remove the Referer header for Sourceforge, not just when going
    via the redirector.  (Closes: #778860)
  + Let the OS assign a port to the test's HTTP server so tests don't fail
    when something is already using port 8000.
* Ensure all LWP-using scripts honor a proxy set in the environment.
  (Closes: #781611)

[ Johannes Schauer ]
* chdist: Also set Apt::Architectures to prevent foreign architectures from
  the host leaking into the apt tree (Closes: #774685)

[ Iain Lane ]
* rmadison: The short option for --regex is -r, not -s.

[ Fabian Greffrath ]
* wrap-and-sort: Add dirs, docs, examples, info, links, maintscript and
  manpages (all can also be prefixed by the binary package name) to the
  files in the debian/ directory that get sorted alphabetically.
  (Closes: #765338)

[ Ian Jackson ]
* grep-excuses:
  + Minor manpage corrections.  (Closes: #777344)
  + Add --debug option.  (Closes: #777345)
  + Search for autoremovals too, by default.  (Closes: #777346)

[ Hideki Yamane ]
* Add bash completion for dch, debsign, and uupdate.  (Closes: #774544,
  #778963, #779279)

[ Peter Eisenstraut ]
* Consistently use Makefile variables to control the installation layout.
  (Closes: #728607)

[ Antonio Terceiro ]
* chdist: also create /etc/apt/sources.list.d

[ Simon McVittie ]
* mergechanges: Add --indep option to skip architecture-specific packages.
  (Closes: #782354)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
# Commandline parsing
45
45
FILE=0
 
46
INDEP_ONLY=0
46
47
 
47
48
while [ $# -gt 0 ]; do
48
49
    case "$1" in
58
59
            FILE=1
59
60
            shift
60
61
            ;;
 
62
        -i|--indep)
 
63
            INDEP_ONLY=1
 
64
            shift
 
65
            ;;
61
66
        -*)
62
67
            echo "Unrecognised option $1.  Use $progname --help for help" >&2
63
68
            exit 1
84
89
done
85
90
 
86
91
# Extract the Architecture: field from all .changes files,
87
 
# and merge them, sorting out duplicates
88
 
ARCHS=$(grep -h "^Architecture: " "$@" | sed -e "s,^Architecture: ,," | tr ' ' '\n' | sort -u | tr '\n' ' ' | sed 's/ $//')
 
92
# and merge them, sorting out duplicates. Skip architectures
 
93
# other than all and source if desired.
 
94
ARCHS=$(grep -h "^Architecture: " "$@" | sed -e "s,^Architecture: ,," | tr ' ' '\n' | sort -u)
 
95
if test ${INDEP_ONLY} = 1; then
 
96
    ARCHS=$(echo "$ARCHS" | grep -E '^(all|source)$')
 
97
fi
 
98
ARCHS=$(echo "$ARCHS" | tr '\n' ' ' | sed 's/ $//')
89
99
 
90
100
checksum_uniq() {
91
 
    awk '{if(arr[$NF] != 1){arr[$NF] = 1; print;}}'
 
101
    local line
 
102
    local IFS=
 
103
    if test ${INDEP_ONLY} = 1; then
 
104
        while read line; do
 
105
            case "$line" in
 
106
                (*.dsc|*.diff.gz|*.tar.*|*_all.deb|*_all.udeb)
 
107
                    # source or architecture-independent
 
108
                    echo "$line"
 
109
                    ;;
 
110
                (*.deb|*.udeb)
 
111
                    # architecture-specific, ignore
 
112
                    ;;
 
113
                (*)
 
114
                    echo "Unrecognised file, is it architecture-dependent?" >&2
 
115
                    echo "$line" >&2
 
116
                    exit 1
 
117
                    ;;
 
118
            esac
 
119
        done | awk '{if(arr[$NF] != 1){arr[$NF] = 1; print;}}'
 
120
    else
 
121
        awk '{if(arr[$NF] != 1){arr[$NF] = 1; print;}}'
 
122
    fi
92
123
}
93
124
 
94
125
# Extract & merge the Version: field from all files..