public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	mathieu.dubois-briand@bootlin.com
Cc: alex.kanavin@gmail.com, Ross Burton <ross.burton@arm.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v7 1/7] package_rpm.bbclass: Drop external dependency generator to support rpm 6
Date: Tue, 3 Mar 2026 20:01:07 +0800	[thread overview]
Message-ID: <e4bed048-61eb-425a-a3bf-a3906145938d@windriver.com> (raw)
In-Reply-To: <86d3c351-16e9-44bd-8b38-b8c6ed75aa0a@windriver.com>

Hi Mathieu,

Correct Ross' email (I had planed to ask Ross for help about cairo, but used
the wrong email, now the issue has been fixed, thanks all the same).

And please see my reply below.

On 3/3/26 17:41, Robert Yang wrote:
> Hi RP,
> 
> Thanks for the comments.
> 
> On 3/2/26 18:57, Richard Purdie wrote:
>> On Sun, 2026-03-01 at 04:25 -0800, Robert Yang via lists.openembedded.org wrote:
>>> From: Robert Yang <liezhi.yang@windriver.com>
>>>
>>> The rpm 6 doesn't support external dependency generator. Oe-core used it for
>>> per file dependency which was saved into pn.requires and pn.provides, but that
>>> hasn't been used any more since 2012 (rev:
>>> be40f6d0bb80274366af00461112af65687a4de8), and there were no complains or
>>> updates in the past 13 years, so just drop it to support rpm 6.
>>
>> This commit message is confusing. I think we need to be clear about the
>> following:
>>
>> Is this file dependency information written into the existing rpms with
>> rpm 5?
> 
> I think you mean rpm 4 here, no, it isn't:
> * You disabled it by default since 2012 (rev: 
> be40f6d0bb80274366af00461112af65687a4de8), and said:
> 
>      Since few people use the per file dependency information, this patch
>      goes for the faster approach. It can be enabled if anyone needs it although
>      I'd mention that its being used to us as this code may well go away in
>      the future if nobody complains.
> 
> * And even if we enable it manually, these info are just used by rpmbuild, 
> others shouldn't use it?
> 
>>
>> After the changes, do we still have the file dependency information or
>> is this being removed?
> 
> Yes, we will still have the file dependency information generated by rpmbuild,
> here are related code from rpm:
> 
>      /* If new-fangled dependency generation is disabled ... */
>      if (!rpmExpandNumeric("%{?_use_internal_dependency_generator}")) {
>      if (fc->rpmformat < 6) {
>          /* ... then generate dependencies using %{__find_requires} et al. */
>          rpmlog(RPMLOG_WARNING,
>          _("Deprecated external dependency generator is used!\n"));
>          rc = rpmfcApplyExternal(fc);
>      } else {
>          rpmlog(RPMLOG_ERR,
>          _("External dependency generator is incompatible with v6 packages\n"));
>          rc = RPMRC_FAIL;
>      }
>      } else {
>      /* ... otherwise generate per-file dependencies */
>      rc = rpmfcApplyInternal(fc);
>      }
> 
>>
>> I think you're saying there were no external users after 2012 but I'm
>> not even 100% sure about that.
> 
> These info are for rpmbuild, there shouldn't be external users? And we must drop
> it to support rpm 6.
> 
> And now I can't reproduce the build errors from autobuilder, I suspect it is
> because of host contamination issues, I tried to reproduce it on ubuntu
> 25.04 and debian v12, but can't reproduce them, it looks to me that cairo.pc's
> provides (pkgconfig(cairo) = 1.18.4) wasn't generate in autobuilder, but I don't
>   know why.

I've figured out the root cause, it is because I had added pkgconfig-native to
PACKAGE_DEPENDS, it would fail when do_packagedata is from sstate cache, but
do_package_write_rpm is re-run (not from sstate-cache), here is the reproducer:
$ bitbake cairo -ccleansstate && bitbake cairo -cpackagedata && bitbake cairo 
-cclean && bitbake cairo -cpackage_write_rpm

$ rpm -qp --provides tmp/deploy/rpm/cortexa57/libcairo-dev-1.18.4-r0.cort
exa57.rpm
cairo-dev = 1.18.4
libcairo-dev = 1.18.4-r0

