quickly package --extras creates broken deb
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.
raise project_
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_
# on 12.04, this is the binary path
/opt/extras.
# in my fixed version, this will be the binary path
#/opt/extras.
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.
File "/opt/extras.
raise project_
fix bug 1
edit /opt/extras.
line 19 __test_
bug 2
$ /opt/extras.
(test-project:
bug 3
the path '/opt/extras.
Related branches
- Michael Terry (community): Needs Fixing
-
Diff: 134 lines (+51/-23)3 files modifieddata/templates/ubuntu-application/project_root/bin/project_name (+32/-8)
data/templates/ubuntu-application/project_root/setup.py (+18/-2)
data/templates/ubuntu-application/run.py (+1/-13)
- Didier Roche-Tolomelli: Approve
-
Diff: 357 lines (+186/-132)4 files modifieddata/templates/ubuntu-application/internal/packaging.py (+86/-55)
data/templates/ubuntu-application/test/extras.sh (+99/-0)
data/templates/ubuntu-application/test/metadata.sh (+0/-76)
data/templates/ubuntu-application/test/package.sh (+1/-1)
tags: | added: arb |
Changed in quickly: | |
status: | New → Fix Committed |
Changed in quickly: | |
milestone: | none → 12.05 |
Changed in quickly: | |
status: | Fix Committed → Fix Released |
description: | updated |
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: scripts= /opt/extras. ubuntu. com/test- project --install- data=/opt/ extras. ubuntu. com/test- project --install- lib=/opt/ extras. ubuntu. com/test- project
dh_auto_install -- --install-
I changed it to:
PKGDIR= opt/extras. ubuntu. com/test- project
override_ dh_auto_ install: lib=/$( PKGDIR) / \ scripts= /$(PKGDIR) /bin/ \ data=/$ (PKGDIR) /
dh_auto_install -- --prefix=/$(PKGDIR) \
--install-
--install-
--install-
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:
line = "Icon=%s\n" % (datadir + 'media/ qreator. svg')
fout. write(line)
if 'Icon=' in line: