Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439570 - x11-libs/libfm-9999 doesn't create symlink /usr/include/libfm to /usr/include/libfm-1.0
Summary: x11-libs/libfm-9999 doesn't create symlink /usr/include/libfm to /usr/include...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2012-10-24 21:09 UTC by Dominique Michel
Modified: 2012-11-02 22:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,16.41 KB, text/plain)
2012-10-28 18:17 UTC, Dominique Michel
Details
build.log (build.log,196.83 KB, text/plain)
2012-10-28 18:25 UTC, Dominique Michel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Michel 2012-10-24 21:09:08 UTC
libfm-1.0.1 install the includes into /usr/include/libfm.
libfm-9999 install the includes into /usr/include/libfm-1.0 and create a symlink libfm -> libfm-1.0 in /usr/include.

After an update from libfm-1.0.1 to libfm-9999, I get:
# ls -l /usr/include|grep libfm
drwxr-xr-x  2 root root   4096 Oct 25 00:01 libfm
drwxr-xr-x  2 root root   4096 Oct 25 00:01 libfm-1.0
lrwxrwxrwx  1 root root      9 Oct 25 00:01 libfm.backup.0000 -> libfm-1.0

/zsr/include/libfm is empty but is left behind. Also, the symlink creation fail and create a wrong symlink.

This break other packages like pcmanfm:
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..
-DPACKAGE_DATA_DIR=\""/usr/share/pcmanfm"\"
-DPACKAGE_UI_DIR=\""/usr/share/pcmanfm/ui"\"
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -D_LARGEFILE_SOURCE
-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DG_ENABLE_DEBUG
-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=700 -pthread
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/gio-unix-2.0/ -I/usr/include/pango-1.0
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm
-Wall -Werror-implicit-function-declaration -march=native -O2 -pipe -ggdb
-MT pcmanfm-desktop.o -MD -MP -MF .deps/pcmanfm-desktop.Tpo -c -o
pcmanfm-desktop.o `test -f 'desktop.c' || echo './'`desktop.c
app-config.c:26:26: fatal error: libfm/fm-gtk.h: No such file or directory
compilation terminated.
make[2]: *** [pcmanfm-app-config.o] Error 1

Reproducible: Always
Comment 1 Dominique Michel 2012-10-24 21:14:37 UTC
After removing /usr/include/libfm and the symlink, libfm-9999 merge successfully.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2012-10-24 21:28:30 UTC
Upstream bug. Nothing we can do about it
Comment 3 LStranger 2012-10-24 22:12:25 UTC
(In reply to comment #2)
> Upstream bug. Nothing we can do about it

I'm sorry but you're wrong. Upstream can do nothing with it. I quote you what 'make install' doing on start of installation:

        if test -e "$(DESTDIR)$(includedir)/libfm"; then
                rm -rf "$(DESTDIR)$(includedir)/libfm"
        fi
        test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
        ln -s libfm-1.0 "$(DESTDIR)$(includedir)/libfm"

And original report clearly shows the symlink was created but emerge renamed it into libfm.backup.0000 and restored old directory. That cannot be fixed in the upstream but should be fixed in the portage instead.
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-10-24 22:43:40 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Upstream bug. Nothing we can do about it
> 
> I'm sorry but you're wrong. Upstream can do nothing with it. I quote you
> what 'make install' doing on start of installation:
> 
>         if test -e "$(DESTDIR)$(includedir)/libfm"; then
>                 rm -rf "$(DESTDIR)$(includedir)/libfm"
>         fi
>         test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
>         ln -s libfm-1.0 "$(DESTDIR)$(includedir)/libfm"
> 
> And original report clearly shows the symlink was created but emerge renamed
> it into libfm.backup.0000 and restored old directory. That cannot be fixed
> in the upstream but should be fixed in the portage instead.

I dont understand what you say
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-10-25 08:12:24 UTC
I also need a full build.log and emerge --info so I can try and reproduce it myself
Comment 6 Dominique Michel 2012-10-28 18:16:29 UTC
Also, after merging libfm-1.0.1, the includes are installed into /usr/include/libfm/libfm, when it should be /usr/include/libfm:

# equery f libfm
 * Searching for libfm ...
 * Contents of x11-libs/libfm-1.0.1:
/etc
/etc/xdg
/etc/xdg/libfm
/etc/xdg/libfm/libfm.conf
/etc/xdg/libfm/pref-apps.conf
/usr
/usr/bin
/usr/bin/libfm-pref-apps
/usr/include
/usr/include/libfm
/usr/include/libfm/libfm
/usr/include/libfm/libfm/fm-actions.h
/usr/include/libfm/libfm/fm-app-chooser-combo-box.h
/usr/include/libfm/libfm/fm-app-chooser-dlg.h
/usr/include/libfm/libfm/fm-app-info.h
/usr/include/libfm/libfm/fm-app-menu-view.h
/usr/include/libfm/libfm/fm-archiver.h
/usr/include/libfm/libfm/fm-bookmarks.h
Comment 7 Dominique Michel 2012-10-28 18:17:47 UTC
Created attachment 327624 [details]
emerge --info
Comment 8 Dominique Michel 2012-10-28 18:25:39 UTC
Created attachment 327626 [details]
build.log
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-10-31 22:43:50 UTC
Not sure if there is something wrong with the ebuild or portage should be able to handle this
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2012-10-31 22:45:07 UTC
I am also getting that

--- /usr/share/locale/
--- /usr/share/locale/el/
--- /usr/share/locale/el/LC_MESSAGES/
>>> /usr/share/locale/el/LC_MESSAGES/libfm.mo
--- /usr/bin/
>>> /usr/bin/libfm-pref-apps
--- /usr/include/
 * 
 * Installation of a symlink is blocked by a directory:
 *   '/usr/include/libfm'
 * This symlink will be merged with a different name:
 *   '/usr/include/libfm.backup.0000'
 * 
>>> /usr/include/libfm-1.0/
>>> /usr/include/libfm-1.0/fm-file-ops-job-change-attr.h
Comment 11 Zac Medico gentoo-dev 2012-11-01 06:18:58 UTC
(In reply to comment #9)
> Not sure if there is something wrong with the ebuild or portage should be
> able to handle this

PMS explicitly does not allow a symlink to replace a directory (see bug #326685).

As a workaround, it's possible resolve the collision manually as follows:

Step 1: Do *not* install the symlink in src_install, since it will trigger a file collision (have that ebuild remove the symlink at the end of src_install if it's installed by a Makefile or something like that).

Step 2: In pkg_preinst, rm -rf the colliding directory inside $ROOT. This will prevent the "merged with a different name" behavior that's shown in comment #10.

Step 3: In pkg_preinst, create the desired symlink inside ${D}. Portage will then merge the symlink and properly record it in CONTENTS.
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2012-11-01 21:25:35 UTC
It should be fixed. Please test it and report if it is still broken
Comment 13 Dominique Michel 2012-11-02 21:03:50 UTC
Thanks men. It work fine here.