Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94637 - Add support for struct stat st_flags attribute
Summary: Add support for struct stat st_flags attribute
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All FreeBSD
: High enhancement (vote)
Assignee: Python Gentoo Team
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
Depends on:
Blocks: 94661
  Show dependency tree
 
Reported: 2005-05-31 09:49 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2006-04-12 10:50 UTC (History)
3 users (show)

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


Attachments
python-2.3.5-st_flags.patch (python-2.3.5-st_flags.patch,1.42 KB, patch)
2005-05-31 09:49 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff
python-2.4.1-st_flags.patch (python-2.4.1-st_flags.patch,5.52 KB, patch)
2005-06-20 04:45 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 2005-05-31 09:49:19 UTC
The stat structure (filled by stat() calls) on FreeBSD and OSX (probably Darwin, too) contains an st_flags attribute which contains the file's special flags.

That attribute isn't seen by vanilla Python, but having it available will avoid us to have to use bsd_chflags module to call stat and get that value.

The attached patch applied over 2.3 and 2.4 sources adds support for st_flags attribute.

Thanks in advance, Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-31 09:49:45 UTC
Created attachment 60283 [details, diff]
python-2.3.5-st_flags.patch
Comment 2 SpanKY gentoo-dev 2005-05-31 12:56:04 UTC
a 'small' note ...

alpha is the only linux arch which has st_flags defined in asm/stat.h ... the
thing to be aware of though (again, only applies to alpha):
- linux 2.6 introduced the 'stat' and 'stat64' structs
- st_flags is *only* in 'stat' in asm/stat.h, 'stat64' has no such member
- glibc is stupid and defines st_flags in both 'stat' and 'stat64'
- when using autoconf's AC_CHECK_MEMBERS, it tends to read sys/stat.h before
asm/stat.h ... that means the configure process will find glibc's stat64 which
has st_flags and say 'system has st_flags !' ... but if your source code
includes asm/stat.h, stat64 will not have st_flags and you'll get a build failure :P
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-31 13:03:17 UTC
... i hate glibc!... 
 
SpanKY.. suggestions? 
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-06-02 07:18:58 UTC
Can anyone in alpha team find a way to fix the st_flags problem there? 
The patch as-is it's applied on Python tree now. 
 
Comment 5 Bryan Østergaard (RETIRED) gentoo-dev 2005-06-16 14:21:08 UTC
Added to portage.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-06-20 04:41:53 UTC
As said on IRC, the current patch requires to autoreconf to be run. 
I'm going to attach a version which also changes configure avoiding this 
requirement. 
 
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-06-20 04:45:06 UTC
Created attachment 61569 [details, diff]
python-2.4.1-st_flags.patch
Comment 8 Bryan Østergaard (RETIRED) gentoo-dev 2005-07-19 15:49:12 UTC
Thanks Diego, patch updated.