Date: Tue, 23 Nov 2010 14:14:08 +0100 (CET) From: Martin Matuska <mm@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: stas@FreeBSD.org, ruby@FreeBSD.org Subject: ports/152526: [PATCH] ports-mgmt/portupgrade: add xz support Message-ID: <20101123131408.5085069123@mail2.vx.sk> Resent-Message-ID: <201011231320.oANDKGZv024716@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 152526 >Category: ports >Synopsis: [PATCH] ports-mgmt/portupgrade: add xz support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 23 13:20:15 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Martin Matuska >Release: FreeBSD 8.1-STABLE amd64 >Organization: >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 (ruby@FreeBSD.org) 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 --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101123131408.5085069123>