Преглед на файлове

install.go: check if packages exist before trying to install them

Sometimes *-debug packages generated by makepkg are listed in
`makepkg --packagelist`, but are not built when running `makepkg`.

This is the case when no debug info sections could be found in the package,
which is often the case for `python-*` packages, like `python-bashlex`.
--
Ferdinand Bachmann преди 5 години
родител
ревизия
023c742490
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      install.go

+ 8 - 0
install.go

@@ -1119,6 +1119,14 @@ func buildInstallPkgbuilds(dp *depPool, do *depOrder, srcinfos map[string]*gosrc
 				return fmt.Errorf("Could not find PKGDEST for: %s", name)
 			}
 
+			if _, err := os.Stat(pkgdest); os.IsNotExist(err) {
+				if optional {
+					return nil
+				}
+
+				return fmt.Errorf("PKGDEST for %s listed by makepkg, but does not exist: %s", name, pkgdest)
+			}
+
 			arguments.addTarget(pkgdest)
 			if parser.existsArg("asdeps", "asdep") {
 				deps = append(deps, name)