GNOME Bugzilla – Bug 683846
manifests filelists incorrect when module has soft links
Last modified: 2012-09-13 12:19:50 UTC
Related to bug 683566, libgphoto2 installs a soft link: 'gphoto2 -> .' within prefix/include/gphoto. Consequently, the libgphoto manifest filelist within prefix/_jhbuild/manifests is incorrect, see below. Incorrect manifest causes warnings about missing files when uninstalling and re-installing, but otherwise JHBuild seems ok. On quick glance the problem is within fileutils.accumulate_dirtree_contents(), called from process_install() within class Package of modtypes/__init__.py. libgphoto2 manifest looks like: /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2 /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-abilities-list.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-camera.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-context.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-file.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-filesys.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-library.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-list.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-info-list.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-log.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-portability.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-result.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-version.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-result.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-setting.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-version.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-widget.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-abilities-list.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-camera.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-context.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-file.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-filesys.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-library.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-list.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-info-list.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-log.h /opt/gnome/include/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2/gphoto2-port-portability.h
Created attachment 224068 [details] [review] Do not walk into links when accumulating list of installed files
Review of attachment 224068 [details] [review]: Thank you. Looks good. There is another separate but related bug. remove_files_and_dirs() within utils/fileutils.py isn't handling links to directories correctly. The links aren't getting removed. os.path.isdir(path) will return True for links to directories, and consequently a os.rmdir() is attempted on the link.
Comment on attachment 224068 [details] [review] Do not walk into links when accumulating list of installed files Committed. http://git.gnome.org/browse/jhbuild/commit/?id=2e97a3c1c2444c8299aefc55677c64d0b3f76520
(In reply to comment #2) > There is another separate but related bug. remove_files_and_dirs() within > utils/fileutils.py isn't handling links to directories correctly. The links > aren't getting removed. > > os.path.isdir(path) will return True for links to directories, and consequently > a os.rmdir() is attempted on the link. Fixed. http://git.gnome.org/browse/jhbuild/commit/?id=b9eb8082f61aa442eb52f42ed07c1ae9665d2f1e