From e6590dd285317f4b7f3244bdc5587632650b400b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 29 Dec 2008 06:50:59 +0100 Subject: [PATCH] Rename binpkg's metadata script to prepost-action. Because in theory any shell script or executable program might run, and therefore the .sh extension is wrong. --HG-- extra : convert_revision : 2f52520ccb04cdf1c414ee0ac6128e54d82c1d36 --- doc/BINPKG_INFO | 2 +- lib/install.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/BINPKG_INFO b/doc/BINPKG_INFO index e4ec150a22..0dfc9173fe 100644 --- a/doc/BINPKG_INFO +++ b/doc/BINPKG_INFO @@ -9,7 +9,7 @@ with bzip2 and has the following structure: /var/cache/xbps/metadata/$pkgname /var/cache/xbps/metadata/$pkgname/flist /var/cache/xbps/metadata/$pkgname/props.plist - /var/cache/xbps/metadata/$pkgname/postpre-action.sh + /var/cache/xbps/metadata/$pkgname/postpre-action Metadata info is stored in the "/var/cache/xbps/metadata/$pkgname" directory and two files will be always be present: flist and props.plist. diff --git a/lib/install.c b/lib/install.c index 167a4fe140..131703d07b 100644 --- a/lib/install.c +++ b/lib/install.c @@ -278,12 +278,12 @@ xbps_unpack_archive_cb(struct archive *ar, const char *pkgname) * This length is '.%s/metadata/%s/prepost-action.sh' not * including nul. */ - len = strlen(XBPS_META_PATH) + strlen(pkgname) + 29; + len = strlen(XBPS_META_PATH) + strlen(pkgname) + 26; buf = malloc(len + 1); if (buf == NULL) return ENOMEM; - if (snprintf(buf, len + 1, ".%s/metadata/%s/prepost-action.sh", + if (snprintf(buf, len + 1, ".%s/metadata/%s/prepost-action", XBPS_META_PATH, pkgname) < 0) { free(buf); return -1;