libxbps: bah do not ignore ENOENT when running INSTALL/REMOVE scripts.
This commit is contained in:
		
							
								
								
									
										6
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								NEWS
									
									
									
									
									
								
							@@ -1,3 +1,9 @@
 | 
			
		||||
xbps-0.5.2.1 (2010-05-18):
 | 
			
		||||
 | 
			
		||||
 * Due to human error, last fix in 0.5.2 was completely wrong and the
 | 
			
		||||
   INSTALL/REMOVE scripts were simply empty so ENOENT was returned, clearly
 | 
			
		||||
   this is expected and shouldn't be ignored.
 | 
			
		||||
 | 
			
		||||
xbps-0.5.2 (2010-07-18):
 | 
			
		||||
 | 
			
		||||
 * libxbps: while running INSTALL/REMOVE scripts, do not fail if a script
 | 
			
		||||
 
 | 
			
		||||
@@ -152,7 +152,7 @@ xbps_configure_pkg(const char *pkgname, const char *version, bool check_state,
 | 
			
		||||
	if (access(buf, X_OK) == 0) {
 | 
			
		||||
		rv = xbps_file_chdir_exec(rootdir, buf, "post",
 | 
			
		||||
		     pkgname, lver, update ? "yes" : "no", NULL);
 | 
			
		||||
		if (rv != 0 && errno != ENOENT) {
 | 
			
		||||
		if (rv != 0) {
 | 
			
		||||
			free(buf);
 | 
			
		||||
			fprintf(stderr, "%s: post INSTALL action "
 | 
			
		||||
			    "returned: %s\n", pkgname, strerror(errno));
 | 
			
		||||
 
 | 
			
		||||
@@ -222,7 +222,7 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
 | 
			
		||||
		prepostf = true;
 | 
			
		||||
		rv = xbps_file_chdir_exec(rootdir, buf, "pre", pkgname,
 | 
			
		||||
		    version, update ? "yes" : "no", NULL);
 | 
			
		||||
		if (rv != 0 && errno != ENOENT) {
 | 
			
		||||
		if (rv != 0) {
 | 
			
		||||
			fprintf(stderr,
 | 
			
		||||
			    "%s: prerm action target error (%s)\n", pkgname,
 | 
			
		||||
			    strerror(errno));
 | 
			
		||||
@@ -286,7 +286,7 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
 | 
			
		||||
	if (update == false && prepostf) {
 | 
			
		||||
		rv = xbps_file_chdir_exec(rootdir, buf, "post",
 | 
			
		||||
		     pkgname, version, NULL);
 | 
			
		||||
		if (rv != 0 && errno != ENOENT) {
 | 
			
		||||
		if (rv != 0) {
 | 
			
		||||
			fprintf(stderr,
 | 
			
		||||
			    "%s: postrm action target error (%s)\n",
 | 
			
		||||
			    pkgname, strerror(errno));
 | 
			
		||||
 
 | 
			
		||||
@@ -185,7 +185,7 @@ unpack_archive_fini(struct archive *ar, prop_dictionary_t pkg)
 | 
			
		||||
			
 | 
			
		||||
			rv = xbps_file_chdir_exec(rootdir, buf, "pre",
 | 
			
		||||
			     pkgname, version, update ? "yes" : "no", NULL);
 | 
			
		||||
			if (rv != 0 && errno != ENOENT) {
 | 
			
		||||
			if (rv != 0) {
 | 
			
		||||
				free(buf);
 | 
			
		||||
				fprintf(stderr,
 | 
			
		||||
				    "%s: preinst action target error %s\n",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user