Break the conflicts with click the optparser

Bug #1693226 reported by Sergio Schvezov
34
This bug affects 11 people
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
Undecided
Sergio Schvezov
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned
Artful
Fix Released
Undecided
Sergio Schvezov

Bug Description

[Impact]

 * python-click and python-click-package conflict as they use the same
   python package for its implementation.

 * Since python-click-package is an implementation detail for the click
   package and python3-click is a package meant to be used in other
   implementations it makes sense to break the conflict by moving the
   package name for python-click-package to a different name

 * snapcraft has moved from docopt to python3-click, users that have click
   installed don't have an upgrade path.his bug.

[Test Case]

 * Where snapcraft 2.30 is present:

   - apt install click
   - Install snapcraft << 2.30
   - update to snapcraft >= 2.30
   - the upgrade should not be held on any package.
   - click and snapcraft commands should work.

* Install python3-click and click should be possible. The click command
  should keep working and python3 -c 'from click import group' shall work.

[Regression Potential]

 * Users depending on click from python-click-package will be importing an
   unexpected click in any scripts they may have.

[Other Info]

 * While unfortunate, click as a technology is deprecated and not used
   anymore. This resolution path was discussed with slangasek and apw prior
   to any work.

Related branches

description: updated
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Download full text (3.8 KiB)

