Hi,

On 11/03/06 at 02:04 +0100, Stefan Potyra wrote:
> and one more thing I learned from slomo right now:
> use dpkg-buildpackage -v to include the changelogs of newer debian versions 
> in 
> the changelog (check your .changes file before uploading, if it worked the 
> way expected ;))

I'm not sure I understand why this is important ?

Anyway, the attached bash script might be of some help (I haven't
throughtly tested it).

Just run as ./syncfromdebian.bash packagename
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED]             GPG: 1024D/023B3F4F |
#!/bin/bash

set -e

pkg=$1
d=$(mktemp -d /tmp/sync.XXXXXX)
cd $d
mdt dist-apt-get sid source $pkg
debver=$(ls *.dsc |sed 's/.*_\(.*\).dsc/\1/')
echo "Debian version of $pkg is $debver"
upsver=$(echo $debver |sed 's/\(.*\)-.*/\1/')
echo "$pkg: debian:$debver upstream:$upsver"
cd $pkg-$upsver
dch --newversion ${debver}build1 --distribution dapper \
    "Manual sync from Debian. No Ubuntu-specific changes."
# get the third version in the changelog
fromver=$(grep "^$pkg " debian/changelog |head -3 |\
          tail -1|cut -d \( -f 2 | cut -d \) -f 1)
# get the upstream from version
upsfromver=$(echo $fromver |sed 's/\(.*\)-.*/\1/')
if [ $upsfromver == $upver ]; then
        sa=-sa
else
        sa=
fi

dpkg-buildpackage -rfakeroot -S $sa -v$fromver
echo "--------------"
echo "Now:"
echo "   cd $d"
echo "   debdiff ${pkg}_$debver.dsc ${pkg}_${debver}build1.dsc"
echo "   dput ${pkg}_${debver}build1_source.changes"
-- 
Ubuntu-motu mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

Reply via email to