AOSC-Archive / autobuild3

AOSC OS package maintenance toolkit (version 3)
https://aosc.io
GNU General Public License v2.0
24 stars 17 forks source link

PM: Non-MPMs should also get a chance to load so of their lib helper funcs. #53

Open MingcongBai opened 9 years ago

MingcongBai commented 9 years ago

rpmarch is still absent from autobuild3.

Artoria2e5 commented 9 years ago

This doesn't break anything now, I am rephrasing the issue.

MingcongBai commented 9 years ago

@Arthur2e5 This breaks rpm installation, as it looks for rpm file from armhf (first term possible?).

Artoria2e5 commented 9 years ago

@MingcongBai As far as I can see, ARCH_RPM[armel]=armfhp.

MingcongBai commented 9 years ago

@Arthur2e5 But it happened on my x86_64 machine.

Artoria2e5 commented 9 years ago

ARCH_RPM[amd64]=x86_64, so look elsewhere for the bug. e.g. How the hell we called it.

Artoria2e5 commented 9 years ago

We only have two references to rpmarch, both running in almost the same way, which falls from CROSS to ARCH. So how could this happen?

# rpm/install
rpm $PM_ROOTPARAM -Uvh /root/rpmbuild/RPMS/$(rpmarch ${CROSS:-$ARCH})/$PKGNAME-$PKGVER-$PKGREL*.rpm
# rpm/pack
rpmbuild $([ "$CROSS" ] && rpmarch $CROSS) -bb abspec || aberr "RPM PACKING FAILED."
MingcongBai commented 9 years ago

@Arthur2e5 So how about this?

abtrycmd rpmarch || rpmarch(){ echo "${ARCH_RPM[$1]:-$1}"; }

It would not make sense not to include this in pack as well, eh?