>Submitter-Id:  current-users
>Originator:    Martin Matuska
>Organization:  
>Confidential:  no 
>Synopsis:      [PATCH] ports-mgmt/portupgrade: add xz support
>Severity:      non-critical
>Priority:      low
>Category:      ports 
>Class:         change-request
>Release:       FreeBSD 8.1-STABLE amd64
>Environment:
System: FreeBSD neo.vx.sk 8.1-STABLE FreeBSD 8.1-STABLE #2 r215471M: Thu Nov 18 
23:08:16 CET
>Description:
- Add support for .txz packages

Added file(s):
- files/patch-bin-pkg_fetch
- files/patch-bin-portsclean
- files/patch-bin-portupgrade

Port maintainer ([email protected]) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- portupgrade-2.4.7,2.patch begins here ---
Index: files/patch-bin-pkg_fetch
===================================================================
RCS file: files/patch-bin-pkg_fetch
diff -N files/patch-bin-pkg_fetch
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/patch-bin-pkg_fetch   23 Nov 2010 13:13:18 -0000
@@ -0,0 +1,13 @@
+--- bin/pkg_fetch.orig 2010-11-23 13:13:08.694083769 +0100
++++ bin/pkg_fetch      2010-11-23 13:18:25.536863839 +0100
+@@ -48,7 +48,9 @@
+ COLUMNSIZE = 24
+ NEXTLINE = "\n%*s" % [5 + COLUMNSIZE, '']
+ 
+-if PkgConfig::OS_MAJOR.to_i >= 5
++if PkgConfig::OS_MAJOR.to_i >= 8
++  PKG_SUFFIXES = ['.tbz', '.txz', '.tgz']  
++elsif PkgConfig::OS_MAJOR.to_i >= 5
+   PKG_SUFFIXES = ['.tbz', '.tgz']
+ else
+   PKG_SUFFIXES = ['.tgz', '.tbz']
Index: files/patch-bin-portsclean
===================================================================
RCS file: files/patch-bin-portsclean
diff -N files/patch-bin-portsclean
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/patch-bin-portsclean  23 Nov 2010 13:13:18 -0000
@@ -0,0 +1,26 @@
+--- bin/portsclean.orig        2010-11-23 13:55:00.310668471 +0100
++++ bin/portsclean     2010-11-23 13:55:23.339330348 +0100
+@@ -502,12 +502,12 @@
+ 
+   puts "Cleaning out #{$packages_base}..."
+ 
+-  IO.popen("cd #{$packages_dir} && find . -maxdepth 1 -type f -name 
'*.t[bg]z' | xargs #{PkgDB::command(:pkg_info)} -o") do |r|
++  IO.popen("cd #{$packages_dir} && find . -maxdepth 1 -type f -name 
'*.t[bgx]z' | xargs #{PkgDB::command(:pkg_info)} -o") do |r|
+     pkgfile = pkgname = nil
+ 
+     r.each do |line|
+       case line
+-      when /^Information for +\.\/((\S+-\S+)\.t[bg]z):/
++      when /^Information for +\.\/((\S+-\S+)\.t[bgx]z):/
+       pkgfile = $1
+       pkgname = $2
+       when /^(\S+\/\S+)$/             # /
+@@ -536,7 +536,7 @@
+     end
+   end
+ 
+-  IO.popen("find -H #{$packages_base} -type l -name '*.t[bg]z'") do |r|
++  IO.popen("find -H #{$packages_base} -type l -name '*.t[bgx]z'") do |r|
+     r.each do |line|
+       pkgfile = line.chomp
+ 
Index: files/patch-bin-portupgrade
===================================================================
RCS file: files/patch-bin-portupgrade
diff -N files/patch-bin-portupgrade
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/patch-bin-portupgrade 23 Nov 2010 13:13:18 -0000
@@ -0,0 +1,19 @@
+--- bin/portupgrade.orig       2010-11-23 13:55:04.980909465 +0100
++++ bin/portupgrade    2010-11-23 13:55:54.117048732 +0100
+@@ -2027,12 +2027,12 @@
+ 
+   name = pkgname.sub(/-[^\-]+$/, '')
+ 
+-  glob_pkgfile = name + '-*.t[bg]z'
+-  re_pkgfile = /^#{Regexp.quote(name)}-[^\-]+\.t[bg]z$/
++  glob_pkgfile = name + '-*.t[bgx]z'
++  re_pkgfile = /^#{Regexp.quote(name)}-[^\-]+\.t[bgx]z$/
+ 
+   if latest_link = $portsdb.latest_link(origin)
+-    glob_pkgfile = "{#{glob_pkgfile},#{latest_link}.t[bg]z}"
+-    re_pkgfile = 
/(?:#{re_pkgfile.source}|^#{Regexp.quote(latest_link)}\.t[bg]z$)/
++    glob_pkgfile = "{#{glob_pkgfile},#{latest_link}.t[bgx]z}"
++    re_pkgfile = 
/(?:#{re_pkgfile.source}|^#{Regexp.quote(latest_link)}\.t[bgx]z$)/
+   end
+ 
+   pkglist = []
--- portupgrade-2.4.7,2.patch ends here ---

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ruby
To unsubscribe, send any mail to "[email protected]"

Reply via email to