Bug 1391564 - vim-update.sh incorrectly treats patchlevel number as octal number
Summary: vim-update.sh incorrectly treats patchlevel number as octal number
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-03 14:43 UTC by Ting-Wei Lan
Modified: 2016-11-14 18:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-14 18:57:10 UTC
Type: Bug


Attachments (Terms of Use)

Description Ting-Wei Lan 2016-11-03 14:43:03 UTC
Description of problem:
The build for vim 8.0.45 in rawhide has incorrect Version-Release number 8.0.037-1.fc26.

Version-Release number of selected component (if applicable):
vim-8.0.037-1.fc26

How reproducible:
Install vim on rawhide

Steps to Reproduce:
1. Run 'rpm -q vim-enhanced'.
2. Run 'vim --version'.
3. See the version number mismatch between the two.

Actual results:
vim-8.0.037-1.fc26
VIM - Vi IMproved 8.0 Included patches: 1-45

Expected results:
vim-8.0.045-1.fc26
VIM - Vi IMproved 8.0 Included patches: 1-45

Additional info:
The error is caused by these two lines in vim-update.sh:
LASTPL=`echo $LASTTAG| sed -e 's/.*\.//'`
LASTPLFILLED=`printf "%03d" $LASTPL`

If $LASTPL has leading zero like '045', printf command will treat it as an octal number and do the conversion from octal to decimal. This also causes vim-update.sh to fail to run if any of the last two digits is 8 or 9.

Comment 1 Karsten Hopp 2016-11-14 15:46:42 UTC
should be fixed in git, please try again

Comment 2 Zdenek Dohnal 2016-11-14 16:08:39 UTC
It works for me.

Comment 3 Ting-Wei Lan 2016-11-14 18:57:10 UTC
Yes, master branch of git://pkgs.fedoraproject.org/rpms/vim.git works for me now.


Note You need to log in before you can comment on or make changes to this bug.