cleaning build dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

i am wondering atm about the prefered way to cleanup the build dir,
not the build root!

Many tutorials out there suggest something like this in the %clean
section

   test "X$RPM_BUIlD_ROOT" != "X/" && rm -rf "$RPM_BUILD_ROOT"

The rpmbuild command provides the --clean flag to delete the build dir
after finishing.
But i could also use something like this in the clean section

   test "X$RPM_BUIlD_ROOT" != "X/" && rm -rf "$RPM_BUILD_ROOT"
   if test "X$RPM_BUILD_DIR" != "x/"; then
      cd "$RPM_BUILD_DIR"
      rm -rf "${RPM_PACKAGE_NAME}-$RPM_PACKAGE_VERSION"
   fi

which would delete the build dir and the build root.
So what is the prefered way to do it. IIUC the %clean section is exactly
for this. Cleaning up after build.

wondering

   --lars


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux