Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-17 Thread Sebastiaan Couwenberg
Control: tags -1 pending

Hi Andreas,

On 09/17/2016 06:39 PM, Andreas Beckmann wrote:
> still not completely resolved,

Will the third time be the charm?

I haven't been able to reproduce this issue with my piuparts setup, not
now and not before, I guess piuparts.d.o. does something more
complicated than:

 piuparts -d jessie -d stretch -a qgis

I have now been able reproduce this issue manually in a jessie
cowbuilder chroot by installing qgis (with recommended dependencies),
and upgrading it to stretch via the usual procedure (apt-get upgrade
followed by apt-get dist-upgrade).

> I'll try to find some time to look there myself.
> 
>   Preparing to unpack .../qgis_2.14.6+dfsg-3_amd64.deb ...
>   Unpacking qgis (2.14.6+dfsg-3) over (2.4.0-1+b1) ...
>   dpkg: error processing archive 
> /var/cache/apt/archives/qgis_2.14.6+dfsg-3_amd64.deb (--unpack):
>trying to overwrite '/usr/bin/qbrowser.bin', which is the diverted version 
> of '/usr/bin/qbrowser' (package: qgis-plugin-grass)

Do you have a more complete log than the above?
piuparts.debian.org/jessie2stretch still reports:

 successfully-tested 2.14.5+dfsg-2

Since the unpack is already failing, I think the diversion should also
be removed by the maintainer scripts for qgis-plugin-grass, not just
qgis as it is now. I suspect the complete log to confirm that
qgis-plugin-grass is upgraded before qgis is, that's what I'm seeing in
my jessie to stretch upgrade.

Some testing of the above reveals that adding the maintainers scripts to
qgis-plugin-grass to remove the diversion is not sufficient. The jessie
version of qgis-plugin-grass only removes the diversion in postrm which
is called after the new package's files are unpacked which is too late
because the unpackaging causes the error.

I think the jessie version of qgis needs to be fixed to remove the
diversion in qgis-plugin-grass.prerm too, because a version of the
package is already "Installed".

Because the qgis-plugin-grass package is being upgraded, the new preinst
could also remove the diversions before the new package's files are
unpacked. But unfortunately that fails with:

dpkg-divert: error: rename involves overwriting `/usr/bin/qgis.bin' with
  different file `/usr/bin/qgis', not allowed

Just removing without renaming in qgis.preinst could be the actual
solution, it seems to give the desired results:

Preparing to unpack .../qgis_2.14.6+dfsg-4_amd64.deb ...
Removing 'diversion of /usr/bin/qgis to /usr/bin/qgis.bin by
qgis-plugin-grass'
Removing 'diversion of /usr/bin/qbrowser to /usr/bin/qbrowser.bin by
qgis-plugin-grass'
Unpacking qgis (2.14.6+dfsg-4) over (2.4.0-1+b1) ...

It's a much simpler change in addition to the one fixing #817176, I
should have thought of that sooner before you led me astray with your
suggestions in this issue.

