~ubuntu-branches/ubuntu/precise/devscripts/precise-security

« back to all changes in this revision

Viewing changes to scripts/dget.pl

  • Committer: Bazaar Package Importer
  • Author(s): James Vega, James Vega, Luk Claes
  • Date: 2010-09-08 18:46:35 UTC
  • mto: (114.1.1 precise-proposed)
  • mto: This revision was merged to the branch mainline in revision 95.
  • Revision ID: james.westby@ubuntu.com-20100908184635-4zznnc6q1okq1zyo
Tags: 2.10.68
[ James Vega ]
* dget: Fix parsing of apt-cache and sources.list when given only a package
  name.  (Closes: #594904)
* debchange:
  + Remove EOL Ubuntu release Intrepid.  Add new development release Natty.
    (Closes: #593659)
  + Remove Etch and add Squeeze as backports targets.  Lenny is still the
    default bpo target.
* rmadison: Change Backports URL to backports.debian.org. (Closes: #595714)

[ Luk Claes ]
* Adjust rmadison documentation for move of accessible projectb mirror
  from merkel to ries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
262
262
        if ($qversion and /^ [ *]{3} ($qversion) 0/) {
263
263
            while (<$apt>) {
264
264
                last OUTER unless /^  *(?:\d+) (\S+)/;
265
 
                push @hosts, $1;
 
265
                (my $host = $1) =~ s@/$@@;
 
266
                next if $host eq '/var/lib/dpkg/status';
 
267
                push @hosts, $host;
266
268
            }
267
269
        }
268
270
    }
274
276
        die "$progname: no hostnames in apt-cache policy $package for $version found\n";
275
277
    }
276
278
 
277
 
    $apt = new IO::File("LC_ALL=C apt-cache --all-versions show $package |")
 
279
    $apt = new IO::File("LC_ALL=C apt-cache show $package=$version |")
278
280
        or die "$!";
279
281
    my ($v, $p, $filename, $md5sum);
280
282
    while (<$apt>) {
312
314
    if (-f "/etc/apt/sources.list") {
313
315
        $apt = new IO::File("/etc/apt/sources.list") or die "/etc/apt/sources.list: $!";
314
316
        while (<$apt>) {
315
 
            if (/^\s*deb\s*($host_re\S+)/) {
 
317
            if (/^\s*deb\s*($host_re\b)/) {
316
318
                push @repositories, $1;
317
319
            }
318
320
        }
325
327
        $_ = "/etc/apt/sources.list.d/$_";
326
328
        $apt = new IO::File("$_") or die "$_: $!";
327
329
        while (<$apt>) {
328
 
            if (/^\s*deb\s*($host_re\S+)/) {
 
330
            if (/^\s*deb\s*($host_re\b)/) {
329
331
                push @repositories, $1;
330
332
            }
331
333
        }