bugGNU nano - Bugs: bug #47962, version indication does not update...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #47962: version indication does not update on build

Submitter:  Cody A. Taylor <code_m>
Submitted:  Thu 19 May 2016 02:30:51 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Wed 29 Jun 2016 01:42:35 PM UTC, comment #8: 

Fixed in git, 2ae490c.

If there's still something amiss, or could be improved, don't hesitate to let us know.

Benno Schulenberg <bens>
Group administrator
Wed 15 Jun 2016 05:37:06 PM UTC, comment #7: 

Tarballs don' have any tags nor a .git subdirectory, so they won't be recognized as a git repo and thus will get a normal version indicator.

Apparently I did something wrong during a 'git rebase master' and lost a changed line in src/nano.c.  It was there in the patch linked to by comment #4.  Attached version is corrected.

(You can simulate building from a tarball by moving the .git subdir out of the way (renaming it), run ./configure, touch src/nano.c, and run make.)

(file #37491)

Benno Schulenberg <bens>
Group administrator
Wed 15 Jun 2016 02:28:38 PM UTC, comment #6: 

The patch surely works fine within the scope of a git repo. I can create a new commit (even empty) and build a new executable with the correct revision.

I don't know if there are source tarballs that are not a tagged version, but if there are, this needs to be tested without the git repo in place.

Additionally, while the patch is functional, I think the text could be simplified even further. With this patch `nano --version` outputs something like "nano from git, commit v2.5.3-296-g25462ef6e6e9 (after 2.6.0)" on the first line. I don't know what the motivation for "from git" is, but it seems duplicative now since the describe string's commit number starts with "g" to indicate it is a git commit hash. The word "commit" also seem duplicative. Currently "(after 2.6.0)" is slightly wrong, but not a big deal.

Any objection to boiling it down to "nano at v2.5.3-296-g25462ef6e6e9"?

Cody A. Taylor <code_m>
Wed 15 Jun 2016 12:43:54 PM UTC, comment #5: 

Complete patch that fixes it for me is attached.  For review and testing.

(file #37487)

Benno Schulenberg <bens>
Group administrator
Sat 21 May 2016 03:20:09 PM UTC, comment #4: 
Benno Schulenberg <bens>
Group administrator
Thu 19 May 2016 05:45:56 PM UTC, comment #3: 

My understanding of autoconf is pretty much stops at "run `autoconf`".

Much better editing the Makefile by hand. Does autoconf have some sort of raw output?

In make you'd do `REVISION := $(shell git describe --tags)`.

Cody A. Taylor <code_m>
Thu 19 May 2016 03:18:48 PM UTC, comment #2: 

Thanks for reporting, and for the suggestion on using 'git describe --tag' -- that looks much better.

The version paragraph only updates when configure.ac is touched.  This has been so also when still using SVN.  Ideally it would be the Makefile that runs 'git describe --tag', but I don't know how to do that, how to feed it into a header file.

Benno Schulenberg <bens>
Group administrator
Thu 19 May 2016 02:38:21 PM UTC, comment #1: 

Side note, you may find it useful to do `git describe --tags` (plus some options in case the developer didn't pull tags) instead of using `git rev-parse --short HEAD`.

Cody A. Taylor <code_m>
Thu 19 May 2016 02:30:51 PM UTC, original submission:  

Since the change to using git source control the version paragraph does not update with commit updates.

Attached is a screenshot showing the result of a build, "nano --version", and then showing the current HEAD commit message. The important bit here is "nano --version" has `58404e4ba295` while HEAD is `c9d1936f02a8`.

Cody A. Taylor <code_m>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by code_m (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-30 bens Open/ClosedOpen Closed
    2016-06-29 bens Severity3 - Normal 2 - Minor
        StatusIn Progress Fixed
    2016-06-15 bens Attached File- Added 0001-build-refresh-the-git-description-whenever-something.patch, #37491
    2016-06-15 bens Attached File- Added 0001-build-refresh-the-git-description-whenever-something.patch, #37487
        SummaryVersion paragraph does not update on build version indication does not update on build
    2016-05-21 bens StatusNone In Progress
        Assigned toNone bens
    2016-05-19 code_m Attached File- Added nano-version.png, #37209

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code