On 10/11/2013 01:42 PM, Dmitry Shachnev wrote:
> On Fri, Oct 11, 2013 at 7:47 AM, Thomas Goirand <z...@debian.org> wrote:
>> By the way, I have just added the use of update-alternatives in the
>> package so that it provides /usr/bin/coverage for those (upstream code
>> or users) who needs it. After this, I think the package is up to shape
>> for an upload: I tested it against some of the upstream code I maintain,
>> and it generated correctly the expected coverage report.
> 
> Did you really test your changes?

I did, but not installing both at the same time. My bad.

> Also, you have a typo in postinst files ('coverate' != 'coverage').

This seems to be changed (by ben), though there's now other problems in
the bzr version.

zigo@GPLHost:01:node0184>_ ~/sources/openstack/havana/python-coverage$
sudo dpkg -i python3-coverage_3.7+dfsg.1-1_amd64.deb
python-coverage_3.7+dfsg.1-1_amd64.deb
Selecting previously unselected package python3-coverage.
(Reading database ... 219992 files and directories currently installed.)
Unpacking python3-coverage (from
python3-coverage_3.7+dfsg.1-1_amd64.deb) ...
Selecting previously unselected package python-coverage.
Unpacking python-coverage (from python-coverage_3.7+dfsg.1-1_amd64.deb) ...
Setting up python3-coverage (3.7+dfsg.1-1) ...
update-alternatives: using /usr/bin/python3-coverage to provide
/usr/bin/coverage3 (python3-coverage) in auto mode
Setting up python-coverage (3.7+dfsg.1-1) ...
update-alternatives: error: alternative link /usr/bin/coverage is
already managed by python-coverate
dpkg: error processing python-coverage (--install):
 subprocess installed post-installation script returned error exit status 2

First, Ben changed from /usr/bin/coverage to /usr/bin/coverage3 in the
python3-coverage.postinst. This loose the point! The point was to be
able to have python-coverage and python3-coverage both provide
/usr/bin/coverage... If you want python3-coverage to provide a
/usr/bin/coverage3, you do not need to use update-alternative. Simply
add a symlink and we are good to go.

Also, Ben replaced what I wrote by:

master_link_path=/usr/bin/coverage
package_name=python-coverage
alternative_path=/usr/bin/python2-coverage
priority=200

update-alternatives --install ${master_link_path} ${package_name} \
                        ${alternative_path} ${priority}

which is wrong. The man page says that we should write:

--install link name path priority

with the below definitions:

link is the generic name for the master link
name is the name of its symlink in the alternatives directory
path is the alternative being introduced for the master link.

Never, the man page talks about a package name, but about the name of
the link in /etc/alternatives.

After restoring what I wrote, and minus the typo, it worked as expected!

Also, Ben, please do not add new variables if they are used only once.
Variables have been invented so that we can modify their content so that
their values are changed at multiple places at once, or if the value can
evolve over time. If we don't have this, then you are only obfuscating
your code.

It is also very annoying that you insist in removing the last line of
the changelog in the BZR. Doing this, the package can't build, as
dpkg-parsechangelog fails. Please don't do that, that's irritating. ! :)

Cheers,

Thomas Goirand (zigo)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to