From b856cd29599a6c383d55fc6d0eaa5240120d56f2 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Mon, 18 Jun 2012 21:55:25 +0200 Subject: [PATCH] pck-update,libnetwork.lib: a package name can contain one or more undescores so add _ to the list of allowed characters Signed-off-by: Davide Madrisan --- ChangeLog | 6 ++++++ lib/libnetwork.lib.in | 2 +- plugins/pck-update.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c279b53..f9dbd9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,12 @@ Changes in version 1.12.3 (when DISTRO_rpm="mamba2" is set in the configuration files). Feature asked by Silvan Calarco. ++ bugfix + * pck-update, libnetwork.lib - Davide Madrisan: + A package name can contain one or more undescores so add it to the list of + allowed characters in 'repository.get_srpm_pckname_from_site()'. + (Problem pointed out by Silvan Calarco.) + ------------------------------------------------------------------------------- Changes in version 1.12.2 diff --git a/lib/libnetwork.lib.in b/lib/libnetwork.lib.in index caf9a29..5ca2ca6 100644 --- a/lib/libnetwork.lib.in +++ b/lib/libnetwork.lib.in @@ -94,7 +94,7 @@ function repository.get_srpm_pckname_from_site() { notify.debug "$FUNCNAME: infile = \"$infile\"" local regexpr - [[ "$pck_name" =~ ^[a-zA-Z0-9-]+$ ]] && \ + [[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]] && \ regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name" notify.debug "$FUNCNAME: regexpr = \"$regexpr\"" diff --git a/plugins/pck-update.in b/plugins/pck-update.in index b5b156c..adf123b 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -886,7 +886,7 @@ echo -n "\"${define_list_value[$i]}\" "; done)]" notify.debug "\ define_list_rpm = \"$define_list_rpm\"" - if [[ "$pck_name" =~ ^[a-zA-Z0-9-]+$ ]]; then + if [[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]]; then if [ "$pck_newver" ]; then notify.note $"updating package ${NOTE}${pck_name##*/}${NORM} \ to version ${NOTE}${pck_newver}${NORM}""..."