~ubuntu-archive/ubuntu-archive-scripts/trunk

« back to all changes in this revision

Viewing changes to update-one-germinate

  • Committer: Steve Langasek
  • Date: 2024-02-28 05:17:38 UTC
  • Revision ID: steve.langasek@canonical.com-20240228051738-mbgc2t4u9k3hfqx8
Fix update-one-germinate to hopefully not fail going forward.
  
We try to avoid issues with rdepends/ALL by rsyncing it first before
patching with diff, but the contents of the *targets* of the symlinks under
rdepends/ALL may have changed; in which case patching still fails.  So if
we instead use filterdiff to exclude rdepends/ALL at the diff/patch stage,
hopefully this will avoid the latter problem.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
        # rdepends/ALL is a special case as it's a tree of symlinks and thus
22
22
        # immune to patching; sync it first before trying to diff.
23
23
        rsync -avz --delete "$NAME.new/rdepends/ALL/" "$NAME/rdepends/ALL"
24
 
        diff -uNr "$NAME" "$NAME.new" \
 
24
        diff -uNr "$NAME" "$NAME.new" | filterdiff -x '**/rdepends/ALL/**' \
25
25
        | (cd "$NAME" && patch -p1 -r - --no-backup-if-mismatch)
26
26
        rm -rf "$NAME.new"
27
27
else