projects built with a new template shows an /opt warning

Bug #702153 reported by Tony Byrne on 2011-01-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

How to generate warning

export PATH=/home/tony/projects/trunk/quickly/bin:$PATH; quickly quickly ubuntu-application optless
Copy ubuntu-application to create new /home/tony/quickly-templates/optless template
export PATH=/home/tony/projects/trunk/quickly/bin:$PATH; quickly create optless "test project"
export PATH=/home/tony/projects/trunk/quickly/bin:$PATH; cd test-project; quickly package
WARNING: can't update your project to support /opt. This doesn't matter if you don't plan to submit your project to the application review board. Cause is: os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY) # for subprocesses was not found in the file /home/tony/projects/build/quickly/test-project/bin/test-project.

However if you copy from ubuntu-application to optless the warning does not appear

quickly --version
Quickly 11.03
  Python interpreter: /usr/bin/python 2.6.6
  Python standard library: /usr/lib/python2.6

  Quickly used library: /home/tony/projects/trunk/quickly/quickly
  Quickly data path: /home/tony/projects/trunk/quickly/data
  Quickly detected template directories:

Related branches

Tony Byrne (tony-badwolf) wrote :

This warning only occurs on first call to package. During this first call, is called with len(sys.argv) of 3. On line 38 there is a assignment
project_version = sys.argv[1]

while sys.argv is ['/path/to/templates/ubuntu-application/', '', '11.03'] so project_version is ''. This causes quickly to attempt to upgrade a file (bin/test-ptoject) that does not need an upgrade so it fails and shows the warning.

Before first call to package .quickly has these contents :

project = test-project
version = 11.03
template = pygtk-application

After that .quickly has these contents :

project = test-project
version = 11.03
template = pygtk-application
version_ubuntu-application = 11.03

Tony Byrne (tony-badwolf) wrote :

This is probably not a real bug. The only way to trigger it is to quickly package immediately after quickly create. Calling quickly <any command> from inside project updates .quickly and then quickly package works fine.

Changed in quickly:
status: New → Invalid
Michael Terry (mterry) wrote :

I think this is a real bug, Tony. Why shouldn't "quickly create" set version_ubuntu-application?

Changed in quickly:
status: Invalid → Confirmed
Michael Terry (mterry) wrote :

Oh whoops. I mean, "quickly package" should work the same if it's run first than if it's run second.

Tony Byrne (tony-badwolf) wrote :

Upgrade is called for all projects that use user supplied templates (~/quickly-templates/*) but fails for recently produced (quickly quickly) templates. The supplied patch checks for presence of new code before attempting to replace old code by new code.

Michael Terry (mterry) wrote :

Applied your patch.

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

Duplicates of this bug

Other bug subscribers