diff options
author | jkh <jkh@FreeBSD.org> | 1995-04-22 13:58:24 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-04-22 13:58:24 +0000 |
commit | 631042660156d0f11cb143dc9a3fc9667a5705e2 (patch) | |
tree | 0fb33deff621eb7b07f74732bbece46c9f515373 /usr.sbin/pkg_install/create/perform.c | |
parent | 9f35997ce19bdb55060cf582bd750b9e58794f42 (diff) | |
download | FreeBSD-src-631042660156d0f11cb143dc9a3fc9667a5705e2.zip FreeBSD-src-631042660156d0f11cb143dc9a3fc9667a5705e2.tar.gz |
Second round:
1. Make paths work correctly.
2. Make pkg_add generally more robust in the face of failure.
3. Make the depend messages come out on stderr or stdout, but not both
interspersed! :-)
Diffstat (limited to 'usr.sbin/pkg_install/create/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 54c7fce..951ccce 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: perform.c,v 1.18 1995/04/22 00:59:33 jkh Exp $"; +static const char *rcsid = "$Id: perform.c,v 1.19 1995/04/22 01:20:13 jkh Exp $"; #endif /* @@ -174,6 +174,15 @@ pkg_perform(char **pkgs) return TRUE; /* Success */ } +/* + * This is evil. It is the command executed inline on tar's command line + * to presort file arguments in such a way as to put the all-important + * +* files at the front. I'm sure there's a way of doing this that's + * a hundred times more efficient, but I'm in a hurry right now and I don't + * have the time to think more about it.. -jkh + */ +#define SORTED_NAMES "`find . | sed -e 's/^\\.\\///' -e '/^\\.$/D' | sort`" + static void make_dist(char *home, char *pkg, char *suffix, Package *plist) { @@ -194,9 +203,10 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist) printf("Creating gzip'd tar ball in '%s'\n", tball); strcat(args, "cf"); if (ExcludeFrom) - ret = vsystem("tar %sX %s %s .", args, tball, ExcludeFrom); + ret = vsystem("tar %sX %s %s %s", args, tball, ExcludeFrom, + SORTED_NAMES); else - ret = vsystem("tar %s %s .", args, tball); + ret = vsystem("tar %s %s %s", args, tball, SORTED_NAMES); if (ret) barf("tar command failed with code %d", ret); } |