dmidecode changed default output format and added new command line interface for scripts - please update laptop-detect

Bug #30448 reported by Mantas Kriaučiūnas
6
Affects Status Importance Assigned to Milestone
Baltix
Fix Released
Medium
Unassigned
laptop-detect (Ubuntu)
Fix Released
Wishlist
Daniel Silverstone

Bug Description

Hi,

laptop-detect script currently tries to parse dmidecode's version 2.6 output instead of using new command line interface, which appeared in dmidecode ver. 2.7:

dmidecode (2.7-1) unstable; urgency=low

  * New upstream release.
    - Include new command line interface making it easier for scripts to extract the values they want.
    - Default output format is slightly changed. This might break existing scripts, which should use the new command line options instead.

New command line interface are new parameters:

 --string KEYWORD Only display the value of the given DMI string
 --type TYPE Only display the entries of given type

Valid string keywords are:
  bios-vendor
  bios-version
  bios-release-date
  system-manufacturer
  system-product-name
  system-version
  system-serial-number
  baseboard-manufacturer
  baseboard-product-name
  baseboard-version
  baseboard-serial-number
  baseboard-asset-tag
  chassis-manufacturer
  chassis-version
  chassis-serial-number
  chassis-asset-tag
  processor-manufacturer
  processor-version

Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot

So, please change parsing dmidecode|grep Chassis -A 10|grep -m1 Type|sed -e 's/.*Type: \(.*\)/\1/' to new code, which uses new command-line parameters or at least check if changed default dmidecode output format doesn't couse any problems with detecting a laptop.

Revision history for this message
Matt Zimmerman (mdz) wrote :

It's too late in Dapper to migrate to the new interface, but the existing code should be updated to cope with changes in the human-readable interface

Changed in laptop-detect:
assignee: nobody → dsilvers
Revision history for this message
Daniel Silverstone (dsilvers) wrote :

The new format doesn't provide a tag which outputs the chassis type anyway.

The human-readable format has not changed sufficiently to cause any issues with laptop-detect.sh

Revision history for this message
Matt Zimmerman (mdz) wrote :

Mantas, can you confirm that there is actually no problem parsing the current output, and that this is just a proposal to use the alternative interface?

Revision history for this message
Daniel Silverstone (dsilvers) wrote :

I'm confirming, it's all okay (verified manually using grep etc on my laptop)

Since dmidecode doesn't offer the desired data in a tagged form, this bug is therefore invalid. rejecting.

Changed in laptop-detect:
status: Unconfirmed → Rejected
Changed in laptop-detect:
status: Invalid → Fix Released
Przemek K. (azrael)
Changed in baltix:
status: New → 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.