pkg_install: Update to 20211021. Apply patch from Michal Maruska in NetBSD/pkgsrc#95 to ensure package files are correctly cleaned up should the POST-INSTALL script phase fail.diff -r1.120 -r1.121 pkgsrc/pkgtools/pkg_install/files/add/perform.c
(jperkin)
@@ -1,22 +1,22 @@ | @@ -1,22 +1,22 @@ | |||
1 | /* $NetBSD: perform.c,v 1.120 2021/04/10 20:10:48 nia Exp $ */ | 1 | /* $NetBSD: perform.c,v 1.121 2021/10/21 13:05:25 jperkin Exp $ */ | |
2 | #if HAVE_CONFIG_H | 2 | #if HAVE_CONFIG_H | |
3 | #include "config.h" | 3 | #include "config.h" | |
4 | #endif | 4 | #endif | |
5 | #include <nbcompat.h> | 5 | #include <nbcompat.h> | |
6 | #if HAVE_SYS_CDEFS_H | 6 | #if HAVE_SYS_CDEFS_H | |
7 | #include <sys/cdefs.h> | 7 | #include <sys/cdefs.h> | |
8 | #endif | 8 | #endif | |
9 | __RCSID("$NetBSD: perform.c,v 1.120 2021/04/10 20:10:48 nia Exp $"); | 9 | __RCSID("$NetBSD: perform.c,v 1.121 2021/10/21 13:05:25 jperkin Exp $"); | |
10 | 10 | |||
11 | /*- | 11 | /*- | |
12 | * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> | 12 | * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> | |
13 | * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org> | 13 | * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org> | |
14 | * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org> | 14 | * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org> | |
15 | * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> | 15 | * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> | |
16 | * Copyright (c) 2010 Thomas Klausner <wiz@NetBSD.org> | 16 | * Copyright (c) 2010 Thomas Klausner <wiz@NetBSD.org> | |
17 | * All rights reserved. | 17 | * All rights reserved. | |
18 | * | 18 | * | |
19 | * Redistribution and use in source and binary forms, with or without | 19 | * Redistribution and use in source and binary forms, with or without | |
20 | * modification, are permitted provided that the following conditions | 20 | * modification, are permitted provided that the following conditions | |
21 | * are met: | 21 | * are met: | |
22 | * | 22 | * | |
@@ -1535,27 +1535,27 @@ pkg_do(const char *pkgpath, int mark_aut | @@ -1535,27 +1535,27 @@ pkg_do(const char *pkgpath, int mark_aut | |||
1535 | goto clean_memory; | 1535 | goto clean_memory; | |
1536 | 1536 | |||
1537 | if (write_meta_data(pkg)) | 1537 | if (write_meta_data(pkg)) | |
1538 | goto nuke_pkgdb; | 1538 | goto nuke_pkgdb; | |
1539 | } | 1539 | } | |
1540 | 1540 | |||
1541 | if (run_install_script(pkg, "PRE-INSTALL")) | 1541 | if (run_install_script(pkg, "PRE-INSTALL")) | |
1542 | goto nuke_pkgdb; | 1542 | goto nuke_pkgdb; | |
1543 | 1543 | |||
1544 | if (extract_files(pkg)) | 1544 | if (extract_files(pkg)) | |
1545 | goto nuke_pkg; | 1545 | goto nuke_pkg; | |
1546 | 1546 | |||
1547 | if (run_install_script(pkg, "POST-INSTALL")) | 1547 | if (run_install_script(pkg, "POST-INSTALL")) | |
1548 | goto nuke_pkgdb; | 1548 | goto nuke_pkg; | |
1549 | 1549 | |||
1550 | /* XXX keep +INSTALL_INFO for updates? */ | 1550 | /* XXX keep +INSTALL_INFO for updates? */ | |
1551 | /* XXX keep +PRESERVE for updates? */ | 1551 | /* XXX keep +PRESERVE for updates? */ | |
1552 | if (mark_automatic) | 1552 | if (mark_automatic) | |
1553 | mark_as_automatic_installed(pkg->pkgname, 1); | 1553 | mark_as_automatic_installed(pkg->pkgname, 1); | |
1554 | 1554 | |||
1555 | pkg_register_depends(pkg); | 1555 | pkg_register_depends(pkg); | |
1556 | 1556 | |||
1557 | if (Verbose) | 1557 | if (Verbose) | |
1558 | printf("Package %s registered in %s\n", pkg->pkgname, pkg->install_logdir); | 1558 | printf("Package %s registered in %s\n", pkg->pkgname, pkg->install_logdir); | |
1559 | 1559 | |||
1560 | if (pkg->meta_data.meta_display != NULL) | 1560 | if (pkg->meta_data.meta_display != NULL) | |
1561 | fputs(pkg->meta_data.meta_display, stdout); | 1561 | fputs(pkg->meta_data.meta_display, stdout); |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: version.h,v 1.187 2021/04/10 11:36:56 nia Exp $ */ | 1 | /* $NetBSD: version.h,v 1.188 2021/10/21 13:05:25 jperkin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001 Thomas Klausner. All rights reserved. | 4 | * Copyright (c) 2001 Thomas Klausner. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -17,16 +17,16 @@ | @@ -17,16 +17,16 @@ | |||
17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
25 | */ | 25 | */ | |
26 | 26 | |||
27 | #ifndef _INST_LIB_VERSION_H_ | 27 | #ifndef _INST_LIB_VERSION_H_ | |
28 | #define _INST_LIB_VERSION_H_ | 28 | #define _INST_LIB_VERSION_H_ | |
29 | 29 | |||
30 | #define PKGTOOLS_VERSION 20210410 | 30 | #define PKGTOOLS_VERSION 20211021 | |
31 | 31 | |||
32 | #endif /* _INST_LIB_VERSION_H_ */ | 32 | #endif /* _INST_LIB_VERSION_H_ */ |