Rename prepost-{inst,rm} to just INSTALL/REMOVE.
Some other changes related for this: - Modify binpkg.sh to always insert the INSTALL script at head of the archive, and appending files after it. - Modify binpkg.sh to compress binpkgs with bzip2 -9 to save some bytes. --HG-- extra : convert_revision : b651b944f11c48dede1bbcea658182bf0984e8f3
This commit is contained in:
parent
a0ee2ee61b
commit
a00ae944b5
7 changed files with 36 additions and 25 deletions
11
lib/unpack.c
11
lib/unpack.c
|
@ -151,7 +151,7 @@ unpack_archive_fini(struct archive *ar, const char *destdir, int flags,
|
|||
struct archive_entry *entry;
|
||||
struct stat st;
|
||||
size_t len;
|
||||
const char *prepost = "./XBPS_PREPOST_INSTALL";
|
||||
const char *prepost = "./INSTALL";
|
||||
const char *pkgname, *version;
|
||||
char *buf, *path;
|
||||
int rv = 0, lflags = 0;
|
||||
|
@ -169,15 +169,14 @@ unpack_archive_fini(struct archive *ar, const char *destdir, int flags,
|
|||
lflags = EXTRACT_FLAGS;
|
||||
|
||||
/*
|
||||
* This length is '.%s/metadata/%s/prepost-inst' not
|
||||
* including nul.
|
||||
* This length is '.%s/metadata/%s/INSTALL' + NULL.
|
||||
*/
|
||||
len = strlen(XBPS_META_PATH) + strlen(pkgname) + 24;
|
||||
buf = malloc(len + 1);
|
||||
len = strlen(XBPS_META_PATH) + strlen(pkgname) + 20;
|
||||
buf = malloc(len);
|
||||
if (buf == NULL)
|
||||
return ENOMEM;
|
||||
|
||||
if (snprintf(buf, len + 1, ".%s/metadata/%s/prepost-inst",
|
||||
if (snprintf(buf, len, ".%s/metadata/%s/INSTALL",
|
||||
XBPS_META_PATH, pkgname) < 0) {
|
||||
free(buf);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue