[FFE] distro-info should have posix shell cmdline tool

Bug #963062 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
distro-info (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

== Feature Freeze Exception Info ==
= Proposed Changes =
 * split distro-info into 2 source packages, distro-info-data and distro-info
   where distro-info would depend on distro-info-data. The -data package
   will provide only the data files (csv formated data) and the distro-info
   package would provide binaries that read that data.
 * replace the haskell version of 'distro-info' with a posix shell version
   The posix shell version removes the build-dependency on haskell, while
   providing roughly the same speed.

= Rationale =
This change is desireable for the following reasons:
 a.) the /bin/sh are significantly smaller than haskell commands, arch independent and just as fast
 b.) When there is a new distro name or data available, we will not have to SRU the distro-info package, but only the distro-info-data package. That means no rebuild is necessary and the SRU update will be much more clear and small.
 c.) By removing the haskell version there is no longer a build dependency on haskelll, so both packages are suitable for main inclusion.

The distro-info package provides a nice way for packages to avoid hard-coding release names and then later requiring an SRU to support new releases. Unfortunately, right now it is not in main, meaning main packages *cannot* use that, or must provide a fallback and only use 'Suggests' for distro-info.

= Other Information =
Benjamin developed a shell test case that covered the output of the old commands and the replacement shell command. The development of the new command was done against this test case, which reasonably assures that any thing using the old will not know any difference.

== Original Description ==
when you install distro-info, you get a haskell tool to read the csv data in /usr/bin/.
It would make sense for that script to be in posix shell if it can be acceptably fast.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: distro-info 0.5.1
Architecture: amd64
Date: Fri Mar 23 08:46:13 2012
SourcePackage: distro-info

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Benjamin Drung (bdrung)
Changed in distro-info (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote :

This script expects either _DISTRO_INFO_DISTRO to be set in environment, or to be edited appropriately to replace '@@DISTRO@@'

Ie:
   for d in ubuntu debian; do
      sed "s,@@DISTRO@@,$d," distro-info.in > $d-distro-info
   done

Revision history for this message
Scott Moser (smoser) wrote :

This test-info script I used to verify the output of this shell distro-info was the same as the haskel version.

./test-info /usr/bin/ubuntu-distro-info ./ubuntu-distro-info ubuntu

Revision history for this message
Benjamin Drung (bdrung) wrote :

16 out of 49 tests failed (log attached).

Revision history for this message
Scott Moser (smoser) wrote :

Benjamin now has a distro-info-data [1,2] and distro-info [3,4] package made.
This represents 3 features that we'd like to have into Ubuntu.
 a.) the shell commands are significantly smaller than the haskel commands (and just as fast)
 b.) there is no need to update the distro-info package in an SRU (and have binary rebuilds) only to ship new data.
 c.) there is no longer a build dependency on haskell, so both packages are suitable for main inclusion

For a and b, I'm marking this bug a Feature Freeze Enhancement, as I'd like to see it in 12.04.
For 'c', I plain on filing an MIR for distro-info and distro-info-data.

--
[1] http://anonscm.debian.org/gitweb/?p=collab-maint/distro-info-data.git
[2] http://packages.qa.debian.org/d/distro-info-data.html
[3] http://anonscm.debian.org/gitweb/?p=collab-maint/distro-info.git
[4] http://packages.qa.debian.org/d/distro-info.html

Changed in distro-info (Ubuntu):
status: Triaged → New
summary: - distro-info should have posix shell cmdline tool
+ [FFE] distro-info should have posix shell cmdline tool
Scott Moser (smoser)
description: updated
Revision history for this message
Benjamin Drung (bdrung) wrote :

This freeze exception request is a request to sync distro-info 0.7 and distro-info-data 0.7 from Debian.

Revision history for this message
Stefano Rivera (stefanor) wrote :

FFe granted. Please do this within the next week.

Changed in distro-info (Ubuntu):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package distro-info - 0.7

---------------
distro-info (0.7) unstable; urgency=low

  * Rewrite scripts in Shell. The scripts are smaller than the Haskell binaries
    and the speed is about the same. This was done because Haskell is not in
    Ubuntu main. Thanks to Scott Moser for his work. (LP: #963062)

 -- Benjamin Drung <email address hidden> Sat, 24 Mar 2012 11:17:54 +0100

Changed in distro-info (Ubuntu):
status: Triaged → Fix Released
Scott Moser (smoser)
description: updated
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.