tags 278675 + patch
tags  84368 + patch
tags 306924 + patch
thanks

Hello, I know debget is not in testing and is supposed to be removed
soon, anyway, the patch here will fix all of those RC bugs against it.

If that can help...

-- 
                                  Alexis Sukrieh <[EMAIL PROTECTED]>
                                               http://www.sukria.net

« Quidquid latine dictum sit, altum sonatur. » 
Whatever is said in Latin sounds profound.
--- /usr/bin/debget     2005-05-06 16:26:11.038703952 +0200
+++ debget      2005-05-06 17:17:45.119332200 +0200
@@ -251,7 +251,7 @@
 # Getopt::Long has some really awful defaults.  This function loads it
 # then configures it to use more sane settings.
 
-sub getopt;
+sub getopt(@);
 sub configure_getopt {
     Getopt::Long->import(2.11);
     *getopt = \&Getopt::Long::GetOptions;
@@ -302,21 +302,37 @@
 # (source/binary) for the given DISTRIBUTION, SECTION1 and SECTION2.
 
 sub file_dir {
-    my ($type, $dist, $sec1, $sec2) = @_;
+    my ($type, $dist, $sec1, $sec2, $package) = @_;
+
+    # first generate the prefix
+    my $initial = $package;
+    $initial =~ s/^(.).*$/$1/ if $package !~ /^lib/;
+    $initial =~ s/^(.{4}).*$/$1/ if $package =~ /^lib/;
 
     $sec2 = "/$sec2" if $sec2 ne '';
+    my $prefix = "";
 
+    # experimental is the simple case
     if ($dist eq 'experimental') {
        return 'project/experimental';
     }
 
-    if ($type eq 'source') {
-       return "dists/$dist/$sec1/source$sec2";
+    # for unstable and testing, look to the pool
+    #   debian/pool/$section/$initial/$sourcepackage/
+    elsif ($dist eq 'testing' or $dist eq 'unstable') {
+       $prefix = "pool/$sec1/$initial";
+       return "$prefix/$package";
     }
 
+    # Here, we manage the "stable" stuff
+    $prefix = "dists/$dist/$sec1";
+    
     if ($type eq 'binary') {
        my $arch = arch;
-       return "dists/$dist/$sec1/binary-$arch$sec2";
+       return "$prefix/binary-$arch$sec2";
+    }
+    elsif ($type eq 'source') {
+       return "$prefix/source$sec2";
     }
 
     xdie "invalid type `$type'";
@@ -507,13 +523,13 @@
        my ($s1, $s2, $p) = package_section package_source($package),
                                            $orig_package;
        push @ret, [host_dir($s1),
-                   file_dir('source', $O{'dist'}, $s1, $s2),
+                   file_dir('source', $O{'dist'}, $s1, $s2, $package),
                    "^\Q$p\E_.*\\.(dsc|tar\\.gz|diff\\.gz)\$"];
     }
     if ($O{'binary'}) {
        my $arch = arch;
        push @ret, [host_dir($sec1),
-                   file_dir('binary', $O{'dist'}, $sec1, $sec2),
+                   file_dir('binary', $O{'dist'}, $sec1, $sec2, $package),
                    "^\Q$package\E_[^_]+(_(\Q$arch\E|all))?\\.deb\$"];
     }
     return @ret;

Reply via email to