Hi,

I'm attaching 3 proposed improvements for kubuntu-automation *-package-names 
scripts:

* 01_dont_use_home_ftpubuntu.diff
I have removed the explicit use of /home/ftpubuntu/ when calling the sftp 
process, this way the scripts will work for me too, my home is 
/home/ftpsiduction. This way I can reuse your scripts, and this is good for 
you too because it's easier for me to send you further improvements, see 
below.

* 02_show_package_names_output_sorted.diff
This patch changes the scripts so they will show the packages list sorted. 
Right now they are displayed in a "random" order which could change from time 
to time (already happened to me). I think this is bad because if we update the 
*.txt files containing the package names and the order changes, we can't see 
clearly with bzr diff which packages where added and which packages where 
removed. Please note that this is the very same reason why we have the 
*.install files sorted in our packages.

* 03_sort_package_names.diff
I have updated here the *.txt package name files for wily using the scripts 
with the patches 01 and 02 applied, so the package lists are now sorted. I 
also checked the package name set wasn't changed by the script, just the order 
(as it should be).

Thank you for your time reviewing these patches.
=== modified file 'kdeapplications-package-names'
--- kdeapplications-package-names	2015-06-22 09:32:28 +0000
+++ kdeapplications-package-names	2015-06-24 10:33:31 +0000
@@ -18,7 +18,7 @@
 else:
     stability = "stable"
 
-p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:/home/ftpubuntu/%s/applications/%s/src/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/applications/%s/src/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls *xz")
 
 for line in output.splitlines():

=== modified file 'kf5-package-names'
--- kf5-package-names	2015-06-19 18:06:28 +0000
+++ kf5-package-names	2015-06-24 10:33:31 +0000
@@ -18,7 +18,7 @@
 else:
     stability = "stable"
 
-p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:/home/ftpubuntu/%s/frameworks/%s/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/frameworks/%s/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls *xz")
 
 for line in output.splitlines():
@@ -36,7 +36,7 @@
         else:
             print match.group(1)
 
-p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:/home/ftpubuntu/%s/frameworks/%s/portingAids/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/frameworks/%s/portingAids/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls *xz")
 
 for line in output.splitlines():

=== modified file 'plasma-package-names'
--- plasma-package-names	2015-06-19 18:06:28 +0000
+++ plasma-package-names	2015-06-24 10:33:31 +0000
@@ -18,7 +18,7 @@
 else:
     stability = "stable"
 
-p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:/home/ftpubuntu/%s/plasma/%s/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/plasma/%s/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls")
 
 for line in output.splitlines():

=== modified file 'kdeapplications-package-names'
--- kdeapplications-package-names	2015-06-24 10:33:31 +0000
+++ kdeapplications-package-names	2015-06-24 11:07:45 +0000
@@ -21,6 +21,8 @@
 p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/applications/%s/src/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls *xz")
 
+package_names = []
+
 for line in output.splitlines():
     match = re.search(r'([a-zA-Z0-9\-]+)-.*\.tar\.', line)
     if match:
@@ -30,7 +32,15 @@
         elif name == "kde-workspace":
             pass
         elif name == "kdelibs":
-            print "kde4libs"
+            package_names.append("kde4libs")
         else:
-            print match.group(1)
-print "kde-l10n"
+            package_names.append(name)
+package_names.append("kde-l10n")
+
+#Sort package names
+package_names = sorted(package_names)
+
+#Finally print the package names sorted
+for name in package_names:
+	print name
+

=== modified file 'kf5-package-names'
--- kf5-package-names	2015-06-24 10:33:31 +0000
+++ kf5-package-names	2015-06-24 11:07:45 +0000
@@ -21,20 +21,22 @@
 p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/frameworks/%s/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls *xz")
 
+package_names = []
+
 for line in output.splitlines():
     match = re.search(r'([a-zA-Z0-9\-]+)-' + re.escape(version) + '\.\d' + r'\.tar\.', line)
     if match:
         name = match.group(1)
         if name == "kwallet":
-            print "kwallet-kf5"
+            package_names.append("kwallet-kf5")
         elif name == "kdnssd":
-            print "kdnssd-kf5"
+            package_names.append("kdnssd-kf5")
         elif name == "kactivities":
-            print "kactivities-kf5"
+            package_names.append("kactivities-kf5")
         elif name == "attica":
-            print "attica-kf5"
+            package_names.append("attica-kf5")
         else:
-            print match.group(1)
+            package_names.append(name)
 
 p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/frameworks/%s/portingAids/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls *xz")
@@ -44,14 +46,21 @@
     if match:
         name = match.group(1)
         if name == "kwallet":
-            print "kwallet-kf5"
+            package_names.append("kwallet-kf5")
         elif name == "kdnssd":
-            print "kdnssd-kf5"
+            package_names.append("kdnssd-kf5")
         elif name == "kactivities":
-            print "kactivities-kf5"
+            package_names.append("kactivities-kf5")
         elif name == "attica":
-            print "attica-kf5"
+            package_names.append("attica-kf5")
         else:
-            print match.group(1)
+            package_names.append(name)
+
+#Sort package names
+package_names = sorted(package_names)
+
+#Finally print the package names sorted
+for name in package_names:
+	print name
 
 # kate: space-indent on; indent-width 4; replace-tabs on; indent-mode python; remove-trailing-space on;

