Bug 32138

Summary: bm -l cleans up BUILD* dir when it wasn't in mga8
Product: Mageia Reporter: Bruno Cornec <bruno>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: jani.valimaa
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: bm-3.3-1.mga9 CVE:
Status comment:

Description Bruno Cornec 2023-07-25 18:23:47 CEST
Description of problem:

bm has changed in cauldron its default when called with -l. In Mageia 8 the content of directories BUILD and BUILDROOT was kept in all cases. Now when packages are built, tese directories are cleaned up, and there is no way to avoid that (option --clean exists but not option --noclean)

Version-Release number of selected component (if applicable):
3.2

How reproducible:
Each time a package is successfully built

Steps to Reproduce:
1. mgarepo co bm
2. cd bm
3. bm -l
4. Nothing left under BUILD and BUILDROOT


Typically an issue when you want to chase warnings not preventing the package to be built. Option should be left to packager and compatibility maintained with mga8.

So I propose that an option --no-clean be added and also tha -l revert to store_const instead of store_true.
Comment 1 Jani Välimaa 2023-07-25 19:50:03 CEST
It's not bm to blame, but rpmbuild. Since rpm 4.18.1 build tree is removed automatically on successfull binary package creation.

https://github.com/rpm-software-management/rpm/commit/6f945960affc7a2a2b49337458457273d8a4faf5

However, bm should pass --noclean to rpm like some other options.

CC: (none) => jani.valimaa

Comment 2 Jani Välimaa 2023-07-25 21:06:20 CEST
--noclean should work with bm-3.4-1.mga9 in core/updates_testing. Please test.

Source RPM: bm-3.2-11.mga9.src.rpm => bm-3.3-1.mga9

Comment 3 Bruno Cornec 2023-07-25 23:17:33 CEST
Works like a charm !! Thanks Jani :-)
Comment 4 Lewis Smith 2023-07-26 07:50:01 CEST
Thanks Jani indeed.

Resolution: (none) => FIXED
Status: NEW => RESOLVED