Then the "pkgconfig(cairo) = 1.18.4" is gone from the provides which is
incorrect. I should add pkgconfig-native as rpm-native:
  python () {
      if d.getVar('PACKAGES') != '':
          deps = ' rpm-native:do_populate_sysroot 
virtual/fakeroot-native:do_populate_sysroot'
+        # The pkgconfig-native is required by rpm's pkgconfigdeps.sh
+        deps += ' pkgconfig-native:do_populate_sysroot'
          d.appendVarFlag('do_package_write_rpm', 'depends', deps)
          d.setVarFlag('do_package_write_rpm', 'fakeroot', '1')


I've updated it in the pull (patch 7). @Mathieu, would you please help to
re-test it if RP has no objections on the external generator?

   https://github.com/robertlinux/yocto rbt/rpm
   https://github.com/robertlinux/yocto/tree/rbt/rpm

for you to fetch changes up to f8fa3090196bae3e12ad76f12f101722d84ca20a:

   rpm: 4.20.1 -> 6.0.1 (2026-03-03 11:29:07 +0000)

----------------------------------------------------------------

Robert Yang (7):
   package_rpm.bbclass: Drop external dependency generator to support rpm
     6
   package_rpm.bbclass: Define _lib and _libdir for rpmbuild
   lib/oe/package.py: Don't add ldconfig_postinst_fragment for glibc or
     musl
   glib/python3/acl: Add pkgconfig to RDEPENDS
   lib/oe/package.py: Don't redirect stderr
   target-sdk-provides-dummy: Add pkg-config to DUMMYPROVIDES
   rpm: 4.20.1 -> 6.0.1

// Robert

> 
> We didn't get such issues in rpm4 was because rpm/scripts/pkgconfigdeps.sh 
> didn't work in Yocto in the past, now rpm6 makes it work, so we got so many
> corner case issues, I've tried do as many tests I can, but still failed.
> 
> // Robert
> 
>  > > Cheers,
>>
>> Richard
> 



  reply	other threads:[~2026-03-03 12:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 12:25 [PATCH v7 0/7] rpm: 4.20.1 -> 6.0.1 liezhi.yang
2026-03-01 12:25 ` [PATCH v7 1/7] package_rpm.bbclass: Drop external dependency generator to support rpm 6 liezhi.yang
2026-03-02 10:57   ` [OE-core] " Richard Purdie
2026-03-03  9:41     ` Robert Yang
2026-03-03 12:01       ` Robert Yang [this message]
2026-03-04 17:52         ` Mathieu Dubois-Briand
2026-03-07 15:22           ` Robert Yang
2026-03-09  7:04             ` Mathieu Dubois-Briand
2026-03-09  7:15               ` Mathieu Dubois-Briand
2026-03-12 13:43                 ` Robert Yang
2026-03-12 15:40                   ` Mathieu Dubois-Briand
2026-03-09  7:26               ` Robert Yang
2026-03-10 10:21                 ` Robert Yang
2026-03-01 12:25 ` [PATCH v7 2/7] package_rpm.bbclass: Define _lib and _libdir for rpmbuild liezhi.yang
2026-03-01 12:26 ` [PATCH v7 3/7] lib/oe/package.py: Don't add ldconfig_postinst_fragment for glibc or musl liezhi.yang
2026-03-01 12:26 ` [PATCH v7 4/7] glib/python3/acl: Add pkgconfig to RDEPENDS liezhi.yang
2026-03-01 12:26 ` [PATCH v7 5/7] lib/oe/package.py: Don't redirect stderr liezhi.yang
2026-03-01 12:26 ` [PATCH v7 6/7] target-sdk-provides-dummy: Add pkg-config to DUMMYPROVIDES liezhi.yang
2026-03-01 12:26 ` [PATCH v7 7/7] rpm: 4.20.1 -> 6.0.1 liezhi.yang
2026-03-02 10:47 ` [PATCH v7 0/7] " Mathieu Dubois-Briand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4bed048-61eb-425a-a3bf-a3906145938d@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=ross.burton@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox