From ebc4b78c66d1315d7a1a3412b74554de30ec4ddd Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Mon, 21 Nov 2022 00:58:05 -0500
Subject: linhes-dev: mp.py remove old symlinks

packages.x86_64: add linhes-system

motd: add linhes message
---
 linhes/linhes-dev/LinHES9_iso/cust_skel/airootfs/etc/motd |  4 ++++
 linhes/linhes-dev/LinHES9_iso/cust_skel/packages.x86_64   |  1 +
 linhes/linhes-dev/PKGBUILD                                |  8 ++++----
 linhes/linhes-dev/mp.py                                   | 12 ++++++++----
 4 files changed, 17 insertions(+), 8 deletions(-)
 create mode 100644 linhes/linhes-dev/LinHES9_iso/cust_skel/airootfs/etc/motd

diff --git a/linhes/linhes-dev/LinHES9_iso/cust_skel/airootfs/etc/motd b/linhes/linhes-dev/LinHES9_iso/cust_skel/airootfs/etc/motd
new file mode 100644
index 0000000..91d4b87
--- /dev/null
+++ b/linhes/linhes-dev/LinHES9_iso/cust_skel/airootfs/etc/motd
@@ -0,0 +1,4 @@
+Welcome to [38;2;23;147;209mLinHES[0m!
+https://linhes.org
+
+[41m [41m [41m [40m [44m [40m [41m [46m [45m [41m [46m [43m [41m [44m [45m [40m [44m [40m [41m [44m [41m [41m [46m [42m [41m [44m [43m [41m [45m [40m [40m [44m [40m [41m [44m [42m [41m [46m [44m [41m [46m [47m [0m
diff --git a/linhes/linhes-dev/LinHES9_iso/cust_skel/packages.x86_64 b/linhes/linhes-dev/LinHES9_iso/cust_skel/packages.x86_64
index 8c440b6..6b38bce 100644
--- a/linhes/linhes-dev/LinHES9_iso/cust_skel/packages.x86_64
+++ b/linhes/linhes-dev/LinHES9_iso/cust_skel/packages.x86_64
@@ -127,6 +127,7 @@ zsh
 ######################
 bash-completion
 calamares
+linhes-system
 networkmanager
 network-manager-applet
 os-prober
diff --git a/linhes/linhes-dev/PKGBUILD b/linhes/linhes-dev/PKGBUILD
index 2824f1e..55d1b46 100644
--- a/linhes/linhes-dev/PKGBUILD
+++ b/linhes/linhes-dev/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=linhes-dev
-pkgver=9.0
-pkgrel=3
+pkgver=9.0.0
+pkgrel=4
 pkgdesc="Scripts to develop LinHES"
 arch=('x86_64')
 license=('GPL2')
@@ -13,7 +13,7 @@ package() {
   install -d ${pkgdir}/usr/bin
   install -D -m755 * ${pkgdir}/usr/bin/
 }
-sha256sums=('61871516d2bbe1c3300e78715c7c43c46e9b877c66b21e674384d3809b7fdc5e'
-            '099c88be69e376df8cc8c5454a0ef4ce08660a8868c0c895d1bcc12498bdb833'
+sha256sums=('3a64b4125b56c6f95cc9dc85ce58ebd1c0612b22fb27c3e76d4d9a5570f2d61e'
+            'a633271346d0fc455a45a8bcc374f2e950472039f1410a62aeef69687700f286'
             'b5d12503757471be72fa20fb86a0b1563916b4db85048dcd78b49eaade3db989'
             '86c9ebe77228f7e3cc07cb05f480e5584e0e3cad1b889b63a50821f7323bf449')
diff --git a/linhes/linhes-dev/mp.py b/linhes/linhes-dev/mp.py
index 7f4c317..33832d0 100755
--- a/linhes/linhes-dev/mp.py
+++ b/linhes/linhes-dev/mp.py
@@ -370,9 +370,15 @@ class Packagefile(object):
             p.close()
 
     def make_package(self):
-        #if self.arch == 'any':
-        #    self.CARCH = 'any'
         #creates both binary and source package
+        print("   Removing symlinks...")
+        pkglinks = glob.glob(self.pkgname + "*.pkg.tar.*")
+        print("    Old Symlinks:",pkglinks)
+        if pkglinks:
+            for DELLNK in pkglinks:
+                if os.path.islink(DELLNK):
+                    print("    Deleting old symlink:",DELLNK)
+                    os.unlink(DELLNK)
         print("-  Making package...")
         retcode = subprocess.call(["sudo", "ccm", "s"])
         if retcode != 0:
@@ -451,8 +457,6 @@ class Packagefile(object):
             os.symlink(self.DOCROOT + "/" + self.TOTALPKG, self.mydir + "/" + self.TOTALPKG)
             print("    Adding package to repo")
             subprocess.call(["repo-add", self.DOCROOT+ "/" + self.REPO + ".db.tar.gz", self.DOCROOT + "/" + self.TOTALPKG])
-            #print("    Updating pacman database")
-            #subprocess.call(["pacman","-Syyyyy" ])
 
     def update_srcrepo(self):
         print("-   Updating source file repository")
-- 
cgit v0.12

