Major reworking of the apt-ftparchive code.
diff --git a/apt-ftparchive/apt-ftparchive.conf b/apt-ftparchive/apt-ftparchive.conf
new file mode 100644
index 0000000..cb6c68b
--- /dev/null
+++ b/apt-ftparchive/apt-ftparchive.conf
@@ -0,0 +1,7 @@
+// apt-ftparchive configuration file setup for Mendel distro generation
+
+APT::FTPArchive {
+    DeLinkAct "false";  // we use cloud bucket, which doesn't support hardlinks
+    Contents "true";
+    AlwaysStat "true";  // we don't enforce strict version updates for packages
+};
diff --git a/apt-ftparchive/unstable.conf b/apt-ftparchive/unstable.conf
new file mode 100644
index 0000000..7c01e36
--- /dev/null
+++ b/apt-ftparchive/unstable.conf
@@ -0,0 +1,37 @@
+// apt-ftparchive configuration file setup for Mendel distro generation
+
+Dir {
+    ArchiveDir ".";
+    OverrideDir "..";
+    CacheDir "..";
+};
+
+Default {
+    Packages::Compress "gzip xz";
+    Sources::Compress  "gzip xz";
+    Contents::Compress "gzip xz";
+
+    Packages {
+        Extensions ".deb";
+    };
+};
+
+TreeDefault {
+   // These are all defaults and are provided for completeness
+   Directory "$(DIST)/$(SECTION)/binary-$(ARCH)/";
+   Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages";
+   
+   SrcDirectory "$(DIST)/$(SECTION)/source/";
+   Sources "$(DIST)/$(SECTION)/source/Sources";
+   
+   Contents "$(DIST)/Contents-$(ARCH)";   
+
+   FileList "../packages.txt";
+   SourceFileList "../sources.txt";
+};
+
+Tree "dists/unstable" {
+    // NOTE: Update Sections with additional bsp sections as we go
+    Sections "core enterprise-bsp";
+    Architectures "source all arm64 armhf";
+};
diff --git a/cicd/pipelines/tasks/task_updatepackages.jenkins b/cicd/pipelines/tasks/task_updatepackages.jenkins
index c802f20..b7d6eb9 100644
--- a/cicd/pipelines/tasks/task_updatepackages.jenkins
+++ b/cicd/pipelines/tasks/task_updatepackages.jenkins
@@ -37,6 +37,10 @@
                     sh """
                        apt-get update
                        apt-get -y install apt-utils
+
+                       git clone https://coral.googlesource.com/gke-jenkins gke-jenkins
+                       cp gke-jenkins/apt-ftparchive/apt-ftparchive.conf .
+                       cp gke-jenkins/apt-ftparchive/unstable.conf .
                        """
                 }
             }
@@ -51,32 +55,15 @@
                                       selector: lastSuccessful())
                     }
 
-/*
-'http://apt.mendel-linux.org/dists/unstable/InRelease' apt.mendel-linux.org_dists_unstable_InRelease 0 
-'http://apt.mendel-linux.org/dists/unstable/core/binary-arm64/Packages.xz' apt.mendel-linux.org_dists_unstable_core_binary-arm64_Pac
-kages 0                                                                                                                            
-'http://apt.mendel-linux.org/dists/unstable/core/binary-all/Packages.xz' apt.mendel-linux.org_dists_unstable_core_binary-all_Package
-s 0                                                                                                                                
-'http://apt.mendel-linux.org/dists/unstable/core/i18n/Translation-en.xz' apt.mendel-linux.org_dists_unstable_core_i18n_Translation-e
-n 0                                                                                                                                
-*/
-
                     dir('mendel') {
                         sh """
-                           mkdir -p dists/unstable/core/binary-arm64
-                           apt-ftparchive packages pool/core > dists/unstable/core/binary-arm64/Packages
-                           gzip -9c dists/unstable/core/binary-arm64/Packages >dists/unstable/core/binary-arm64/Packages.gz
-
-                           mkdir -p dists/unstable/core/binary-all
-                           apt-ftparchive packages pool/core > dists/unstable/core/binary-all/Packages
-                           gzip -9c dists/unstable/core/binary-all/Packages >dists/unstable/core/binary-all/Packages.gz
-
-                           mkdir -p dists/unstable/core/source
-                           apt-ftparchive sources pool/core  > dists/unstable/core/source/Sources
-                           gzip -9c dists/unstable/core/source/Sources >dists/unstable/core/binary-arm64/Sources.gz
-
-                           apt-ftparchive release -o APT::FTPArchive::Release::Suite="unstable" dists/unstable > dists/unstable/Release
-                           gzip -9c dists/unstable/Release >dists/unstable/Release.gz
+                           mkdir -p dists/unstable/core/{source,binary-{all,arm64,armhf}}
+                           find -name \*.dsc |sed 's,\./,,g' >../sources.txt
+                           find -name \*.deb |sed 's,\./,,g' >../packages.txt
+                           apt-ftparchive -c ../apt-ftparchive.conf \
+                               -o APT::FTPArchive::Release::Codename="unstable" \
+                               -o APT::FTPArchive::Release::Label="Coral Mendel Linux unstable release" \
+                               generate ../mendel.conf
                            """
                     }
                 }