[sos-devel] Should _expand_copy_spec() return broken symlinks
Louis Bouchard
louis.bouchard at canonical.com
Thu Apr 13 11:57:04 UTC 2017
Hello,
I just ran into this while testing 3.4. Ubuntu Trusty has a bug where
/etc/blkid.tab turns out to be a broken symlink.
But add_copy_spec() does this :
> for _file in files:
> current_size += os.stat(_file)[stat.ST_SIZE]
> if sizelimit and current_size > sizelimit:
> limit_reached = True
> break
> self._add_copy_paths([_file])
files comes from :
> self._expand_copy_spec(copyspec)
and _expand_copy_spec() will return /etc/blkid.tab, since the file exists, but
os.stat() will fail since there is nobody at the other end of the symlink.
Obviously, it is an O/S bug that needs to be fixed, but should
_expand_copy_spec() return something when there is no _real_ file at the other end ?
If so, I'm happy to fix this, as it breaks my packaging tests. Otherwise, I'll
fix the packaging accordingly.
Kind regards,
...Louis
--
Louis Bouchard
Software engineer, Cloud & Sustaining eng.
Canonical Ltd
Ubuntu developer Debian Maintainer
GPG : 429D 7A3B DD05 B6F8 AF63 B9C4 8B3D 867C 823E 7A61
More information about the sos-devel
mailing list