After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683846 - manifests filelists incorrect when module has soft links
manifests filelists incorrect when module has soft links
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal minor
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2012-09-12 04:01 UTC by Craig Keogh
Modified: 2012-09-13 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not walk into links when accumulating list of installed files (1003 bytes, patch)
2012-09-12 06:42 UTC, Frederic Peters
committed Details | Review

Description Craig Keogh 2012-09-12 04:01:09 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
Comment 1 Frederic Peters 2012-09-12 06:42:48 UTC
Created attachment 224068 [details] [review]
Do not walk into links when accumulating list of installed files
Comment 2 Craig Keogh 2012-09-12 07:38:28 UTC
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 3 Craig Keogh 2012-09-12 13:01:04 UTC
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
Comment 4 Craig Keogh 2012-09-13 12:19:50 UTC
(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