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

 
 

bug #47962: version indication does not update on build

Submitted by:  Cody A. Taylor <code_m>
Submitted on:  Thu 19 May 2016 02:30:51 PM UTC  
 
Severity: 2 - MinorStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
Sat 21 May 2016 03:20:09 PM UTC, comment #4:

For a partial patch, see:
https://lists.gnu.org/archive/html/nano-devel/2016-05/msg00078.html.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Jul 2016 09:05:59 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 29 Jun 2016 01:42:35 PM UTCbensSeverity3 - Normal=>2 - Minor
      StatusIn Progress=>Fixed
    Wed 15 Jun 2016 05:37:06 PM UTCbensAttached File-=>Added 0001-build-refresh-the-git-description-whenever-something.patch, #37491
    Wed 15 Jun 2016 12:43:54 PM UTCbensAttached 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
    Sat 21 May 2016 03:20:09 PM UTCbensStatusNone=>In Progress
      Assigned toNone=>bens
    Thu 19 May 2016 02:30:51 PM UTCcode_mAttached File-=>Added nano-version.png, #37209

    Back to the top


    Powered by Savane 3.1-cleanup1