From b2421b584afe50aca1914590afdc5ef51926d0c0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Apr 2008 18:26:16 -0400 Subject: [PATCH] Improve parsing of tgz filenames, to avoid confusion when the filename includes the package type (ie, "noarch"). Patch from Andrej Ricnik-Bay. --- Alien/Package/Tgz.pm | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Alien/Package/Tgz.pm b/Alien/Package/Tgz.pm index 4249886..bc6810c 100644 --- a/Alien/Package/Tgz.pm +++ b/Alien/Package/Tgz.pm @@ -95,7 +95,7 @@ sub scan { # Strip out any tar extentions. $basename=~s/\.(tgz|tar\.(gz|Z))$//; - if ($basename=~m/(.*)-(.*?[0-9]+.*)/) { + if ($basename=~m/([\w-]+)-([0-9\.?]+).*/) { $this->name($1); $this->version($2); } diff --git a/debian/changelog b/debian/changelog index 1ab10de..7f3dcd7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ alien (8.72) UNRELEASED; urgency=low * Use debhelper 7, rules file minimisation. + * Improve parsing of tgz filenames, to avoid confusion when the filename + includes the package type (ie, "noarch"). Patch from Andrej Ricnik-Bay. -- Joey Hess Thu, 24 Apr 2008 02:00:59 -0400