Bug 1895300

Summary: New version of rpmdev-bumpspec print extra space between month and day
Product: [Fedora] Fedora Reporter: Jan Macku <jamacku>
Component: rpmdevtoolsAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 33CC: bugs.michael, decathorpe, dennis, kevin, ngompa13, redhat-bugzilla, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpmdevtools-9.3-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-21 01:46:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.