[yocto] Fix 'PACKAGES' in net-snmp recipe

Huang, Jie (Jackie) Jackie.Huang at windriver.com
Sun Mar 18 18:51:14 PDT 2018



> -----Original Message-----
> From: Khem Raj [mailto:raj.khem at gmail.com]
> Sent: Monday, March 19, 2018 05:54
> To: Kosta Zertsekel
> Cc: yocto at yoctoproject.org; Huang, Jie (Jackie); Enache, Catalin; Zhou, Li
> Subject: Re: [yocto] Fix 'PACKAGES' in net-snmp recipe
> 
> On Sat, Mar 17, 2018 at 11:46 PM, Kosta Zertsekel
> <KZertsekel at advaoptical.com> wrote:
> > Hi guys,
> >
> >
> > As for now (master branch) 'PACKAGES' variable in net-snmp equals to:
> >
> > ```
> >
> > $ bitbake -e net-snmp | grep "^PACKAGES="
> >
> > PACKAGES="net-snmp-dbg net-snmp-staticdev net-snmp-dev net-snmp-doc
> > net-snmp-locale  net-snmp net-snmp-libs net-snmp-mibs net-snmp-server
> > net-snmp-client net-snmp-server-snmpd net-snmp-server-snmptrapd "
> > ```
> >
> > This seems to be wrong as many built packages from 'packages-split'
> > directory of net-snmp are empty:
> >
> > ```
> > $ du -a --max-depth=1 . | sort -n
> > 4    ./net-snmp
> > 4    ./net-snmp-client.shlibdeps
> > 4    ./net-snmp-doc
> > 4    ./net-snmp-libs.shlibdeps
> > 4    ./net-snmp-locale
> > 4    ./net-snmp-server
> > 4    ./net-snmp-server-snmpd.shlibdeps
> > 4    ./net-snmp-server-snmptrapd.shlibdeps
> > 4    ./net-snmp-staticdev
> > 48    ./net-snmp-server-snmptrapd
> > 72    ./net-snmp-server-snmpd
> > 1208    ./net-snmp-dev
> > 1480    ./net-snmp-client
> > 1812    ./net-snmp-mibs
> > 2872    ./net-snmp-libs
> > 15308    ./net-snmp-dbg
> > ```
> >
> > Well, the culprit commit is 5eec0615e548f58ecdfadfc45af5805eeb58f69c where
> > the below change has happened:
> > ```
> > -PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static
> > ${PN}-libs \
> > -            ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd
> > ${PN}-server-snmptrapd"
> > +PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client
> > ${PN}-server-snmpd ${PN}-server-snmptrapd"
> > ```
> >
> > This new 'PACKAGES' variable is wrong IMHO, because it contains
> > the 'net-snmp' package and other empty packages.
> >
> >
> > Please review (and apply if ok) the attached commit that fixes it.
> >
> 
> are there specific issue you are seeing besides the packages being empty ?
> I would suggest to apply _remove operation to remove the empty packages
> if needed from PACKAGES variable

I agree, I don't think it's an issue that the packages being empty, and actually they're handled properly with:

ALLOW_EMPTY_${PN} = "1"
ALLOW_EMPTY_${PN}-server = "1"

RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'net-snmp-perl-modules', '', d)}"
RDEPENDS_${PN} += "net-snmp-client"
RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"

So you can assume that "net-snmp" = "net-snmp-client" ( plus 'net-snmp-perl-modules' if 'perl' packgeconfig 
is enabled ), and "net-snmp-server" = " net-snmp-server-snmpd" + "net-snmp-server-snmptrapd "

Thanks,
Jackie

> 
> >
> > Thanks,
> >
> > --- Kosta Z.
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >


More information about the yocto mailing list