From e5a529f136cf610d7a64e9c2b35d47b014bf770e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Sat, 3 Oct 2009 22:09:01 +0200 Subject: [PATCH] Fix computation of Origin fields for PPAs named "ppa" and document the exception along with the expected format for the PPA var in comments. --- debian/changelog | 2 ++ livecd.sh | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c2d277c5..7b9731eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ livecd-rootfs (0.99) UNRELEASED; urgency=low one. * Gross hack to reinstall the moblin-ppa-keyring package after the trusted db is put back in place since otherwise we miss the GPG key we wanted. + * Fix computation of Origin fields for PPAs named "ppa" and document the + exception along with the expected format for the PPA var in comments. -- Loïc Minier Thu, 24 Sep 2009 11:52:25 +0200 diff --git a/livecd.sh b/livecd.sh index 11195f5f..2a9415bd 100755 --- a/livecd.sh +++ b/livecd.sh @@ -118,6 +118,8 @@ EXCLUDE="" LIST="" SUBARCH="" PROPOSED="" +# must be in the "team / PPA name" form; e.g. "moblin/ppa"; the default PPA +# name is "ppa", don't omit it PPA="" while getopts :d:e:i:I:m:S:s:a:p name; do case $name in @@ -383,10 +385,14 @@ Pin-Priority: 900 if [ -n "$PPA" ]; then echo deb http://$PPAMIRROR/$PPA/ubuntu ${STE} main >> ${ROOT}etc/apt/sources.list + # handle PPAs named "ppa" specially; their Origin field in the Release + # file does not end with "-ppa" for backwards compatibility + origin="${PPA%/ppa}" + origin="${origin/\//-}" touch ${ROOT}etc/apt/preferences cat << @@EOF >> ${ROOT}etc/apt/preferences Package: * -Pin: release o=LP-PPA-${PPA/\//-} +Pin: release o=LP-PPA-$origin Pin-Priority: 550 @@EOF fi