Bug#546837: The 'pi.owner_id' needs to be cast to a string
Stephan Peijnik
debian at sp.or.at
Tue May 25 11:38:44 UTC 2010
On Mon, 2010-05-24 at 18:00 -0400, Dominique Brazziel wrote:
> You may have hit this already, but if not:
>
> From these lines in 'processinfo.py':
>
> self._owner_uid = int(data[1])
>
> def owner_uid(self):
> """ Process owner UID """
> return self._owner_uid
>
> The 'pi.owner_uid' can't be concatenated to the string
> '-u#', so this line in ChangelogViewer.py fails:
>
> command = ['sudo', '-u#' + pi.owner_uid...
>
> Stripped down patch is -
>
> --- ChangelogViewer.py.save 2010-05-24 17:07:33.000000000 -0400
> +++ ChangelogViewer.py 2010-05-24 17:23:32.000000000 -0400
> @@ -227,7 +227,8 @@
> if os.getuid() == 0:
> pi = find_nonroot_parent()
> if pi:
> - command = ['sudo', '-u#' + pi.owner_ui, command]
> + struid = str(pi.owner_uid)
> + command = ['sudo', '-u#' + struid] + command
> else:
> LOG.fatal('Could not detect original user.')
> return
All of this has been fixed in upstream release 0.200.4. See
http://bzr.debian.org/loggerhead/update-manager/devel/main/changes? for
details.
Regards,
Stephan
PS: Your patch is broken. The indentation of struid looks bad to me.
More information about the pkg-gnome-maintainers
mailing list