Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366553 - %{summary} in %description ignores locale
Summary: %{summary} in %description ignores locale
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-12 10:10 UTC by Igor Gnatenko
Modified: 2016-10-03 06:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-03 06:54:51 UTC


Attachments (Terms of Use)

Description Igor Gnatenko 2016-08-12 10:10:28 UTC
Name: hello-world
Version: 1
Release: 1%{?dist}
Summary: Hello, world!
Summary(ru): Привет, мир!
License: Public Domain
URL: https://google.com
Source0: %{name}.c
BuildRequires: gcc
%description
%{summary}.
%prep
%autosetup -c -T
cp -a %{SOURCE0} .
%build
gcc %{optflags} %{__global_ldflags} %{name}.c -o %{name}
%install
install -Dpm0755 %{name} %{buildroot}%{_bindir}/%{name}
%files
%{_bindir}/%{name}
%changelog


[brain@x1carbon SPECS]$ LANG=ru rpm -qpi /home/brain/rpmbuild/RPMS/x86_64/hello-world-1-1.fc26.x86_64.rpm
Name        : hello-world
Version     : 1
Release     : 1.fc26
Architecture: x86_64
Install Date: (not installed)
Group       : Unspecified
Size        : 7152
License     : Public Domain
Signature   : (none)
Source RPM  : hello-world-1-1.fc26.src.rpm
Build Date  : Fri Aug 12 12:08:01 2016
Build Host  : x1carbon.localdomain
Relocations : (not relocatable)
URL         : https://google.com
Summary     : Привет, мир!
Description :
Привет, мир!.
[brain@x1carbon SPECS]$ LANG=C rpm -qpi /home/brain/rpmbuild/RPMS/x86_64/hello-world-1-1.fc26.x86_64.rpm
Name        : hello-world
Version     : 1
Release     : 1.fc26
Architecture: x86_64
Install Date: (not installed)
Group       : Unspecified
Size        : 7152
License     : Public Domain
Signature   : (none)
Source RPM  : hello-world-1-1.fc26.src.rpm
Build Date  : Fri Aug 12 12:08:01 2016
Build Host  : x1carbon.localdomain
Relocations : (not relocatable)
URL         : https://google.com
Summary     : Hello, world!
Description :
Привет, мир!.


As you can see, I reference %{summary} in %description, but it always loads last defined summary.

Comment 1 Panu Matilainen 2016-10-03 06:54:51 UTC
(In reply to Igor Gnatenko from comment #0)
> As you can see, I reference %{summary} in %description, but it always loads
> last defined summary.

That is the expected behavior, %{summary} etc are nothing but plain macros where last line wins. Guess what %{requires} expands to after this:

Requires: foo
Requires: bar

It might be useful to be able to refer to the values in headers-under-construction but that would need a different syntax, this behavior can't be changed without breaking half the world.


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