From b18e54a088e84ed31f320d69b904af3f999adb2b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 18 Sep 2015 06:21:35 +0200 Subject: Get rid of 'updated' state; clean in pkg-disfigure --- bpkg/pkg-disfigure.cxx | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'bpkg/pkg-disfigure.cxx') diff --git a/bpkg/pkg-disfigure.cxx b/bpkg/pkg-disfigure.cxx index 48e54ba..fca5dd7 100644 --- a/bpkg/pkg-disfigure.cxx +++ b/bpkg/pkg-disfigure.cxx @@ -41,18 +41,26 @@ namespace bpkg // Form the buildspec. // - // Why do we need to specify src_root? While it shouldn't be - // necessary for a completely configured package, we might - // also be called to disfigure a partially configured one. - // string bspec; - if (src_root == out_root) - bspec = "disfigure(" + out_root.string () + "/)"; + if (p->state != state::broken) + { + bspec = "clean(" + out_root.string () + "/) " + "disfigure(" + out_root.string () + "/)"; + } else - bspec = "disfigure(" + - src_root.string () + "/@" + - out_root.string () + "/)"; + { + // Why do we need to specify src_root? While it's unnecessary + // for a completely configured package, here we disfigure a + // partially configured one. + // + if (src_root == out_root) + bspec = "disfigure(" + out_root.string () + "/)"; + else + bspec = "disfigure(" + + src_root.string () + "/@" + + out_root.string () + "/)"; + } level4 ([&]{trace << "buildspec: " << bspec;}); -- cgit v1.1