[Slapt-get-user] lzma support

Miguel Reynosso miguel at ikimlinux.org
Sun Aug 3 17:34:05 EDT 2008


Jason Woodward escribió:
> Hi,
>
>   
>> I am using a modified version of pkgtools to work with compressed 
>> packages in LZMA . due to better compression. However, I see that 
>> Slapt-get does not support this format by default and I would like to 
>> know if there is any way to accomplish this.
>>
>> The complete sequence of use is as follows
>>
>>
>>     
> ----------------------------------------------------------------------------------------------------------------
>   
>> slap-get -u
>> Retrieving package data [http://ftp.ikimlinux.org/]...Cached
>> Retrieving patch list [http://ftp.ikimlinux.org/]...Done
>> Retrieving checksum list [http://ftp.ikimlinux.org/]...Cached
>> Retrieving checksum signature [http://ftp.ikimlinux.org/]...Not Found
>> Retrieving ChangeLog.txt [http://ftp.ikimlinux.org/]...Done
>> Reading Package Lists...Done
>>
>> slapt-get -i gcc-objc
>> Reading Package Lists... Done
>> The following NEW packages will be installed:
>>   gcc-objc
>> 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
>> Need to get 2.3MB of archives.
>> After unpacking 7.1MB of additional disk space will be used.
>> 1/1 Get http://ftp.ikimlinux.org/ gcc-objc 4.3.1-i486-1 [2.3MB]...Done
>> Failed to download: Incomplete download
>>
>>     
> ---------------------------------------------------------------------------------------------------------------
>   
>> This message is presented with all packages on my personal repository 
>> but I gather that the problem is with Slapt-get because of these 
>> packages can be installed without drawbacks of manually from the 
>> directory of the cache (installpkg 
>> /var/slapt-get/Desarrollo/aplicaciones/gcc-objc/gcc-objc-4.3.1-i486-1.ikg)
>>
>> In advance thank you very much for the attention and ask an apology for 
>> my English so bad but I really do not speak this language.
>>     
>
> The VectorLinux guys use lzma packages without a problem.  The issue is your file extension. 
> The following regular expressions are defined and used for matching packages:
>
> src/package.h:#define SLAPT_PKG_PARSE_REGEX "(.*{1,})\\-(.*[\\-].*[\\-].*).t[gbl]z[ ]{0,}$"
> src/package.h:#define SLAPT_PKG_NAME_PATTERN "^PACKAGE NAME:[
> ]{1,}(.*{1,})\\-(.*[\\-].*[\\-].*)(.t[gbl]z)[ ]{0,}$"
> src/package.h:#define SLAPT_MD5SUM_REGEX "([a-zA-Z0-9]{1,})[
> ]{1,}([a-zA-Z0-9\\/._\\-]{1,})\\/(.*{1,})\\-(.*[\\-].*[\\-].*).t[gbl]z$"
>
> You can update them to also match ipkg files.
>
>
> take care,
> jason
>
> --
> 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
>
>   
Okay, thank you for responding.
you are absolutely razon (. I modified file src/package.h adapting to 
the needs to handle the extension (. ikg) as follows.

#define SLAPT_PKG_PARSE_REGEX "(.*{1,})\\-(.*[\\-].*[\\-].*).ikg[ ]{0,}$"
#define SLAPT_PKG_NAME_PATTERN "^PACKAGE NAME:[ 
]{1,}(.*{1,})\\-(.*[\\-].*[\\-].*)(.ikg)[ ]{0,}$"
#define SLAPT_MD5SUM_REGEX "([a-zA-Z0-9]{1,})[ 
]{1,}([a-zA-Z0-9\\/._\\-]{1,})\\/(.*{1,})\\-(.*[\\-].*[\\-].*).ikg$"

But unfortunately for me, the situation is persistent
looking a little code in the file src/packages.c, find that my problem 
is generated by the function "slapt_verify_downloaded_pkg" in the variable
"file_size = slapt_get_pkg_file_size(global_config,pkg)" around the line 
2201 if any comment on this variable besides the line 2193

package.c - line 
2193----------------------------------------------------------
/*size_t file_size = 0;*/
-------------------------------------------------------------------------------------------

package.c - line 2201-2204--------------------------------------------------
  /*
  file_size = slapt_get_pkg_file_size(global_config,pkg);
  if ((unsigned int)(file_size/1024) != pkg->size_c) {
    return SLAPT_DOWNLOAD_INCOMPLETE;
  }
  */
-------------------------------------------------------------------------------------------

The code compiles and the program does not give more problems; But I 
suppose this is not the best way to solve the problem

Saludos.


More information about the Slapt-get-user mailing list