]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge remote-tracking branch 'alfh/feature_updxlrator' into next
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Feb 2014 19:46:21 +0000 (20:46 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Feb 2014 19:46:21 +0000 (20:46 +0100)
config/updxlrator/updxlrator
html/cgi-bin/updatexlrator.cgi

index cdfce26d8aa16813e99196c2de431aa42fc94381..91ff8a9665f665e97e31f15f93de460b05b1bc90 100644 (file)
@@ -108,8 +108,8 @@ while (<>) {
        # -----------------------------------------------------------
 
        if (
-               ($source_url =~ m@^[h|f]t?tp://[^?]+\.(deb|rpm)$@i) ||
-               ($source_url =~ m@^[h|f]t?tp://[^?]+/distfiles/[^?]+\.(tar\.gz|tar\.bz2|tgz|zip|patch\.bz2|gz|docx|patch|pdf|exe)$@i)
+               ($source_url =~ m@^[h|f]t?tp://[^?]+\.(pkg\.tar\.xz|deb|rpm)$@i) ||
+               ($source_url =~ m@^[h|f]t?tp://[^?]+/distfiles/[^?]+\.(tar\.gz|tar\.bz2|tar\.xz|tgz|zip|patch\.bz2|gz|docx|patch|pdf|exe)$@i)
        )
        {
                $xlrator_url = &check_cache($source_url,$hostaddr,$username,"Linux",$mirror);
index df77a86afdb2e690464d0b3d23b96821a7631bca..6cd9668db893ccee7162c3747eeeb07c83f3cb4f 100644 (file)
@@ -517,7 +517,7 @@ END
                $id = 0;
                foreach $updatefile (@downloadfiles)
                {
-                       $updatefile =~ s/.*://;
+                       $updatefile =~ s/.*:download/download/;
                        my $size_updatefile = 0;
                        my $mtime = 0;
                        if(-e "$repository/$updatefile") {
@@ -971,7 +971,8 @@ foreach (@sources)
                {
                        next if(/\.info$/);
                        $updatefile = substr($_,rindex($_,"/")+1);
-                       $updatefile .= ":download/$vendorid/$updatefile";
+                       $_ = $updatefile; tr/[A-Z]/[a-z]/;
+                       $updatefile = "$_:separator:download/$vendorid/$updatefile";
                        $updatefile = " ".$updatefile;
                        push(@repositoryfiles,$updatefile);
                }
@@ -1002,7 +1003,7 @@ foreach (@sources)
                        chomp($sourceurl);
                        $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl));
                        $_ = $updatefile; tr/[A-Z]/[a-z]/;
-                       $updatefile = "$_:$vendorid/$uuid/$updatefile";
+                       $updatefile = "$_:separator:$vendorid/$uuid/$updatefile";
                        push(@repositoryfiles,$updatefile);
                }
        }
@@ -1145,7 +1146,7 @@ END
        $id = 0;
        foreach $updatefile (@files)
        {
-               $updatefile =~ s/.*://;
+               $updatefile =~ s/.*:separator://;
                my $size_updatefile = 0;
                my $mtime = 0;
                if(-e "$repository/$updatefile") {