Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113536 - invalid flags in chflags -R
Summary: invalid flags in chflags -R
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2005-11-25 00:34 UTC by Karol Pasternak (RETIRED)
Modified: 2006-04-29 08:31 UTC (History)
1 user (show)

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


Attachments
Patch for chflags invalid flags (ebuild.sh.patch,546 bytes, patch)
2005-11-25 00:34 UTC, Karol Pasternak (RETIRED)
Details | Diff
ebuild.sh-nongnu.patch (ebuild.sh-nongnu.patch,524 bytes, patch)
2006-02-17 02:50 UTC, Benigno B. Junior (RETIRED)
Details | Diff
double call, with no $USERLAND check (chflags.patch,566 bytes, patch)
2006-04-28 16:38 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karol Pasternak (RETIRED) gentoo-dev 2005-11-25 00:34:13 UTC
In chflags on openbsd, nouunlnk and nosunlnk flags are invalid.
Apply patch is reuired.

Reproducible: Always
Steps to Reproduce:
1. cd /usr/lib/portage/bin 
2. patch -p0 < ebuid.sh.patch
Comment 1 Karol Pasternak (RETIRED) gentoo-dev 2005-11-25 00:34:46 UTC
Created attachment 73552 [details, diff]
Patch for chflags invalid flags
Comment 2 Benigno B. Junior (RETIRED) gentoo-dev 2005-11-25 05:43:29 UTC
It wouldn't be enough since NetBSD doesn't support "nouunlnk" and "nosunlnk"
either. We could use something like this:

if [ "$USERLAND" == "BSD" ] && type -p chflags &>/dev/null; then
   if [ "${CHOST/*-freebsd*}" != "${CHOST}" ]; then
      chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk "${BUILDDIR}"
   else
      chflags -R noschg,nouchg,nosappnd,nouappnd "${BUILDDIR}"
   fi
fi

But and what about DragonFly and others which could arise up against it again?
We should think about having two groups to separate them or implement a "case"
there. Darwin seems to follow NetBSD/OpenBSD in this case, though. Or we could
simply drop the usage of these kinda flags for BSD's.
Comment 3 Benigno B. Junior (RETIRED) gentoo-dev 2006-02-17 02:50:44 UTC
Created attachment 80001 [details, diff]
ebuild.sh-nongnu.patch

Is there any problem in dropping "nosunlnk,nouunlnk" in favor of the NetBSD, OpenBSD and Darwin?
Comment 4 Zac Medico gentoo-dev 2006-04-28 15:49:39 UTC
Is the patch okay with alt@ people?  Perhaps we can drop the $USERLAND test and simply use `type -p chflags` as the only test?
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-28 16:02:46 UTC
Can you put that under a double call? the first changes all the ones but the *unlnk ones, and then another that tries to change the rest?
Comment 6 Zac Medico gentoo-dev 2006-04-28 16:38:56 UTC
Created attachment 85711 [details, diff]
double call, with no $USERLAND check

How about this?
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-28 16:46:08 UTC
WFM
Comment 8 Zac Medico gentoo-dev 2006-04-28 18:11:49 UTC
This is in svn r3264.
Comment 9 Zac Medico gentoo-dev 2006-04-29 08:31:15 UTC
Released in 2.1_pre10.