Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153109 - Use py-freebsd module for the remaining flags mangling python side
Summary: Use py-freebsd module for the remaining flags mangling python side
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 193766 181949
  Show dependency tree
Reported: 2006-10-27 18:09 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2007-09-25 16:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

portage-2.1.2_pre3-pyfreebsd.patch (portage-2.1.2_pre3-pyfreebsd.patch,3.76 KB, patch)
2006-10-27 18:10 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-27 18:09:32 UTC
Zac already reviewed a patch that moves most of bsdflags mangling from python side to sh side, by using mtree(1) command to save and restore the flags (also fixing a few other issues like stripping and Set[UG]ID permissions handling work as intended). With the attached patch, the python side will use py-freebsd module (dev-python/py-freebsd) instead of the custom bsdchflags implementation (the module is maintained and supported by an upstream FreeBSD developer), together with the new st_flags attribute in stat objects (in upstream Python sources for a while now if I remember correctly).

This is probably to be left for 2.1.3 to a least as it requires to add py-freebsd to dependencies, and bsdchflags won't need to be built anymore.

Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-27 18:10:51 UTC
Created attachment 100629 [details, diff]
Comment 2 Zac Medico gentoo-dev 2006-10-28 03:52:44 UTC
Thanks, the mtree patch is in trunk r4863 and the 2.1.2 branch r4864.

Apparently the py-freebsd patch makes the preinst/postinst mtree stuff unnecessary, but the mtree stuff in prepall will still be needed.  I guess I'll merge the  py-freebsd stuff into trunk sometime before the first 2.1.3_pre release.  Are you sure that you don't want the py-freebsd stuff in 2.1.2?  Are there any technical issues preventing it, such as backward compatibility?
Comment 3 Zac Medico gentoo-dev 2006-10-28 04:31:30 UTC
After thinking about the mtree patch some more, I'm wondering if it's possible for the postinst mtree command to change the flags on existing directories in ways that you didn't intend.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-28 05:11:31 UTC
Well, starting from the fact that no directory should have immutable flag anyway, and I somehow don't like the current way portage handle that (effectively bypassing the immutable flag set on directories), mtree might just reset the flags to none as they supposed to be.

It's not a 100% perfect implementation but it's not that bad either, it actually solves a few issues with the previous implementation, too.

And this patch using py-freebsd does not replace the mtree(1), as without mtree(1) usage, the installed files will have no flags at all... the py-freebsd usage instead removes the code currently handled by mtree from the python side (making exceptions really exceptional cases) and removing the need for having a custom module implemented to access chflags.

These two patches are complementary basically.

And the main reason for not having this in 2.1.2, while having mtree(1) there is that I'd like 2.1.2 being the latest version available for 6.1 profile, adding sandbox dependency on the next version for 6.2 profile.
Comment 5 Zac Medico gentoo-dev 2006-10-28 16:38:10 UTC
The mtree patch has been released in 2.1.2_rc1-r1.
Comment 6 Zac Medico gentoo-dev 2007-02-01 22:43:02 UTC
In svn r5870 py-freebsd replaces our old chflags module.
Comment 7 Zac Medico gentoo-dev 2007-06-15 03:24:25 UTC
This has been released in 2.1.3_rc1.