I'm going to upload the above which should finally fix this issue.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Processed: Re: Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-17 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 pending
Bug #836993 [qgis] qgis: fails to upgrade from 'jessie': dpkg-divert: error: 
rename involves overwriting `/usr/bin/qgis'
Added tag(s) pending.

-- 
836993: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836993
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-17 Thread Andreas Beckmann
Followup-For: Bug #836993
Control: found -1 2.14.6+dfsg-3

Hi,

still not completely resolved, I'll try to find some time to look there
myself.

  Preparing to unpack .../qgis_2.14.6+dfsg-3_amd64.deb ...
  Unpacking qgis (2.14.6+dfsg-3) over (2.4.0-1+b1) ...
  dpkg: error processing archive 
/var/cache/apt/archives/qgis_2.14.6+dfsg-3_amd64.deb (--unpack):
   trying to overwrite '/usr/bin/qbrowser.bin', which is the diverted version 
of '/usr/bin/qbrowser' (package: qgis-plugin-grass)
  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
  Processing triggers for libc-bin (2.24-2) ...
  Errors were encountered while processing:
   /var/cache/apt/archives/qgis_2.14.6+dfsg-3_amd64.deb


Andreas

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-11 Thread Sebastiaan Couwenberg
Control: tags -1 pending

On 09/11/2016 01:59 AM, Andreas Beckmann wrote:
> looks like you are doing a more complicated diversion transition ...

Yes. And a lovely mess it has created now that we don't need it any
more. The situation is complicated by the fact that upstream moved the
diversion around in non-LTRs which were never in Debian. Fortunately we
don't have to care about the upstream use-case in Debian.


The jessie version (2.4.0-1) added the diversion in
qgis-plugin-grass.preinst:

 if [ "$1" = "install" -o "$1" = "upgrade" ]; then
 dpkg-divert --package qgis-plugin-grass --add --rename \
 --divert /usr/bin/qgis.bin /usr/bin/qgis
 dpkg-divert --package qgis-plugin-grass --add --rename \
 --divert /usr/bin/qbrowser.bin /usr/bin/qbrowser
 fi

And removed it qgis-plugin-grass.postrm:

 if [ "$1" = "remove" ]; then
 dpkg-divert --package qgis-plugin-grass --remove --rename \
 --divert /usr/bin/qgis.bin /usr/bin/qgis
 dpkg-divert --package qgis-plugin-grass --remove --rename \
 --divert /usr/bin/qbrowser.bin /usr/bin/qbrowser
 fi


The sid version (2.14.6+dfsg-1) just removed it in qgis.preinst:

 if [ "$1" = "install" -o "$1" = "upgrade" ]; then
 # Remove obsolete diversions
 for i in /usr/bin/qgis /usr/bin/qbrowser; do
 pkg=$(dpkg-divert --listpackage $i)
 if [ -n "$pkg" -a "$pkg" = qgis-plugin-grass -o \
   "$pkg" = qgis-provider-grass ]; then
 dpkg-divert --package $pkg --rename --remove $i
 fi
 done
 fi

The above has been moved in -2 to postinst, which doesn't get called
with the install or upgrade arguments, which I've not fixed by checking
for the configure argument.

It seems the underlaying issue was not removing the diversion in prerm
as well, I've now added that too. If that is still not sufficient to fix
this issue, I guess we need the removals in qgis-plugin-grass package too.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Processed: Re: Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-11 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 pending
Bug #836993 [qgis] qgis: fails to upgrade from 'jessie': dpkg-divert: error: 
rename involves overwriting `/usr/bin/qgis'
Added tag(s) pending.

-- 
836993: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836993
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-10 Thread Andreas Beckmann
Followup-For: Bug #836993
Control: found -1 2.14.6+dfsg-2
Control: affects -1 + qgis-plugin-grass

Hi Bas,

looks like you are doing a more complicated diversion transition ...

  Preparing to unpack .../qgis_2.14.6+dfsg-2_amd64.deb ...
  Unpacking qgis (2.14.6+dfsg-2) over (2.4.0-1+b1) ...
  dpkg: error processing archive 
/var/cache/apt/archives/qgis_2.14.6+dfsg-2_amd64.deb (--unpack):
   trying to overwrite '/usr/bin/qbrowser.bin', which is the diverted version 
of '/usr/bin/qbrowser' (package: qgis-plugin-grass)
  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
  Processing triggers for libc-bin (2.24-2) ...
  Errors were encountered while processing:
   /var/cache/apt/archives/qgis_2.14.6+dfsg-2_amd64.deb


Andreas


qgis-plugin-grass_2.14.6+dfsg-2.log.gz
Description: application/gzip
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-07 Thread Sebastiaan Couwenberg
Control: tags -1 pending

Hi Andreas,

Thanks for your work on piuparts.

I've moved the diversion removal to postinst per your suggestion, thanks!

A new upload to unstable will follow shortly.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Processed: Re: Bug#836993: qgis: fails to upgrade from 'jessie': dpkg-divert: error: rename involves overwriting `/usr/bin/qgis'

2016-09-07 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 pending
Bug #836993 [qgis] qgis: fails to upgrade from 'jessie': dpkg-divert: error: 
rename involves overwriting `/usr/bin/qgis'
Added tag(s) pending.

-- 
836993: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836993
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel