Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 477682

Summary: sys-apps/portage: enable usersync by default in FEATURES
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: 2.1   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=477664
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 277970    
Bug Blocks: 472632, 480280    

Description Zac Medico gentoo-dev 2013-07-22 00:57:00 UTC
The portage ebuild's pkg_postinst will have to adjust $PORTDIR permissions, since $PORTDIR may contain mixed permissions (see bug #277970).
Comment 1 Zac Medico gentoo-dev 2013-07-22 02:46:01 UTC
This is fixed in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=94d4ee45d0944fb112aa701449d7939f29c5ecd6

Since usersync assumes that the permissions of subdirectories are consistent with the top-level ${PORTDIR} permissions, the portage ebuild's pkg_postinst should do something like this:

if $USERSYNC_UPGRADE && [[ -d ${PORTDIR} ]] ; then
  case "${USERLAND}" in
    BSD)
      local ownership=$(stat -f '%Su:%Sg' "${PORTDIR}")
      ;;
    *)
      local ownership=$(stat -c '%U:%G' "${PORTDIR}")
      ;;
  esac
  chown -R "${ownership}" "${PORTDIR}"
fi
Comment 2 Zac Medico gentoo-dev 2013-07-26 07:11:43 UTC
This is fixed in 2.1.13 and 2.2.0_alpha189.