[Slapt-get-user] no md5 info in package_data for names with '+' caracter.

Miguel Reynosso miguel at ikimlinux.org
Mon Aug 4 22:58:41 EDT 2008


Jason Woodward escribió:
>> I am here again with another problem. The theme is that install and 
>> update correctly Slapt-get but want to install certain packages get the 
>> following error:
>>
>> Failed to download: Missing MD5 checksum, override with --no-md5
>>
>> This error is presented only with packages containing the character '+' 
>> in his name, then to review the file /var/slap-get/package_data, I 
>> actually see that the field is empty MD5 in 4 packages of this type for 
>> example:
>>
>> So I suspect that the problem could be in regular expressions in the 
>> file src / package.h. I include this file as an attachment, because I've 
>> changed so that it can handle the extension of my packages (. Ikg)
>>     
>
> Your suspicion is correct.  There is another small change that is required to support the .ikg
> file extension I didn't realize.  The following patch modifies the regular expressions in
> package.h as well as a quick string check in packages.c that was meant to speed up parsing the
> checksums file.
>
> I tested that this works with your http://ftp.ikimlinux.org/PACKAGES.TXT source along with the
> standard slackware package sources.  
>
> Index: src/package.c
> ===================================================================
> RCS file: /var/cvs/slapt-get/src/package.c,v
> retrieving revision 1.280
> diff -u -r1.280 package.c
> --- src/package.c       9 Mar 2008 04:06:08 -0000       1.280
> +++ src/package.c       4 Aug 2008 23:07:00 -0000
> @@ -952,6 +952,7 @@
>      if (
>        (strstr(getline_buffer,".tgz") == NULL) &&
>        (strstr(getline_buffer,".tlz") == NULL) &&
> +      (strstr(getline_buffer,".ikg") == NULL) &&
>        (strstr(getline_buffer,".tbz") == NULL)
>      )
>        continue;
> Index: src/package.h
> ===================================================================
> RCS file: /var/cvs/slapt-get/src/package.h,v
> retrieving revision 1.108
> diff -u -r1.108 package.h
> --- src/package.h       9 Dec 2007 05:07:32 -0000       1.108
> +++ src/package.h       4 Aug 2008 23:07:00 -0000
> @@ -1,8 +1,8 @@
>  
> -#define SLAPT_PKG_PARSE_REGEX "(.*{1,})\\-(.*[\\-].*[\\-].*).t[gbl]z[ ]{0,}$"
> +#define SLAPT_PKG_PARSE_REGEX "(.*{1,})\\-(.*[\\-].*[\\-].*)\\.[tgblzik]+[ ]{0,}$"
>  #define SLAPT_PKG_NAMEVER "(.*{1,})\\-(.*[\\-].*[\\-].*)"
>  #define SLAPT_PKG_VER "(.*)[\\-](.*)[\\-](.*)"
> -#define SLAPT_PKG_NAME_PATTERN "^PACKAGE NAME:[ ]{1,}(.*{1,})\\-(.*[\\-].*[\\-].*)(.t[gbl]z)[
> ]{0,}$"
> +#define SLAPT_PKG_NAME_PATTERN "^PACKAGE NAME:[
> ]{1,}(.*{1,})\\-(.*[\\-].*[\\-].*)(\\.[tgblzik]+)[ ]{0,}$"
>  #define SLAPT_PKG_MIRROR_PATTERN "^PACKAGE MIRROR:[ ]+(.*)$"
>  #define SLAPT_PKG_LOCATION_PATTERN "^PACKAGE LOCATION:[ ]+(.*)$"
>  #define SLAPT_PKG_SIZEC_PATTERN "^PACKAGE SIZE [(]+compressed[)]{1,}:[ ]{1,}([0-9]{1,}) K$"
> @@ -13,7 +13,7 @@
>  #define SLAPT_ROOT_ENV_NAME "ROOT"
>  #define SLAPT_ROOT_ENV_LEN 255
>  #define SLAPT_PKG_LOG_PATTERN "^(.*{1,})\\-(.*[\\-].*[\\-].*)"
> -#define SLAPT_MD5SUM_REGEX "([a-zA-Z0-9]{1,})[
> ]{1,}([a-zA-Z0-9\\/._\\-]{1,})\\/(.*{1,})\\-(.*[\\-].*[\\-].*).t[gbl]z$"
> +#define SLAPT_MD5SUM_REGEX "([a-zA-Z0-9]{1,})[
> ]{1,}([a-zA-Z0-9\\/._\\-]{1,})\\/(.*{1,})\\-(.*[\\-].*[\\-].*)\\.[tgblzik]+$"
>  #define SLAPT_REQUIRED_REGEX "^[ ]{0,}([^ ]{1,})[ ]{0,}([\\<\\=\\>]+){0,}[
> ]{0,}([a-zA-Z0-9\\.\\_\\-]+){0,}[ ]{0,}$"
>  #define SLAPT_MD5_STR_LEN 34
>  #define SLAPT_PKG_LIST "PACKAGES.TXT"
>
>
>
> --
> Jason Woodward
> woodwardj at jaos.org
>
>
> _______________________________________________
> Slapt-get-user mailing list
> Slapt-get-user at software.jaos.org
> http://software.jaos.org/cgi-bin/mailman/listinfo/slapt-get-user
>
>   
man, I have only words of thanks to you, I have applied this patch and 
everything works perfectly!

Thank you for everything and a greeting


More information about the Slapt-get-user mailing list