=== modified file 'plasma-package-names'
--- plasma-package-names	2015-06-24 10:33:31 +0000
+++ plasma-package-names	2015-06-24 11:07:45 +0000
@@ -21,22 +21,30 @@
 p = subprocess.Popen(["sftp", "-b", "-", "depot.kde.org:%s/plasma/%s/" % (stability, version)], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 output, _ = p.communicate("ls")
 
+package_names = []
+
 for line in output.splitlines():
     match = re.search(r'([a-zA-Z0-9\-]+)-.*\.tar\.', line)
     if match:
         name = match.group(1)
         if name == "baloo":
-            print "baloo-kf5"
+            package_names.append("baloo-kf5")
         elif name == "breeze":
-            print "breeze"
-            print "breeze-qt4"
+            package_names.append("breeze")
+            package_names.append("breeze-qt4")
         elif name == "oxygen":
-            print "oxygen"
-            print "oxygen-qt4"
+            package_names.append("oxygen")
+            package_names.append("oxygen-qt4")
         elif name == "kfilemetadata":
-            print "kfilemetadata-kf5"
+            package_names.append("kfilemetadata-kf5")
         else:
-            print match.group(1)
-
+            package_names.append(name)
+
+#Sort package names
+package_names = sorted(package_names)
+
+#Finally print the package names sorted
+for name in package_names:
+	print name
             
 # kate: space-indent on; indent-width 4; replace-tabs on; indent-mode python; remove-trailing-space on;

=== modified file 'kdeapplications-packages-wily.txt'
--- kdeapplications-packages-wily.txt	2015-06-09 16:14:46 +0000
+++ kdeapplications-packages-wily.txt	2015-06-24 11:06:44 +0000
@@ -38,28 +38,28 @@
 kcharselect
 kcolorchooser
 kcron
-kde4libs
-kdeartwork
+kde-base-artwork
 kde-baseapps
-kde-base-artwork
 kde-dev-scripts
 kde-dev-utils
+kde-l10n
+kde-runtime
+kde-wallpapers
+kde4libs
+kdeartwork
 kdeedu-data
 kdegraphics-mobipocket
 kdegraphics-strigi-analyzer
 kdegraphics-thumbnailers
-kde-l10n
 kdenetwork-filesharing
 kdenetwork-strigi-analyzers
 kdenlive
 kdepim
+kdepim-runtime
 kdepimlibs
-kdepim-runtime
-kde-runtime
 kdesdk-kioslaves
 kdesdk-strigi-analyzers
 kdesdk-thumbnailers
-kde-wallpapers
 kdewebdev
 kdf
 kdiamond

=== modified file 'kf5-packages-wily.txt'
--- kf5-packages-wily.txt	2015-06-19 18:06:28 +0000
+++ kf5-packages-wily.txt	2015-06-24 11:06:17 +0000
@@ -1,65 +1,65 @@
-kpeople
-ktexteditor
-kitemviews
-kded
+attica-kf5
 extra-cmake-modules
-kxmlrpcclient
-knotifications
-kunitconversion
-knewstuff
-sonnet
-kconfigwidgets
-kwallet-kf5
-kimageformats
-plasma-framework
-kinit
+frameworkintegration
 kactivities-kf5
-kcrash
-ki18n
-kwindowsystem
-kdoctools
-kglobalaccel
-kjobwidgets
-kiconthemes
+kapidox
+karchive
+kauth
+kbookmarks
 kcmutils
-karchive
-frameworkintegration
+kcodecs
+kcompletion
+kconfig
+kconfigwidgets
 kcoreaddons
-kparts
-kemoticons
-kconfig
-kio
-kitemmodels
-kguiaddons
+kcrash
 kdbusaddons
-attica-kf5
-kidletime
-networkmanager-qt
-kcodecs
+kdeclarative
+kded
+kdelibs4support
 kdesignerplugin
-modemmanager-qt
-kcompletion
-kauth
-kwidgetsaddons
-ktextwidgets
-kdeclarative
+kdesu
 kdewebkit
-solid
-kplotting
-kpackage
-threadweaver
-kpty
-kxmlgui
-kservice
-kbookmarks
-knotifyconfig
-kapidox
 kdnssd-kf5
-kdesu
+kdoctools
+kemoticons
+kglobalaccel
+kguiaddons
 khtml
+ki18n
+kiconthemes
+kidletime
+kimageformats
+kinit
+kio
+kitemmodels
+kitemviews
+kjobwidgets
+kjs
 kjsembed
 kmediaplayer
+knewstuff
+knotifications
+knotifyconfig
+kpackage
+kparts
+kpeople
+kplotting
+kpty
+kross
 krunner
-kross
-kdelibs4support
-kjs
+kservice
+ktexteditor
+ktextwidgets
+kunitconversion
+kwallet-kf5
+kwidgetsaddons
+kwindowsystem
+kxmlgui
+kxmlrpcclient
+modemmanager-qt
+networkmanager-qt
+plasma-framework
+solid
+sonnet
+threadweaver

=== modified file 'plasma-packages-wily.txt'
--- plasma-packages-wily.txt	2015-06-19 18:06:28 +0000
+++ plasma-packages-wily.txt	2015-06-24 11:06:23 +0000
@@ -24,8 +24,8 @@
 milou
 muon
 oxygen
+oxygen-fonts
 oxygen-qt4
-oxygen-fonts
 plasma-desktop
 plasma-mediacenter
 plasma-nm

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
kubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel

Reply via email to