Bug 473439

Summary: Fail to clean build dir for zxing-cpp
Product: [Developer tools] kdesrc-build Reporter: Fushan Wen <qydwhotmail>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ashark
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Arch Linux   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Fushan Wen 2023-08-16 06:31:51 UTC
SUMMARY
When I run `kdesrc-build plasma-workspace plasma-framework plasma-integration bluedevil powerdevil plasma-nm plasma-pa plasma-thunderbolt plasma-vault plasma-firewall kdeplasma-addons krunner milou kwin kscreen sddm-kcm plymouth-kcm breeze discover print-manager plasma-sdk kdeconnect-kde plasma-browser-integration xdg-desktop-portal-kde kde-gtk-config kgamma5 breeze-gtk drkonqi phonon flatpak-kcm kactivitymanagerd plasma-desktop --include-dep --refresh --ignore-module gpgme`, it always fails at unable to clean build folder for zxing-cpp.


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
Building zxing-cpp (72/131)
	Fetching remote changes to zxing-cpp
	Merging zxing-cpp changes from branch master
	Source update complete for zxing-cpp: no files affected
	  Rebuilding because the option refresh-build was set
	Preparing build system for zxing-cpp.
	Removing files in build directory for zxing-cpp
	Unable to clean zxing-cpp!

zxing-cpp didn't build, stopping here.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
kdesrc-build at 273c809d4c3d797bcad497f5062c86775093b87c

ADDITIONAL INFORMATION
rm -rf works
Comment 1 Andrew Shark 2023-12-21 14:39:30 UTC
Cannot reproduce with `kdesrc-build zxing-cpp --refresh-build`. I am getting:

```
 <<<  Build Process  >>>

Building zxing-cpp (1/1)
        Source update complete for zxing-cpp: no files affected
          Rebuilding because the option refresh-build was set
        Preparing build system for zxing-cpp.
        Removing files in build directory for zxing-cpp
        Old build system cleaned, starting new build system.
        Running cmake targeting Unix Makefiles...
        Compiling... succeeded (after 10 seconds)
        Installing zxing-cpp succeeded (after 0 seconds)

```

The warning you see is from this code:
```perl
        # Check to see if we're actually supposed to go through the
        # cleaning process.
        if (!$self->getOption('#cancel-clean') &&
            !$buildSystem->cleanBuildSystem())
        {
            warning ("\tUnable to clean r[$self]!");
            return 0;
        }
```

The cleanBuildSystem return hint:
```
# Returns 0 for failure, non-zero for success.
sub cleanBuildSystem
```

The 0 status at revision you mentioned happens only after the `error (...)`  message is shown, but you have not that printed.
If the issue still happens to you, please provide more details.