Bug 428898 - ncurses update breaks dependencies (and fails without manual intervention)
ncurses update breaks dependencies (and fails without manual intervention)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ncurses (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
: EasyFix, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-15 17:12 EST by Michal Jaegermann
Modified: 2008-03-07 08:48 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-07 08:48:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2008-01-15 17:12:43 EST
Description of problem:

An update to ncurses-libs-5.6-13.20080112.fc9 attempts to replace
libtermcap-2.0.8-47.  So far so good but this fails flat with

--> Finished Dependency Resolution
Error: Missing Dependency: libtermcap = 2.0.8 is needed by package libtermcap-devel
Error: Missing Dependency: libtermcap.so.2()(64bit) is needed by package
libtermcap-devel

and the whole update aborts.  The only way forward is to deinstall
libtermcap-devel.

What is worse 'ncurses-devel' package does not provide such things
like /usr/include/termcap.h (/usr/include/ncurses/termcap.h is not
quite the same thing), nor libtermcap libraries (shared and static),
nor /usr/share/info/termcap.info.gz.  After deinstallation of
libtermcap-devel they are just gone.

Version-Release number of selected component (if applicable):
ncurses-5.6-13.20080112.fc9
Comment 1 Miroslav Lichvar 2008-01-15 18:34:17 EST
Fixed in ncurses-5.6-14.20080112.fc9, libtermcap-devel is obsoleted by
ncurses-devel.

As for termcap.h headers, they should be compatible. All packages that used
libtermcap are now linked with libtinfo or libncurses.
Comment 2 Axel Thimm 2008-02-08 00:32:37 EST
Please also add a compatibility Provides: for libtermcap-devel. Many packages BR
it, thanks!
Comment 3 Miroslav Lichvar 2008-02-08 04:37:50 EST
Hm, I don't think ncurses is a compatible enough replacement for libtermcap to
put there the provides.

Packages that support only libtermcap need to be modified anyway (add
/usr/include/ncurses to CPPFLAGS and link with libncurses or libtinfo instead of
libtermcap).
Comment 4 Michal Jaegermann 2008-02-08 09:14:27 EST
> Hm, I don't think ncurses is a compatible enough replacement for
> libtermcap to put there the provides.

I do not have any specific examples at the moment but that sounds
like people with binary-only programs which happen to be using
shared libtermcap will be SOL.  Is not possible to provide at least
a "fake" libtermcap.so to make those to use libtinfo/libncurses?
Comment 5 Miroslav Lichvar 2008-02-14 08:33:49 EST
Packaging the symlink libtermcap.so.2 -> libtinfo.so.5 is certainly possible,
but do we really want to do that?

Please file a new bug, the original bug reported here should be resolved.
Comment 6 Axel Thimm 2008-02-14 14:28:21 EST
(In reply to comment #3)
> Hm, I don't think ncurses is a compatible enough replacement for libtermcap to
> put there the provides.

If that's true the Obsoletes: is wrong to start with.
Furthermore in the packaging guidelines it is stated that Obsoletes: and
Provides: need to be paired always. If you should have a case not to do so
(which IMO is not the case here) then you need to get permission from the FPC
anyway.

(In reply to comment #5)
> Please file a new bug, the original bug reported here should be resolved.

The resolve is the new bug, and all the context is here, let's keep it unfragmented.
Comment 7 Miroslav Lichvar 2008-02-14 15:11:50 EST
The obsoletes is mainly used to remove the packages when upgrading from F8 to F9.

From
http://fedoraproject.org/wiki/Packaging/NamingGuidelines#head-3cfc1ea19d28975faad9d56f70a6ae55661d3c3d

If a package is being renamed without any functional changes, or is a compatible
enough replacement to an existing package (where "enough" means that it includes
only changes of magnitude that are commonly found in version upgrade changes), ...
If a package supersedes/replaces an existing package without being a compatible
enough replacement as defined in above, use only the Obsoletes from above.

Comment 8 Axel Thimm 2008-03-06 11:30:20 EST
The following patch to the specfile fixes the issues. All libtermcap-devel
dependent packages I tried build fine with it. This is not to say that I
properly reviewed full backwards compatibility, but it seems to do the trick.

@@ -69,6 +69,7 @@
 Group: Development/Libraries
 Requires: %{name}-libs = %{version}-%{release}
 Obsoletes: libtermcap-devel < 2.0.8-48
+Provides: libtermcap-devel = 2.0.8-48
 
 %description devel
 The header files and libraries for developing applications that use
@@ -201,6 +202,8 @@
 
 rm -f ${RPM_BUILD_ROOT}%{_libdir}/terminfo
 
+ln -s ncurses/termcap.h ${RPM_BUILD_ROOT}%{_includedir}/
+
 %post libs -p /sbin/ldconfig
 
 %postun libs -p /sbin/ldconfig
@@ -248,6 +251,7 @@
 %{_includedir}/panel.h
 %{_includedir}/term.h
 %{_includedir}/unctrl.h
+%{_includedir}/termcap.h
 %{_mandir}/man3/*
 
 %files static
Comment 9 Miroslav Lichvar 2008-03-06 12:30:22 EST
(In reply to comment #8)
> The following patch to the specfile fixes the issues. All libtermcap-devel
> dependent packages I tried build fine with it.

Which library they were linked with? Without "INPUT(-ltinfo)" or similar in
/usr/lib/libtermcap.so the build should fail when trying to link, unless the
packages also support linking with ncurses.
Comment 10 Axel Thimm 2008-03-06 12:49:41 EST
All builds were against rawhide from some days/weeks ago. I admit not to have
tested running them, maybe I'll have a bad surpise. :/

Can you add INPUT(-ltinfo) to fix any possible compatibility issues? Thanks!
Comment 11 Miroslav Lichvar 2008-03-07 08:48:28 EST
Ok, ncurses-5.6-16.20080301.fc9 provides libtermcap.so and /usr/include/termcap.h.

This affects building of packages which search in configure script for
libtermcap first, but it should be harmless.

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