Merge ubuntu-dev-tools:mk-sbuild-not-automatic into ubuntu-dev-tools:master

Proposed by Steve Langasek
Status: Merged
Merge reported by: Steve Langasek
Merged at revision: 53fcd577e83b14685d80cc473bc008f8ccd0592d
Proposed branch: ubuntu-dev-tools:mk-sbuild-not-automatic
Merge into: ubuntu-dev-tools:master
Diff against target: 28 lines (+10/-0)
1 file modified
mk-sbuild (+10/-0)
Reviewer Review Type Date Requested Status
Benjamin Drung Approve
Review via email: mp+433158@code.launchpad.net

Description of the change

Per https://lists.ubuntu.com/archives/ubuntu-devel/2022-November/042346.html, mk-sbuild creates chroots whose behavior is no longer correct by default for lunar. We should adjust the target chroot behavior using apt preferences.

This change should also be SRUed.

To post a comment you must log in.
Revision history for this message
Benjamin Drung (bdrung) :
review: Needs Information
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

@bdrung: why the "needs information"?

Revision history for this message
Benjamin Drung (bdrung) wrote :

Oh, my inline comment was "unsaved". Now you can see my question.

review: Needs Information
Revision history for this message
Dimitri John Ledkov (xnox) :
8430d44... by Steve Langasek

Align with the Launchpad buildd implementation, per review comments

Revision history for this message
Benjamin Drung (bdrung) wrote :

Besides of nitpicks the change looks sane.

Revision history for this message
Steve Langasek (vorlon) :
Revision history for this message
Steve Langasek (vorlon) :
53fcd57... by Steve Langasek

We no longer need to run sed

Revision history for this message
Benjamin Drung (bdrung) wrote :

Looks good now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/mk-sbuild b/mk-sbuild
2index 52e15a1..6e162b4 100755
3--- a/mk-sbuild
4+++ b/mk-sbuild
5@@ -874,6 +874,13 @@ EOM
6 fi
7 fi
8 if [ -z "$SKIP_PROPOSED" ]; then
9+ TEMP_PREFERENCES=`mktemp -t preferences-XXXXXX`
10+ cat >> "$TEMP_PREFERENCES" <<EOM
11+# override for NotAutomatic: yes
12+Package: *
13+Pin: release a=*-proposed
14+Pin-Priority: 500
15+EOM
16 cat >> "$TEMP_SOURCES" <<EOM
17 deb ${MIRROR_ARCHS}${DEBOOTSTRAP_MIRROR} $SOURCES_PROPOSED_SUITE ${COMPONENTS}
18 deb-src ${DEBOOTSTRAP_MIRROR} $SOURCES_PROPOSED_SUITE ${COMPONENTS}
19@@ -899,6 +906,9 @@ fi
20 cat "$TEMP_SOURCES" | sed -e "s|RELEASE|$RELEASE|g" | \
21 sudo bash -c "cat > $MNT/etc/apt/sources.list"
22 rm -f "$TEMP_SOURCES"
23+if [ -n "$TEMP_PREFERENCES" ]; then
24+ sudo mv "TEMP_PREFERENCES" $MNT/etc/apt/preferences.d/proposed.pref
25+fi
26
27 # Copy the timezone (comment this out if you want to leave the chroot at UTC)
28 sudo cp -P --remove-destination /etc/localtime /etc/timezone "$MNT"/etc/

Subscribers

People subscribed via source and target branches