On Sat, Sep 18, 2010 at 06:48:49PM -0700, Russ Allbery wrote:
> Guido Günther <[email protected]> writes:
> > On Sun, Sep 12, 2010 at 05:34:57PM -0400, Felipe Sateler wrote:
>
> >> Please enable git-pbuilder to respect export-dir (it jsut leaves the
> >> files in the parent directory at the moment).
>
> > Git-buildpackage handles this transparently when using it with
> > --git-pbuilder so git-pbuilder doesn't need to take care of this. Maybe
> > git-pbuilder should print a warning that it shouldn't be invoked
> > directly without any arguments (login, create)? Russ?
>
> Sure, that makes sense. How should it detect that it's being invoked
> directly?
It could check if the GBP_BUILD_DIR environment variable is unset and
neither "update", "create" or "login" where given:
diff --git a/git-pbuilder b/git-pbuilder
index 3d57ffb..81c3a89 100755
--- a/git-pbuilder
+++ b/git-pbuilder
@@ -91,6 +91,11 @@ update|create|login)
sudo cowbuilder --"$action" --basepath "$BASE" --dist "$DIST" $OPTIONS "$@"
exit $?
;;
+*)
+ if [ -z "$GBP_BUILD_DIR" ]; then
+ echo "Warning: not running under git-buildpackage" >&2
+ fi
+ ;;
esac
# Now we can finally run pdebuild. The quoting here is tricky, but this
Cheers
-- Guido
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]