hwpacksv3 - mmc_id: 1:1 return an invalid mmc_id error

Bug #1085412 reported by Fathi Boudra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Medium
Milo Casagrande

Bug Description

I tried to convert snowball to hwpack v3. the mmc_id is 1:1.

Traceback (most recent call last):
  File "/usr/bin/linaro-hwpack-create", line 53, in <module>
    args.VERSION, args.local_debs)
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/hwpack/builder.py", line 110, in __init__
    self.config.validate()
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/hwpack/config.py", line 294, in validate
    self._validate_mmc_id()
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/hwpack/config.py", line 1094, in _validate_mmc_id
    r"[0-9]:[0-9]", mmc_id, "Invalid mmc_id %s" % mmc_id)
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/hwpack/config.py", line 937, in _assert_matches_pattern
    raise HwpackConfigError(error_message)
linaro_image_tools.hwpack.config.HwpackConfigError: Invalid mmc_id 61

To reproduce, you can get my branch:
bzr branch lp:~fboudra/linaro-images/hwpack.quantal.linaro-snowball

Related branches

Fathi Boudra (fboudra)
description: updated
Milo Casagrande (milo)
Changed in linaro-image-tools:
assignee: nobody → Milo Casagrande (milo)
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
milestone: none → 2013.01
Milo Casagrande (milo)
Changed in linaro-image-tools:
importance: Undecided → Medium
Revision history for this message
Milo Casagrande (milo) wrote :

I tested the hwpack config, and did some other tests.
It is not really an error in l-i-t per se, it is how the yaml library parses the string or how it is interpreting the value.

If we quote the mmc_id value like:
mmc_id: '1:1'

it will pick it up as a valid string, otherwise it picks it up (I guess) as a number, which yelds 61 as a result value.
Need to check how the other hwpack config files are using the mmc_id value.

Revision history for this message
Fathi Boudra (fboudra) wrote :

make sense. other hwpack doesn't quote mmc_id as string either. I'm updating the configurations.

Revision history for this message
Milo Casagrande (milo) wrote :

Tested with linaro-hwpack-convert tool, and it correctly quotes the value.
I added a couple of tests to make sure we are handling it correctly, and that the correct value is used.

Linked branch adds the two tests.

Changed in linaro-image-tools:
status: New → In Progress
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Milo Casagrande (milo)
Changed in linaro-image-tools:
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.