Bug 1074600 - ncurses 20171216: needs adjustments on yast side
ncurses 20171216: needs adjustments on yast side
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
Jiri Srain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-04 08:41 UTC by Dominique Leuenberger
Modified: 2021-03-23 09:36 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2018-01-04 08:41:41 UTC
Ncurses 20171216 has been submitted to openSUSE:Factory which in turn causes build failures in those yast modules:

* libyui-ncurses
* libyui-ncurses-pkg
(more might show up as the staging project progresses)

The build log excerpt from libyui-ncurses:

>[   30s] In file included from /home/abuild/rpmbuild/BUILD/libyui-ncurses-2.49.0/src/NCurses.h:40:0,
>[   30s]                  from /home/abuild/rpmbuild/BUILD/libyui-ncurses-2.49.0/src/NCWidget.h:31,
>[   30s]                  from /home/abuild/rpmbuild/BUILD/libyui-ncurses-2.49.0/src/NCAlignment.h:31,
>[   30s]                  from /home/abuild/rpmbuild/BUILD/libyui-ncurses-2.49.0/src/NCWidgetFactory.h:31,
>[   30s]                  from /home/abuild/rpmbuild/BUILD/libyui-ncurses-2.49.0/src/NCWidgetFactory.cc:26:
>[   30s] /home/abuild/rpmbuild/BUILD/libyui-ncurses-2.49.0/src/ncursesw.h:1613:38: error: macro "is_linetouched" requires 2 arguments, but only 1 given
>[   30s]      bool    is_linetouched( int line ) const


The changelog of ncurses mentions (for patchset 20171125)

>+  + add a macro for is_linetouched() and adjust the function's return
>+    value to make it possible for most applications to check for an
>+    error-return (report by Midolikawa H).
Comment 1 Josef Reidinger 2018-01-04 12:59:08 UTC
well, issue is that we have method that shortcut ncurses method. But when they use macro, it stop working:

https://github.com/libyui/libyui-ncurses/blob/73e8244a34cd162dc2ceb2b2aee08933c5bada10/src/ncursesw.h#L1613

So what is a options? we can probably rename it, but it will change API and ABI which is not so nice. another option can be probably to undefine this macro, but is question how ncurses will react
Comment 2 Stefan Hundhammer 2018-01-04 16:16:19 UTC
AFAICS the is_linetouched() function from libyui-ncurses/src/ncursesw.h is not used anywhere in libyui-ncurses or libyui-ncurses-pkg, so the simplest fix would probably be to just remove it.

https://github.com/libyui/libyui-ncurses/blob/73e8244a34cd162dc2ceb2b2aee08933c5bada10/src/ncursesw.h#L1613

The only reference is where that function is defined, where it just calles the underlying NCurses function:

src/yast 35 % grep is_linetouched libyui-ncurses*/**/*.{h,cc}     
libyui-ncurses/src/ncursesw.h:    bool	   is_linetouched( int line ) const
libyui-ncurses/src/ncursesw.h:	return ( ::is_linetouched( w, line ) ? TRUE : FALSE );


Since this is not meant as an API to be used from the outside world, IMHO it can be safely removed.
Comment 3 Stefan Hundhammer 2018-01-04 16:25:56 UTC
Pull request:

https://github.com/libyui/libyui-ncurses/pull/62
Comment 4 Stefan Hundhammer 2018-01-04 16:42:33 UTC
Fix will be available with libyui-ncurses-2.50.0.

Submit request to factory:

https://build.opensuse.org/request/show/561697