#766543 piuparts: document how to test complex upgrades

#766543#5
Date:
2014-10-23 21:08:17 UTC
From:
To:
When testing the fix for #761449 with piuparts, the result is a failure.
It fails upgrading the packages, because piuparts does not allow dpkg to
deconfigure packages. Since one package transforms into a virtual
package, it needs to be deconfigured to allow the package taking over to
be unpacked. Since unpacking fails piuparts proclaims failure.

It is not 100% clear to me whether this is a bug in piuparts or whether
my patch for #761449 is broken.

When adding --auto-deconfigure to the dpkg -i invocations, piuparts
succeeds the upgrade.

I am attaching:
 * A .debdiff adding the suggested change.
 * A failing piuparts log file from sid piuparts.
 * A succeeding piuparts log file from patched piuparts.

Helmut

#766543#10
Date:
2014-10-24 08:25:50 UTC
From:
To:
control: severity -1 normal

Hi Helmut,

thanks for your bug report with patch, much appreciated! (That said, a patch
in git format would be preferred even more! (And reading the NMU bits in it
feels a bit strange.. with non-NMU intend ;) as an NMU it would have been
totally fine...))

Rationale: piuparts gets quite many wishlists bugs I'm basically unable to
handle, just because they are too many and some of the requests are a bit
esoteric, eg testing with /usr/local read-only, etc...

And while one could argue that this here (#766543) is a missing feature in
piuparts, I consider it a bug as prevents piuparts from running it's current
tests on *all* of the archive.

Ok, I've subscribed to that bug now. (And bcc:ed it to maybe get some feedback
from Manog :)

Thanks.


cheers,
	Holger

#766543#17
Date:
2014-11-21 15:03:56 UTC
From:
To:
NAK

Please use the --testdebs-repo approach for complex¹ upgrade scenarios.
The 'pass multiple .deb files' and 'pass .changes' approaches are not
able to do realistic updates (or even installation). So let's not add
another hack to a broken feature (using dpkg to manually install packages)

¹ involving more than one package

Andreas

#766543#22
Date:
2014-11-21 15:03:19 UTC
From:
To:
shouldn't we then a.) either remove the feature or b.) more clearly spell out
the problems?

#766543#27
Date:
2014-11-21 15:44:36 UTC
From:
To:
file(s) or a local repository to a wrapper script and have that torture
all the packages found in there with piuparts. Maybe give a hint if you
are interested in testing upgrades from something else than stable,
testing and unstable to your packages.

once that works sufficiently well, we can do a), too.

Andreas

PS: I sometimes use something based on this script, but it is in no way
automatic

MIRROR=http://ftp.de.debian.org/debian
TARBALLDIR=/srv/piuparts/slave/basetgz

LOCAL=/tmp/000
#URL=http://
SUBDIR=.
logprefix=xx000

#FROM=lenny
#FROM=squeeze
FROM=wheezy

#VIA=squeeze
#VIA=squeeze-backports
#VIA=wheezy
#VIA=wheezy-backports
#VIA=jessie

#TO=squeeze
#TO=wheezy
#TO=jessie
TO=sid

#NO_UPGRADE_TEST=--no-upgrade-test
#WARN_ON_LEFTOVERS_AFTER_PURGE=--warn-on-leftovers-after-purge
#INSTALL_RECOMMENDS=--install-recommends

ARCH=amd64
#ARCH=i386

DISTRO=${FROM:-$TO}

if [ -n "$LOCAL" ]; then
        URL=file://$LOCAL
        GET_PACKAGES="cat $LOCAL/Packages"
else
        GET_PACKAGES="wget $URL/$SUBDIR/Packages -O -"
fi

DEBS=$($GET_PACKAGES | perl -ne '$p = $1 if /^Package: (.*)/; print
"$p=$1\n" if /^Version: (.*)/;')

for p in $DEBS
do
        v=${p#*=}
        p=${p%=*}
        l=${logprefix}${FROM:+-$FROM}${VIA:+-$VIA}${TO:+-$TO}_$p
        test ! -f $l.log || continue
        rm -f $l.log $l.faillog
        sudo nice \
                env
PYTHONPATH=/org/piuparts.debian.org/lib/python2.7/dist-packages \
                ~/bin/piuparts \
                --skip-logrotatefiles-test \
                --scriptsdir /etc/piuparts/scripts \
                --warn-on-others \
                --allow-database \
                --proxy http://localhost:3128 \
                ${MIRROR:+--mirror $MIRROR} \
                --tmpdir /tmp/piupartss \
                -b ${TARBALLDIR:-.}/${DISTRO}_${ARCH}.tar.gz \
                ${FROM:+-d $FROM} \
                ${VIA:+-d $VIA} \
                ${TO:+-d $TO} \
                --log-file $l.log \
                ${LOCAL:+--bindmount $LOCAL} \
                --testdebs-repo "deb $URL $SUBDIR/" \
                --do-not-verify-signatures \
                --distupgrade-to-testdebs \
                --dpkg-noforce-unsafe-io \
                $NO_UPGRADE_TEST \
                $WARN_ON_LEFTOVERS_AFTER_PURGE \
                $INSTALL_RECOMMENDS \
                --apt $p=$v
        test $? = 0 || mv $l.log $l.faillog
done

#766543#32
Date:
2014-11-21 16:12:56 UTC
From:
To:
[...]

more+better documentation is the answer, I guess. And your script should
probably be included in either the docs or as an example.

#766543#37
Date:
2014-11-21 16:13:47 UTC
From:
To:
control: tags -1 - patch