"click build -m" crashes when given a directory

Bug #1251604 reported by Alistair Buxton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
Low
Colin Watson

Bug Description

To reproduce:

In current dir have:
    manifest.json
    foo/

Directory "foo" contains the files to be packaged.

Run: "click build -m . foo/"

Expected result: click should build a click package using the manifest.json in current directory.

Actual Result: click crashes with the following backtrace:

Traceback (most recent call last):
  File "/usr/bin/click", line 83, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 79, in main
    return mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/build.py", line 45, in run
    path = builder.build(".", manifest_path=options.manifest)
  File "/usr/lib/python3/dist-packages/click/build.py", line 212, in build
    self.read_manifest(full_manifest_path)
  File "/usr/lib/python3/dist-packages/click/build.py", line 79, in read_manifest
    with io.open(manifest_path, encoding="UTF-8") as manifest:
IsADirectoryError: [Errno 21] Is a directory: '/tmp/clickp4o0vn/data/.'
---
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
DistroRelease: Ubuntu 13.10
InstallationDate: Installed on 2013-08-27 (79 days ago)
InstallationMedia: Xubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130827)
MarkForUpload: True
NonfreeKernelModules: nvidia
Package: click 0.4.11
PackageArchitecture: amd64
Tags: saucy
Uname: Linux 3.11.0-031100-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxusers video

Related branches

Revision history for this message
Alistair Buxton (a-j-buxton) wrote : Dependencies.txt

apport information

tags: added: apport-collected saucy
description: updated
Revision history for this message
Alistair Buxton (a-j-buxton) wrote : ProcEnviron.txt

apport information

Revision history for this message
Colin Watson (cjwatson) wrote :

The intent is that you should pass a file name, not a directory name. But of course we can make it more robust against this.

summary: - Using the build -m option crashes click.
+ "click build -m" crashes when given a directory
Changed in click (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Colin Watson (cjwatson)
Changed in click (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

The manpage says:

       -m PATH, --manifest=PATH
              Read package manifest from PATH (default: manifest.json).

I assumed that PATH meant a directory, and I would expect it to say FILE if it wanted a file.

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 1251604] Re: "click build -m" crashes when given a directory

For me, PATH carries no particular connotations of inode type; in this
case it means the full path to the manifest.

  http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_267

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

This bug was fixed in the package click - 0.4.13

---------------
click (0.4.13) trusty; urgency=low

  [ Robert Bruce Park ]
  * Ignore click packages when building click packages.

  [ Colin Watson ]
  * If "click build" or "click buildsource" is given a directory as the
    value of its -m/--manifest option, interpret that as indicating the
    "manifest.json" file in that directory (LP: #1251604).
  * Ensure correct permissions on /opt/click.ubuntu.com at boot, since a
    system image update may have changed clickpkg's UID/GID (LP: #1259253).
 -- Colin Watson <email address hidden> Tue, 10 Dec 2013 14:33:42 +0000

Changed in click (Ubuntu):
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.