Bug 1895300 - New version of rpmdev-bumpspec print extra space between month and day
Summary: New version of rpmdev-bumpspec print extra space between month and day
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-06 09:39 UTC by Jan Macku
Modified: 2021-01-21 01:46 UTC (History)
7 users (show)

Fixed In Version: rpmdevtools-9.3-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-21 01:46:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Macku 2020-11-06 09:39:42 UTC
Description of problem:

New version of rpmdev-bumpspec print extra space between month and day.
It is caused by switching from %d to %e, please see below.

code:
%<--------------------
elif opts.legacy_datestamp:
  date = time.strftime("%a %b %e %Y", time.gmtime())
else:                          ^---- parameter causing issue
  date = time.strftime("%a %b %e %T %Z %Y", time.localtime())
%<--------------------         ^---- parameter causing issue


Version-Release number of selected component (if applicable):
rpmdevtools-9.2-1.fc33.noarch

Actual results:
* Fri Nov  06 2020 Jan Macku <jamacku>
          ^--- extra space


Expected results:
* Fri Nov 06 2020 Jan Macku <jamacku>

Comment 1 Jan Macku 2020-11-06 09:45:32 UTC
It looks like %d now also adds extra space.

Comment 2 Jan Macku 2020-11-06 11:00:26 UTC
Possible fix:

%<--------------------
elif opts.legacy_datestamp:
  date = time.strftime("%a %b%e %Y", time.gmtime())
else:                          
  date = time.strftime("%a %b%e %T %Z %Y", time.localtime())
%<--------------------

Comment 3 Fabio Valentini 2020-11-06 11:11:27 UTC
No, this is no good, because it will e.g. print "Nov16" instead of "Nov 16". Switching from %e to %d is the correct change.
Which was already done in the upstream project two days ago:
https://pagure.io/rpmdevtools/c/a8449c769e628d84c531cc0ae8c6203b3f3a9ead?branch=master
This change will be part of the next rpmdevtools release.

Comment 4 Jan Macku 2020-11-06 11:17:25 UTC
Sorry for confusion. I don't have issue with %e but with extra space which wasn't present in older versions.

Comment 5 Fedora Update System 2021-01-20 12:26:48 UTC
FEDORA-2021-f87c1a5d2e has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f87c1a5d2e

Comment 6 Fedora Update System 2021-01-21 01:46:36 UTC
FEDORA-2021-f87c1a5d2e has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


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