pkgsrc-Users archive

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

Re: make clean vs find work dir and delete

On 05/04/18 05:45, Steven Sartorius wrote:
On May 3, 2018, at 20:26, Jason Bacon <> wrote:

On 05/03/18 16:09, John Nemeth wrote:
On May 1,  1:23pm, Mayuresh wrote:
} If I wish to clean pkgsrc area, typically to conserve disk space, I run
} something like this.
} # find /usr/pkgsrc -type d -name work -exec rm -rf {} \;
} Instead if I do "make clean" in /usr/pkgsrc, which sounds more appropriate
} method, it takes much longer.
} I am curious what pkgsrc users would do for above scenario. Or is there
} any way to achieve the result faster.

      I do cd /usr/pkgsrc && rm -r */*/work .  That seems to be the
fastest way.  I suppose one could do something like set PKGOBJDIR(?)
to /usr/pkgobj then just do rm -r /usr/pkgobj.

}-- End of excerpt from Mayuresh
I use the attached scripts.

I'm leaning toward replacing the rm -rf */*/work with a loop containing (cd $pkg && bmake clean).  I think where there's an interface provided for something, it should generally be used and developed rather than reinvented, especially if there may be edge cases.

Why not just use pkgclean from pkgsrc/pkgtools?

That's a nice tool, although it doesn't handle distfiles.  Probably the right place to put future enhancements since it's been around a while and is probably well tested.

Home | Main Index | Thread Index | Old Index