diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-18 06:21:35 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-18 06:21:35 +0200 |
commit | b18e54a088e84ed31f320d69b904af3f999adb2b (patch) | |
tree | b61cd10098ec1355e8765717b153c232043a44b7 /bpkg/pkg-disfigure.cxx | |
parent | faafff4814b4bfbbd043d13899c81115bd0f8604 (diff) |
Get rid of 'updated' state; clean in pkg-disfigure
Diffstat (limited to 'bpkg/pkg-disfigure.cxx')
-rw-r--r-- | bpkg/pkg-disfigure.cxx | 26 |
1 files changed, 17 insertions, 9 deletions
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;}); |