Commit 5c1b59e8 authored by Bernhard Link's avatar Bernhard Link

Fixed inclusion of : in filenames

parent c9ac7dd4
......@@ -42,11 +42,6 @@ See the file TODO for things I plan to do.
ugly, as they can only check your signature directly.
(Or in other words: not useful for mirroring things
to be used by strangers).
- filenames:
Currently, the full version is placed in filenames
used to store them in the pool. Escpecially epochs
(leading "<somewhat>:" to the version) will be
included.
- location:
The directory layout under pool/ is only divided
by the component and the sourcename. Ecspecially
......
......@@ -108,7 +108,7 @@ retvalue binaries_parse_chunk(const char *chunk,char **packagename,char **source
/* generate a base filename based on package,version and architecture */
if( basename ) {
char *parch,*pversion,*v;
char *parch,*pversion;
// TODO combine the two looks for version...
r = chunk_getvalue(chunk,"Version",&pversion);
......@@ -126,13 +126,8 @@ retvalue binaries_parse_chunk(const char *chunk,char **packagename,char **source
free(pversion);
return r;
}
v = index(pversion,':');
if( v )
v++;
else
v = pversion;
/* TODO check parts to consist out of save charakters */
*basename = calc_package_basename(ppackage,v,parch);
*basename = calc_package_basename(ppackage,pversion,parch);
free(pversion);free(parch);
if( !*basename ) {
free(ppackage);
......
......@@ -71,7 +71,12 @@ char *calc_filekey(const char *component,const char *sourcename,const char *file
char *calc_package_basename(const char *name,const char *version,const char *arch) {
return mprintf("%s_%s_%s.deb",name,version,arch);
const char *v = index(version,':');
if( v )
v++;
else
v = version;
return mprintf("%s_%s_%s.deb",name,v,arch);
}
char *calc_concatmd5andsize(const char *md5sum,const char *size) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment