From a8e928077bab3fea42f893490a444d34328065da Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Sat, 12 Nov 2022 21:53:34 -0500
Subject: linhes-dev: mp.py: fix for epoch=0

---
 linhes/linhes-dev/PKGBUILD |  4 ++--
 linhes/linhes-dev/mp.py    | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/linhes/linhes-dev/PKGBUILD b/linhes/linhes-dev/PKGBUILD
index f6cb75b..199d03f 100644
--- a/linhes/linhes-dev/PKGBUILD
+++ b/linhes/linhes-dev/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=linhes-dev
 pkgver=9.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Scripts to develop LinHES"
 arch=('x86_64')
 license=('GPL2')
@@ -14,6 +14,6 @@ package() {
   install -D -m755 * ${pkgdir}/usr/bin/
 }
 sha256sums=('d781ffb509282d03f40612556a40455fc6ee58b4b3fc60e5457c90cacd65f99c'
-            'fc2cb4e6ed3db09202abe2eb2ac5056cc92a19e26f33a29558e65f5c51e8026f'
+            '9b577c3508baa3c27fc0dc8891b2da80f7b759cddf23c684a303dcba7ace0474'
             'b5d12503757471be72fa20fb86a0b1563916b4db85048dcd78b49eaade3db989'
             '6c3adaea49b7a0bb1baa4ed2d2b1d9f9fbab2f78b6e7ec1e8bedf4abecda25ba')
diff --git a/linhes/linhes-dev/mp.py b/linhes/linhes-dev/mp.py
index 3cd5c84..7aa9d28 100755
--- a/linhes/linhes-dev/mp.py
+++ b/linhes/linhes-dev/mp.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# Version 3.0.0
+# Version 3.0.1
 import os
 import sys
 import re
@@ -165,6 +165,8 @@ class Packagefile(object):
                 elif item == "pkgrel":
                     self.pkgrel = value
                 elif item == "epoch":
+                    if value == "0":
+                        value = ""
                     if value:
                         self.epoch = "%s:" %value
                 elif item == "arch":
@@ -421,11 +423,10 @@ class Packagefile(object):
             elif os.path.isfile(self.XZPKG):
                 self.TOTALPKG = self.XZPKG
             elif os.path.isfile(self.GZPKG):
-                self.TOTALPKG = GZPKG
+                self.TOTALPKG = self.GZPKG
             else:
                 print("")
-                print("!!!!!!!!!!!!!!!!!")
-                print("    ERROR in function update_repo: Couldn't find the new package",self.TOTALPKG)
+                print("    ERROR in function update_database: Couldn't find the new package:",self.TOTALPKG)
                 sys.exit(2)
 
             print("    Copying " + self.TOTALPKG + " to " + self.PKGDEST)
@@ -476,7 +477,7 @@ class Packagefile(object):
         OLDSRCPKG=""
 
         if not os.path.isfile(self.SRCPKGDEST + "/" +self.SRCPKG):
-            print("ERROR in function update_repo: Couldn't find the new package",self.SRCPKG)
+            print("ERROR in function update_srcrepo: Couldn't find the new package",self.SRCPKG)
             sys.exit(2)
 
         i = self.pkglist[0]
-- 
cgit v0.12

