diff --git a/CHANGELOG.md b/CHANGELOG.md
index a12b4de..de64bcb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,11 @@ All notable changes to this project will be documented in this file. This projec
- The above efforts to improve package upload reliability may conversely cause problems on setups with multiple DPs of different types. Scenarios involving Cloud plus Local DPs are not yet tested, and there probably needs to be a more intelligent method of treating each DP as a separate package upload process than currently exists.
+## [1.0.3] - 2019-10-04 - 1.0.3
+
+This is a bugfix release to address Issue #165 - local distribution points failing to upload new packages due to failing to obtain a package ID. The package ID check has been removed from local DPs, but left for cloud DPs. Tested and now working on JCDS and SMB DPs.
+
+
## [1.0.2] - 2019-09-25 - 1.0.2
This is the official 1.0.2 release, exactly the same as the former 1.0.2b8.
diff --git a/JSSImporter.py b/JSSImporter.py
index c65049d..59147f6 100644
--- a/JSSImporter.py
+++ b/JSSImporter.py
@@ -38,7 +38,7 @@
__all__ = ["JSSImporter"]
-__version__ = "1.0.2"
+__version__ = "1.0.3"
REQUIRED_PYTHON_JSS_VERSION = StrictVersion("2.0.1")
@@ -487,19 +487,13 @@ def handle_package(self):
# For local DPs we check that the package is already on the distribution point and upload it if not
if self.repo_type() == "DP" or self.repo_type() == "SMB" or self.repo_type() == "AFP" or self.repo_type() == "Local":
- if not self.jss.distribution_points.exists(os.path.basename(pkg_path)):
+ if self.jss.distribution_points.exists(os.path.basename(pkg_path)):
+ self.output("Package upload not required.")
+ self.upload_needed = False
+ else:
self.copy(pkg_path)
- package = self.wait_for_id(jss.Package, self.pkg_name)
- try:
- package.id
- pkg_update = (self.env["jss_changed_objects"]["jss_package_added"])
- except ValueError:
- raise ProcessorError("Failed to get Package ID from {}.".format(self.repo_type()))
self.output("Package {} uploaded to distribution point.".format(self.pkg_name))
self.upload_needed = True
- else:
- self.output("Package upload not required.")
- self.upload_needed = False
# only update the package object if an uploand ad was carried out
if (self.env["STOP_IF_NO_JSS_UPLOAD"] is True
@@ -528,12 +522,13 @@ def handle_package(self):
cat_name = self.category.name
else:
cat_name = ""
- self.wait_for_id(jss.Package, self.pkg_name)
- try:
- package.id
- pkg_update = (self.env["jss_changed_objects"]["jss_package_added"])
- except ValueError:
- raise ProcessorError("Failed to get Package ID from {}.".format(self.repo_type()))
+ if self.repo_type() == "JDS" or self.repo_type() == "CDP" or self.repo_type() == "AWS":
+ self.wait_for_id(jss.Package, self.pkg_name)
+ try:
+ package.id
+ pkg_update = (self.env["jss_changed_objects"]["jss_package_added"])
+ except ValueError:
+ raise ProcessorError("Failed to get Package ID from {}.".format(self.repo_type()))
self.update_object(cat_name, package, "category", pkg_update)
self.update_object(os_requirements, package, "os_requirements",
pkg_update)
diff --git a/pkg/jssimporter/build-info.plist b/pkg/jssimporter/build-info.plist
index 52ce604..448d076 100644
--- a/pkg/jssimporter/build-info.plist
+++ b/pkg/jssimporter/build-info.plist
@@ -17,6 +17,6 @@
suppress_bundle_relocation
version
- 1.0.2
+ 1.0.3
diff --git a/version.plist b/version.plist
index 031c536..767fd59 100644
--- a/version.plist
+++ b/version.plist
@@ -3,6 +3,6 @@
Version
- 1.0.2
+ 1.0.3