I did some preemptive testing with ppa:ci-train-ppa-service/ubuntu/2790 (https://bileto.ubuntu.com/#/ticket/2790) which should land in artful:

root@artful:/# dpkg -l snapcraft
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii snapcraft 2.30.1+17.10 all easily craft snaps
root@artful:/# dpkg -l click
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii click 0.4.46+17.10 amd64 Click packages
root@artful:/# snapcraft --help
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...

  Snapcraft is a delightful packaging tool.

Options:
  -d, --debug
  --help Show this message and exit.

Commands:
  build Build artifacts defined for a part.
  clean Remove content - cleans downloads, builds or...
  cleanbuild Create a snap using a clean environment...
  close Close <channel> for <snap-name>.
  create-key Create a key to sign assertions.
  define Shows the definition for the cloud part.
  enable-ci Enable continuous-integration systems to...
  gated Get the list of snaps and revisions gating a...
  help Obtain help for a certain plugin or topic.
  init Initialize a snapcraft project.
  list-keys List the keys available to sign assertions.
  list-plugins List the available plugins that handle...
  list-registered List snap names registered or shared with...
  list-revisions Get the history on the store for <snap-name>.
  login Authenticate session against Ubuntu One SSO.
  logout Clear session credentials.
  prime Final copy and preparation for the snap.
  pull Download or retrieve artifacts defined for a...
  push Push <snap-file> to the store.
  register Register <snap-name> with the store.
  register-key Register a key with the store to sign...
  release Release <snap-name> on <revision> to the...
  search Searches the remote parts cache for matching...
  sign-build Sign a built snap file and assert it using...
  snap Create a snap.
  stage Stage the part's built artifacts into the...
  status Get the status on the store for <snap-name>.
  tour Setup the snapcraft examples used in the...
  update Updates the parts listing from the cloud.
  validate Validate a gated snap.
root@artful:/# click --help
Usage: click COMMAND [options]

Commands are as follows ('click COMMAND --help' for more):

  build Build a Click package.
  buildsource Build a Click source package.
  chroot Use and manage a Click ...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.46+17.10.20170607.3-0ubuntu1

---------------
click (0.4.46+17.10.20170607.3-0ubuntu1) artful; urgency=medium

  * Rename the python package this installs from click to click_package.
    (LP: #1693226)
  * Use the correct overlayfs module name for the chroot configuration.
    (LP: #1696402)

 -- Sergio Schvezov <email address hidden> Wed, 07 Jun 2017 18:53:16 +0000

Changed in click (Ubuntu):
status: New → Fix Released
Revision history for this message
Leo Arias (elopio) wrote :

I ran the test cases documented in this bug using an artful lxc container.

Everything works as expected.

Revision history for this message
Brian Murray (brian-murray) wrote :

I sponsored the click packages from https://launchpad.net/~sergiusens/+archive/ubuntu/ppa/+packages?field.name_filter=click&field.status_filter=published&field.series_filter= which fix this for Yakkety and Zesty. They are in the queue awaiting SRU team review.

I did not upload the Xenial package because it is an upgrade from 0.4.43 to 0.4.46 and I think that bears some further discussion.

Revision history for this message
Leo Arias (elopio) wrote :

I ran the test cases documented in this bug using a xenial container and the bileto PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/2812

Everything works as expected.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Proposed package upload rejected

An upload of click to xenial-proposed has been rejected from the upload queue for the following reason: "Sadly, this package has more than the bugfix for this particular bug - there is a 21k diff in overall which rather implies a new upstream version. This needs to be documented in the changelog. Please re-upload with the changelog modified (and possibly a new SRU bug opened for the backport).".

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Sergio, or anyone else affected,

Accepted click into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/click/0.4.46+17.04.20170607.3-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in click (Ubuntu Zesty):
status: New → Fix Committed
tags: added: verification-needed
Changed in click (Ubuntu Xenial):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Sergio, or anyone else affected,

Accepted click into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/click/0.4.43+16.04.20170613-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in click (Ubuntu Yakkety):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Sergio, or anyone else affected,

Accepted click into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/click/0.4.46+16.10.20170607.3-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

On re-evaluation, I have decided to accept the xenial upload - mostly because click is anyway a deprecated technology.

Revision history for this message
Leo Arias (elopio) wrote :

We tested this in xenial, yakkety and zesty proposed, together with snapcraft for bug #1692102.
No issues found with the rename of the package, and now snapcraft can be updated without problems.

I've just marked this as verified.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.46+17.04.20170607.3-0ubuntu1

---------------
click (0.4.46+17.04.20170607.3-0ubuntu1) zesty; urgency=medium

  * Rename the python package this installs from click to click_package.
    (LP: #1693226)
  * Use the correct overlayfs module name for the chroot configuration.
    (LP: #1696402)

 -- Sergio Schvezov <email address hidden> Wed, 07 Jun 2017 18:53:16 +0000

Changed in click (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for click has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.46+16.10.20170607.3-0ubuntu1

---------------
click (0.4.46+16.10.20170607.3-0ubuntu1) yakkety; urgency=medium

  * Rename the python package this installs from click to click_package.
    (LP: #1693226)
  * Use the correct overlayfs module name for the chroot configuration.
    (LP: #1696402)

 -- Sergio Schvezov <email address hidden> Wed, 07 Jun 2017 18:53:16 +0000

Changed in click (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.43+16.04.20170613-0ubuntu1

---------------
click (0.4.43+16.04.20170613-0ubuntu1) xenial; urgency=medium

  * Rename the python package this installs from click to click_package.
    (LP: #1693226)

 -- Kyle Fazzari <email address hidden> Tue, 13 Jun 2017 17:14:46 +0000

Changed in click (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
the_dark_knight (bharatdarapu) wrote :

I get the following error for sudo apt-get -f install

Preparing to unpack .../click_0.4.46+16.10.20170607.3-0ubuntu1_amd64.deb ...
Traceback (most recent call last):
  File "/usr/bin/click", line 37, in <module>
    import click
ImportError: No module named 'click'
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/click", line 37, in <module>
    import click
ImportError: No module named 'click'
dpkg: error processing archive /var/cache/apt/archives/click_0.4.46+16.10.20170607.3-0ubuntu1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Job for click-system-hooks.service failed because the control process exited with error code.
See "systemctl status click-system-hooks.service" and "journalctl -xe" for details.
click-system-hooks.service couldn't start.
Errors were encountered while processing:
 /var/cache/apt/archives/click_0.4.46+16.10.20170607.3-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I installed python click with sudo pip3 install click and tried running sudo apt-get -f install

Preparing to unpack .../click_0.4.46+16.10.20170607.3-0ubuntu1_amd64.deb ...
Traceback (most recent call last):
  File "/usr/bin/click", line 55, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/click", line 55, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing archive /var/cache/apt/archives/click_0.4.46+16.10.20170607.3-0ubuntu1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Job for click-system-hooks.service failed because the control process exited with error code.
See "systemctl status click-system-hooks.service" and "journalctl -xe" for details.
click-system-hooks.service couldn't start.
Errors were encountered while processing:
 /var/cache/apt/archives/click_0.4.46+16.10.20170607.3-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
nimbosa (darth-serious) wrote :

on Ubuntu Xenial this still gives this error:
```
Traceback (most recent call last):
  File "/usr/bin/click", line 37, in <module>
    import click_package as click
ImportError: No module named 'click_package'
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/click", line 37, in <module>
    import click_package as click
ImportError: No module named 'click_package'
dpkg: error processing archive /var/cache/apt/archives/click-apparmor_0.3.13.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
```

i did a little experiment:
`sudo apt update && sudo apt install python3-click-package python3-click libclick-0.4-dev libclick-0.4`

then reinstalling:
`sudo apt install click click-apparmor --reinstall --force-yes`

fixes this now on Xenial Xerus

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.