-v || --version should show current version of tool

Bug #709170 reported by Jamie Bennett
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Medium
Mattias Backman

Bug Description

Downloading the current version as of 2011-01-28 linaro-media-create does not show the tools version number when invoking a -v or --version. This would be useful for debugging purposes and to ensure you have the correct version installed.

Related branches

Changed in linaro-image-tools:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Mattias Backman (mabac) wrote :

Seems like this is a widely requested feature.

What would the --version option show when l-m-c is run from a bzr checkout?
When installed as a package, probably should print the package version?

Fathi Boudra (fboudra)
Changed in linaro-image-tools:
milestone: none → 2011.10
Revision history for this message
Fathi Boudra (fboudra) wrote :

--version should show the version as available in setup.py.

as you do a post release bump, --version should show YYYY.MM.1. a better distinction will be to add a devel string.
e.g. version="2011.09.1 (devel)"

when installed as a package, common practice is to use upstream version, not the package version.

Though some package include packaging version like QEMU or GCC:
$ qemu-x86_64-static --version
qemu-x86_64 version 0.14.1 (Debian 0.14.1+dfsg-3), Copyright (c) 2003-2008 Fabrice Bellard

For QEMU, it's passed at build time using --with-pkgversion=

IMO, we don't need the packaging version. It can be revisited later if we want it.

Revision history for this message
Mattias Backman (mabac) wrote : Re: [Bug 709170] Re: -v || --version should show current version of tool

On Fri, Sep 30, 2011 at 8:42 AM, Fathi Boudra <email address hidden> wrote:
> --version should show the version as available in setup.py.

That's easy for the case where the user runs l-m-c from a bzr branch,
but that's probably the case where the -v option is least needed. The
setup.py file is not available in the package, so we need to carry the
version info into the package somehow. Is there a standard way of
doing this?

>
> as you do a post release bump, --version should show YYYY.MM.1. a better distinction will be to add a devel string.
> e.g. version="2011.09.1 (devel)"

Yeah why not; the '.1' worked better in the 0.4.x version scheme.

>
> when installed as a package, common practice is to use upstream version,
> not the package version.

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

On 30 September 2011 15:09, Mattias Backman <email address hidden> wrote:
> On Fri, Sep 30, 2011 at 8:42 AM, Fathi Boudra <email address hidden> wrote:
>> --version should show the version as available in setup.py.
>
> That's easy for the case where the user runs l-m-c from a bzr branch,
> but that's probably the case where the -v option is least needed. The
> setup.py file is not available in the package, so we need to carry the
> version info into the package somehow. Is there a standard way of
> doing this?

yes, the standard way is to create e.g. __version__.py in your source tree.
The file will contain a single line: __version__ = "2011.09.1 (devel)"
Then in your setup.py, open that file and parse out the version.
__version__.py is distributed with the package and can be used for the
--version option.

Mattias Backman (mabac)
Changed in linaro-image-tools:
assignee: nobody → Mattias Backman (mabac)
status: Triaged → In Progress
Mattias Backman (mabac)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Mattias Backman (mabac)
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.