From owner-freebsd-ruby@FreeBSD.ORG Tue Nov 23 13:19:11 2010 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40E6D10656D5; Tue, 23 Nov 2010 13:19:11 +0000 (UTC) (envelope-from mm@mail2.vx.sk) Received: from mail2.vx.sk (mail2.vx.sk [IPv6:2a01:4f8:100:84a3::3]) by mx1.freebsd.org (Postfix) with ESMTP id CE9488FC13; Tue, 23 Nov 2010 13:19:10 +0000 (UTC) Received: from neo.vx.sk (localhost [127.0.0.1]) by mail2.vx.sk (Postfix) with ESMTP id B53526913D; Tue, 23 Nov 2010 14:19:09 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail2.vx.sk ([127.0.0.1]) by neo.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iDHooxpquvny; Tue, 23 Nov 2010 14:14:08 +0100 (CET) Received: by mail2.vx.sk (Postfix, from userid 1001) id 5085069123; Tue, 23 Nov 2010 14:14:08 +0100 (CET) To: FreeBSD-gnats-submit@freebsd.org From: Martin Matuska X-send-pr-version: 3.113 X-GNATS-Notify: Message-Id: <20101123131408.5085069123@mail2.vx.sk> Date: Tue, 23 Nov 2010 14:14:08 +0100 (CET) Cc: stas@FreeBSD.org, ruby@FreeBSD.org Subject: [PATCH] ports-mgmt/portupgrade: add xz support X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2010 13:19:11 -0000 >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 (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 ---