quickly package --extras creates broken deb

Bug #998910 reported by Tony Byrne
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Quickly
Fix Released
Undecided
Unassigned
quickly (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

The commands 'quickly package --extras' and 'quickly submitubuntu' do not create working debian packages. When run from their /opt locations, they give a warning like:

File "/opt/extras.ubuntu.com/ubuapp/ubuapp_lib/ubuappconfig.py", line 57, in get_data_path
    raise project_path_not_found

And even if you manually change code to fix that, it will complain about missing gsettings schema files.

So those two commands are completely useless for ARB submission, despite being a commonly recommended way to follow the ARB process.

[Test Case]

cd /tmp
quickly create ubuntu-application ubuapp
# close opened window
cd ubuapp
quickly package --extras
sudo dpkg -i ../ubuapp_0.1_all.deb
# on 12.04, this is the binary path
/opt/extras.ubuntu.com/ubuapp/ubuapp/ubuapp
# in my fixed version, this will be the binary path
#/opt/extras.ubuntu.com/ubuapp/bin/ubuapp

Notice that it will crash in the unfixed version. But will run in my fixed version.

[Regression Potential]

My fix carefully only affects the --extras path (which is also used for submitubuntu). I intentionally chose an ugly way to fix this so that I could only affect that path and not regress anything else.

In 12.10, my hope is to eventually implement a non-ugly fix. But I'm confident this will only affect users of --extras.

[Original Report]

Quickly version 12.04

quickly package --extras makes a deb that contains a broken application. When installed the application contains errors

running installed application
bug 1
$ /opt/extras.ubuntu.com/test-project$ ./test-project

File "/opt/extras.ubuntu.com/test-project/test_project_lib/test_projectconfig.py", line 57, in get_data_path
    raise project_path_not_found

fix bug 1
edit /opt/extras.ubuntu.com/test-project/test_project_lib/test_projectconfig.py

line 19 __test_project_data_directory__ = '/opt/extras.ubuntu.com/test-project/share/test-project/'

bug 2
$ /opt/extras.ubuntu.com/test-project$ ./test-project

(test-project:21107): GLib-GIO-ERROR **: Settings schema 'net.launchpad.test-project' is not installed

bug 3
the path '/opt/extras.ubuntu.com/test-project/share/test-project/' is too long

Related branches

Revision history for this message
Tony Byrne (tony-badwolf) wrote :
David Planella (dpm)
tags: added: arb
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

As a work around, a working deb can be produced if you add prefix to debian/rules. The quickly generated rules file contained:

override_dh_auto_install:
 dh_auto_install -- --install-scripts=/opt/extras.ubuntu.com/test-project --install-data=/opt/extras.ubuntu.com/test-project --install-lib=/opt/extras.ubuntu.com/test-project

I changed it to:

PKGDIR=opt/extras.ubuntu.com/test-project

override_dh_auto_install:
 dh_auto_install -- --prefix=/$(PKGDIR) \
  --install-lib=/$(PKGDIR)/ \
  --install-scripts=/$(PKGDIR)/bin/ \
  --install-data=/$(PKGDIR)/

This resulted in a working debian package that installed to opt.

This bug also causes problems with the desktop file. Even if you hand change the icon path to look in opt, setup.py stomps on it with its bad data path since it calls:

        for line in fin:
            if 'Icon=' in line:
                line = "Icon=%s\n" % (datadir + 'media/qreator.svg')
            fout.write(line)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "test case for bug 1" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Michael Terry (mterry) wrote :

Oh, whoops. I started working on a branch to fix the extras issues before I saw this bug. I'll link my branch too.

Mine is mostly working except for the glib schemas.

Michael Terry (mterry)
Changed in quickly:
status: New → Fix Committed
Michael Terry (mterry)
Changed in quickly:
milestone: none → 12.05
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package quickly - 12.05-0ubuntu1

---------------
quickly (12.05-0ubuntu1) quantal; urgency=low

  * New upstream release
    - Fix ubuntu-flash-game backend to work (LP: #1007086)
    - For ubuntu-cli and ubuntu-flash-game, don't keep warning about
      upgrading the project to use PyGI, even on fresh projects
      (LP: #1007006)
    - Fix 'package --extras' and 'submitubuntu' to create packages suitable
      for the ARB process again (LP: #1003818, LP: #998910, LP: #1002417)
 -- Michael Terry <email address hidden> Thu, 31 May 2012 15:25:44 -0400

Changed in quickly (Ubuntu):
status: New → Fix Released
Michael Terry (mterry)
Changed in quickly:
status: Fix Committed → Fix Released
Michael Terry (mterry)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Tony, or anyone else affected,

Accepted quickly into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in quickly (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I've installed the packages from proposed, and I can confirm that the test case is successful. The package correctly installs the binary to /opt/extras.ubuntu.com/ubuapp/bin/ubuapp, and it runs without crashing. Additionally, the desktop file now points to the correct binary and icon (this is LP: #1002417).

tags: added: verification-done
removed: verification-needed
Revision history for this message
David Planella (dpm) wrote :

Thanks Andrew for the testing and the feedback. As you've also tested bug 1002417, do you think you could update its status too, so that it can be SRU'd?

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

This bug was fixed in the package quickly - 12.04-0ubuntu2

---------------
quickly (12.04-0ubuntu2) precise-proposed; urgency=low

  * debian/patches/fix-extras.patch:
    - Fix 'package --extras' and 'submitubuntu' to create packages suitable
      for the ARB process again (LP: #1003818, LP: #998910, LP: #1002417)
  * debian/patches/no-warn-on-fresh-cli.patch:
    - For ubuntu-cli and ubuntu-flash-game, don't keep warning about
      upgrading the project to use PyGI, even on fresh projects
      (LP: #1007006)
  * debian/patches/fix-flash-template.patch:
    - Fix flash game template to still use gtk2, as flash requires that
      (LP: #1007086)
  * debian/control:
    - Depend on webkit-1.0 and gtk-2.0 for above flash change
 -- Michael Terry <email address hidden> Thu, 31 May 2012 16:35:33 -0400

Changed in quickly (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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