[Bug 652818] New: [spec-cleaner] Summary gets put within BuildRequires
https://bugzilla.novell.com/show_bug.cgi?id=652818 https://bugzilla.novell.com/show_bug.cgi?id=652818#c0 Summary: [spec-cleaner] Summary gets put within BuildRequires Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software AssignedTo: prusnak@novell.com ReportedBy: bitdealer@gmail.com QAContact: opensuse-communityscreening@forge.provo.novell.com Found By: --- Blocker: --- If one uses %if not_suse ..... %endif the Summary: tag ends up between said build requires and the main BuildRequires. IMHO the Summary should be right before the description. An example is security:OpenVAS:STABLE:v3/openvas-libraries Excerpt: %if 0%{?suse_version} BuildRequires: libgpgme-devel BuildRequires: libuuid-devel %endif Summary: Support libraries for OpenVAS BuildRequires: bison BuildRequires: cmake >= 2.6.0 BuildRequires: glib2-devel >= 2.12 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=652818 https://bugzilla.novell.com/show_bug.cgi?id=652818#c1 --- Comment #1 from Vincent Untz <vuntz@novell.com> 2010-11-11 15:25:27 UTC --- Yeah, that's because the way the script works, it would likely break the spec file (by adding/removing stuff from the %if) if we tried to interpret the content of %if. So I went the safe way... Thinking about it, I'm event not sure what would be the correct behavior in your case: some people would want the %if to be at the end of the BuildRequires, while some others would want the BuildRequires to be alphabetically sorted anyway, even if it means having multiple %if. Anyway. Correctly fixing this would require the internal rewrite to have a real spec file parser. Pavol, were you convinced by your tests with the rpm python bindings? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=652818 https://bugzilla.novell.com/show_bug.cgi?id=652818#c2 --- Comment #2 from Pavol Rusnak <prusnak@novell.com> 2010-11-11 16:51:23 CET --- Using python-rpm parser might possible, but there are some limitations. Consider the following snippet: %pre /sbin/ldconfig %post /sbin/ldconfig # we might want to split devel files into separate package later %files %{_bindir}/foo %{_include}/foo/ %{_libdir}/libfoo.* The comment above %files section obviously belongs to %files section, but parser sees it as a part of %post section - i.e. if I print this section it will contain: /sbin/ldconfig --empty line-- # we might want to split devel files into separate package later As we reorder sections in .spec file we would need to store also the original order and somehow guess where the comment belongs and reappend it if needed. You might want to check rpm bindings using this snippet: import rpm spkg = rpm.spec('foo.spec') and then inspect spkg structure for various fields e.g. individual packages: for p in spkg.packages: print p.header['name'] I might do it as well, but I'm not sure if I find some time the following days. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=652818 https://bugzilla.novell.com/show_bug.cgi?id=652818#c Pavol Rusnak <prusnak@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |prusnak@opensuse.org AssignedTo|prusnak@suse.com |vuntz@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=652818 https://bugzilla.novell.com/show_bug.cgi?id=652818#c3 Vincent Untz <vuntz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tchvatal@suse.com AssignedTo|vuntz@suse.com |tcech@suse.com --- Comment #3 from Vincent Untz <vuntz@suse.com> 2013-10-21 12:54:56 UTC --- Tomáš is reviving spec-cleaner at https://github.com/openSUSE/spec-cleaner so reassigning the bugs to him. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=652818 https://bugzilla.novell.com/show_bug.cgi?id=652818#c4 Tomas Cech <tcech@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Tomas Cech <tcech@suse.com> 2014-01-26 21:59:57 CET --- I believe that this issue is no longer present in spec-cleaner. %if BuildRequires..%endif section is moved to the after unconditional BuildRequires. Summary is placed correctly as well. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com