[SCM] patch-parser packaging branch, master, updated. 43474b21f016a6c6ceaa1bd528e34a0ab6b65fbb
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Tue Apr 14 07:56:05 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/patch-parser.git;a=commitdiff;h=43474b2
The following commit has been merged in the master branch:
commit 43474b21f016a6c6ceaa1bd528e34a0ab6b65fbb
Author: Harald Sitter <sitter at kde.org>
Date: Tue Apr 14 09:55:54 2015 +0200
remove old patch-parser and alogn with it the dep on nokigori
---
Gemfile | 1 -
patch-parser.rb | 118 --------------------------------------------------------
2 files changed, 119 deletions(-)
diff --git a/Gemfile b/Gemfile
index 6e51315..7a5dab1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,4 +3,3 @@ source 'https://rubygems.org'
gem 'git'
gem 'haml'
gem 'mail'
-gem 'nokigori'
diff --git a/patch-parser.rb b/patch-parser.rb
deleted file mode 100644
index 7cbccd5..0000000
--- a/patch-parser.rb
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'pp'
-require 'nokogiri'
-require 'mail'
-require 'time'
-require 'date'
-
-require_relative 'lib/dep3'
-
-if ARGV.empty?
- pp "Need atleast one argument"
- exit
-end
-
-EMAIL_BODY = 'Hi
- This is a automated email about some patch(es) that you might have touched recently.
- A automated check noticed that the following patches were not DEP 3\'d properly.
- As the last person who touched these patches, please add DEP 3 headers to these patches.
- '
-
-emailDb = {}
-emailDb.default = []
-
- at page = Nokogiri::HTML(File.open('ubuntu-patch-status.html', 'r'))
-tableElement = @page.at_css "tbody"
-
-ARGV.each do |package|
- packageName = package.split(':')[-1].split('/')[-1].split('.')[0]
- if Dir.exists? packageName
- Dir.chdir(packageName) { `git checkout kubuntu_unstable && git pull` }
- else
- `git clone --branch kubuntu_unstable #{package}`
- end
- patches = Dir.glob("./#{packageName}/debian/patches/**/**")
- patches.each do |patch|
- # Filter out what's not a patch
- patches.delete(patch) if File.directory?(patch) or patch.split("/")[-1] == "series"
- end
-
- next if patches.empty?
-
- tableEntry = Nokogiri::XML::Node.new "tr", @page
- tableEntry.parent = tableElement
-
- # Package Name
- packageEntry = Nokogiri::XML::Node.new "td", @page
- packageEntry.content = packageName
- packageEntry['class'] = "pkg-#{package}"
- packageEntry['rowspan'] = "#{patches.count}"
- packageEntry.parent = tableEntry
-
- patches.each do |patch|
- if patch != patches.first
- tableEntry2 = Nokogiri::XML::Node.new "tr", @page
- tableEntry2.parent = tableEntry
- end
-
- ## Patch parsing
- patchName = patch.split("/")[-1]
- parser = Dep3.new(patch)
- parser.parse!()
-
- # Patch Name
-
- # Classify the patch
- if patchName =~ /upstream_.*/
- patchClass = "upstream"
- elsif patchName =~ /kubuntu_.*/
- patchClass = "kubuntu"
- else
- patchClass = "other"
- end
-
- patchEntry = Nokogiri::XML::Node.new "td", @page
- patchEntry['class'] = "patch-#{patchClass}"
- # TODO: Fix this shit later on.
- patchEntry.parent = patch == patches.first ? tableEntry : tableEntry2
-
- patchLink = Nokogiri::XML::Node.new "a", @page
- patchLink['href'] = 'http://anonscm.debian.org/cgit/pkg-kde/' + package.split(':')[-1] + '/tree/debian/patches/' + patchName + '?h=kubuntu_unstable'
- patchLink.parent = patchEntry
- patchLink.content = patchName
-
- # Dep 3 ?
- dep3Entry = Nokogiri::XML::Node.new "td", @page
- dep3Entry.content = parser.valid
- dep3Entry['class'] = "dep3-#{parser.valid}"
- dep3Entry.parent = patch == patches.first ? tableEntry : tableEntry2
-
- # Author
- authorEntry = Nokogiri::XML::Node.new "td", @page
- authorEntry.content = parser['Author'].nil? ? Dir.chdir(packageName) {`git log -1 debian/patches/#{patchName} | grep Author | cut -d : -f2-`.chomp } : parser['Author']
- authorEntry.parent = patch == patches.first ? tableEntry : tableEntry2
-
- # Last-Update
- updateEntry = Nokogiri::XML::Node.new "td", @page
- date = parser['Last-Update'].nil? ? Dir.chdir(packageName) { Date.parse(`git log -1 debian/patches/#{patchName} | grep Date | cut -d : -f2-`.chomp) } : parser['Last-Update']
- updateEntry.content = date
- updateEntry.parent = patch == patches.first ? tableEntry : tableEntry2
- end
-end
-
-File.open('patch.html', 'w'){ |f| f.write(@page.to_s) }
-
-# pp "Sending out emails"
-
-# emailDb.each do |key, array|
-# raw_address = Mail::Address.new(key)
-# mail = Mail.new do
-# from 'rohangarg at kubuntu.org'
-# to raw_address.address
-# subject 'Missing Dep 3 headers'
-# body EMAIL_BODY + array.join('
')
-# end
-#
-# mail.deliver!
-# end
--
patch-parser packaging
More information about the pkg-kde-commits
mailing list