git » repo-mgmt.git » commit 9f29136

one more git, cleaner publish-pkg, export improvement

author Urja (ARMLFS builder)
2024-07-31 12:13:20 UTC
committer Urja (ARMLFS builder)
2024-07-31 12:13:20 UTC
parent b3d5271fc5cdb45efd26801dd702e2cbd590648b

one more git, cleaner publish-pkg, export improvement

export-gits.sh +1 -1
publish-pkg.py +12 -7
sources-gits.txt +1 -0

diff --git a/export-gits.sh b/export-gits.sh
index ed36c4d..b69562b 100755
--- a/export-gits.sh
+++ b/export-gits.sh
@@ -33,7 +33,7 @@ doagit() {
 	fi
 	local CMD="git remote add origin armlfs:$SRV/$1/$g.git"
 	asowner "$CMD"
-        CMD="git push --set-upstream origin"
+        CMD="git push --set-upstream origin main"
 	asowner "$CMD"
 }
 
diff --git a/publish-pkg.py b/publish-pkg.py
index dbea956..00d5c44 100755
--- a/publish-pkg.py
+++ b/publish-pkg.py
@@ -53,11 +53,9 @@ def filewalk(top):
 					dirs.append(entry.name)
 				else:
 					yield top, entry
-		
 		for dirname in reversed(dirs):
 			new_path = os.path.join(top, dirname)
 			stack.append(new_path)
-		
 
 for root, entry in filewalk('.'):
 	if entry.name.endswith('.pkg.tar.xz'):
@@ -67,7 +65,7 @@ for root, entry in filewalk('.'):
 			bases[root] = []
 		bases[root].append(entry.name)
 		count+=1
-		print(os.path.join(root, name))
+		#print(os.path.join(root, entry.name))
 
 
 if count == 0:
@@ -77,10 +75,16 @@ if count == 0:
 
 print(f"Found {count} packages in these repos:")
 for k in bases.keys():
-	_,arch,repo = k.split('/')
-	print(f"{arch}:{repo}")
-
-input("Press enter to continue.")
+    _,arch,repo = k.split('/')
+    print(f"{arch}:{repo}:")
+    for f in sorted(bases[k]):
+        print(f"\t{f}")
+try:
+    input("Press enter to continue.")
+except KeyboardInterrupt:
+    print("\nBailing out.")
+    subc(["mount", "/sources/pkg"])
+    sys.exit(1)
 
 bp=os.getcwd()
 print("Moving packages to release directory",end="")
@@ -124,6 +128,7 @@ for k in bases.keys():
 
 
 os.chdir("/sources/pkg-untested")
+subc(["find", "-type", "l", "-delete"])
 subc(["find", "-type", "c", "-delete"])
 subc(["find", "-type", "f", "-delete"])
 subc(["mount", "/sources/pkg"])
diff --git a/sources-gits.txt b/sources-gits.txt
index b741fef..863fef8 100644
--- a/sources-gits.txt
+++ b/sources-gits.txt
@@ -5,3 +5,4 @@ mk-builders
 mk-desktop-image
 base-pkgbuilds
 cross-a64
+dist-helpers