Closed Icenowy closed 9 years ago
Loaddef uses loadfiles internally, which does not stop on found. Read the current one and come back.
I don't mean you can have no main defines but sub-defines, but I mean that sub-defines can patch to main defines
For example, for arch amd64,mipsel,blah, PKGDEP=a b c, but for armel, d is also needed. I can write autobuild/defines: PKGDEP="a b c" autobuild/armel/defines: PKGDEP+=" d"
At last, do not change the program logic, unless you know why it's written.
RedBullshit. Luke it.
RedBullshit. Luke it.
But it really did not work.
Fine, tracing.
It does work. Minimal reproduction code used:
# not sourcing the whole file so we don't fail at pm lib
ARCH_FINDFILELIST=("autobuild/cross-$ARCH-$CROSS" "autobuild/cross-$CROSS" "autobuild/$ARCH" "autobuild")
arch_loadfiles(){
local _archpath _archpidx _archokay=0
for (( _archpidx = "${#ARCH_FINDFILELIST[@]}"; _archpidx; --_archpidx ))
do
_archpath="${ARCH_FINDFILELIST[$_archpidx]}"
if [ -e "$_archpath/$1" ]; then
. "$_archpath/$1"
_archokay=1
fi
done
(( _archokay )) || return 127
}
arch_loaddef(){ arch_loadfiles defines; }
ARCH=amd128
cd "$(mktemp -d)"
mkdir -p autobuild/amd128
echo echo a > autobuild/defines
echo echo amd128 > autobuild/amd128/defines
arch_loaddef
define is not plain echo
@Arthur2e5 Please do not close this yet, I am investigating this issue.
@Arthur2e5 Test case is extra-gnome/nautilus
.
AND DEFINE IS NOT PLAIN ECHO BUT THOSE ARE ALL CODE RUN
If you want it, fine, change echo
to PKGFAK+=a
and see
CODE SHOULD NOT ONLY RUNS, BUT ALSO RUN IN A SPECIFIED SEQUENCE. DO YOU THINK A GENERAL defines CAN OVERRIDE WHAT IS DEFINED IN A SPECIFIED ONE?
IT DID NOT COULD YOU PLEASE FUCKING READ THE OUTPUT?
Okay, gotcha.
... oh...?
Okay, gotcha.
Let me make a test case real soon...
... oh...?
I've tested it
Let me make a test case real soon...
永远没有把bug assign给用户的做法
I've tested it
永远没有把bug assign给用户的做法
@JeffBai 咦,发生什么了
我倒是知道有个设计纰漏 也就是 ab/cross-$CROSS 和 ab/$ARCH 意味着在 armel 上打包 armel 的时候你不能用 cross 过来的那个,反之亦然 但很可惜不是我的锅 总之关我肉棒事…( 自己留下了个垃圾设计现在又装孙,啊不装用户
So go mkfs yourself luser.
look at the original arch_loaddef Why is ARCH_FINDFILELIST reverted before finding and sourceing? Because autobuild/x/defines can override autobuild/defines
Commit 9cbdb1229e9fe8754774aea2ffb0e18421acfe14 broken this feature, and make arch_loaddef a nonsense, as the specified defines will be override by the general one.