freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
379 stars 161 forks source link

Behaviour of -c option between bulk and testport #1091

Open ocochard opened 7 months ago

ocochard commented 7 months ago

I was testing a new port with a lot of dependencies, so I've ran the command "testport -c" to be able to build and test with all different port's option. poudriere testport -c category/name

Once done, I've replaced the command 'testport' by a 'bulk' to generate the package to test it. But the '-c' was still here, and I'm ending rebuilding 500 packages because the "bulk -c" mean clean all existing packages :-( Which mean my CPU consumed electricity because this stupid mistake, then generated CO2 for nothing, then it will end life on earth earlier than expected. So could you have a smart idea (because I have no idea how to do that) to prevent that:

Thanks

arrowd commented 7 months ago

I saw several issues on this matter. I can at least share workaround for this: rm -rf /usr/local/poudriere/data/packages/<yourjail>-<yourports>/.building. This will restore the state as if you didn't run bulk -c.

jlduran commented 7 months ago

Also, poudriere bulk -b could help reduce your CO₂ emissions, however if you have many port customizations, a clean energy source will probably be recommended before accepting a change such as -c <-> -C.

bdrewery commented 2 months ago

Maybe we should remove testport -c and make it testport -C. Switching to bulk -C will do something different than testport -c but at least it will only remove the packages listed for testing which naturally makes sense when switching to bulk. Thoughts?

arrowd commented 2 months ago

This is not a problem for me anymore, see my previous comment.

But I agree that switching to the capital letter makes it less destructive.

ocochard commented 2 months ago

Maybe we should remove testport -c and make it testport -C. Switching to bulk -C will do something different than testport -c but at least it will only remove the packages listed for testing which naturally makes sense when switching to bulk. Thoughts?

I like it