~ubuntu-branches/ubuntu/wily/devscripts/wily

« back to all changes in this revision

Viewing changes to scripts/mk-build-deps.pl

  • Committer: Package Import Robot
  • Author(s): James McCoy, Cyril Brulebois, James McCoy, Dominique Dumont, Piotr Ożarowski, Hideki Yamane, Craig Small
  • Date: 2015-06-10 23:07:03 UTC
  • mfrom: (10.10.22 sid)
  • Revision ID: package-import@ubuntu.com-20150610230703-9ra8x8nthajpg96a
Tags: 2.15.5
[ Cyril Brulebois ]
* Update chdist bash-completion file with the architectures currently (as
  of 2015-04-28) listed on buildd.debian.org and buildd.debian-ports.org.
  (Closes: #783634)
* Add support for RMADISON_SSL_CA_FILE and RMADISON_SSL_CA_PATH, so that
  one can point to system-specific locations for CA-related files, and pass
  them to curl/wget via the appropriate options.  (Closes: #784812)

[ James McCoy ]
* wrap-and-sort:
  + Always remove empty elements from lists so “-t” doesn't add a new, empty
    element.  (Closes: #783630)
  + Remove empty lines in debhelper-related files.  (Closes: #780667)
* Install Perl modules into $Config{vendorlib} and remove the hacks in
  various scripts to make them see devscript's modules.
* Add bash completion scripts for uscan (thanks to Ben Finney) and
  mk-origtargz.  (Closes: #784394)
* Stop building and shipping libvfork.so since strace has handled vforks for
  at least a decade.
* Move bash-completion scripts from /etc/bash_completion.d (compat
  directory) to /usr/share/bash-completion/completions.
* debdiff: Inspect wdiff's return code rather than Dpkg::IPC::spawn's
  exception to determine if wdiff found differences.  (Closes: #786518)
* Store cached files in $XDG_CACHE_HOME instead of ~/.devscripts_cache.
  (Closes: #659330)
* bts:
  + Use https to talk to bugs.debian.org
  + Use URI & URI::QueryParam to parse URIs rather than regexps.  This fixes
    issues with not detecting BTS URLs as valid due to ordering of query
    parameters.  (Closes: #786706)
* debuild: Recognize -jauto as a valid option. Based on a patch by Reiner
  Herrmann.  (Closes: #787276)
* uscan:
  + Fix Github example in man page.  (Closes: #757194)
  + Clear cached redirection URLs every time a watch line is processed.
    This ensures any relative URLs are built into absolute URLs using
    relevant sites.  (Closes: #736063)
* Devscripts::Debbugs: Retrieve bug status in chunks to avoid building large
  responses on bugs.d.o.
* mk-build-deps:
  + Verify build-dep package was installed since the install tool may exit
    successfully even if the package couldn't be installed.  Based on a
    patch by Dima Kogan.  (Closes: #755371)
* mergechanges:
  + Add -d option to delete input files on success.  Thanks to Mark Hymers
    for the patch.  (Closes: #640068)
* dd-list:
  + Strip arch-qualifiers from given package names.  (Closes: #788367)

[ Dominique Dumont ]
* licensecheck:
  * check file encoding and decode properly when reading file
   (Closes: #784821)
  * improve GPL LGPL extraction
  * optimize regex used to extract © info
  * check Groovy, Scala and Clojure files (Closes: #771119)
  * fixed regexp used to detect discussion about © (Closes: #723723)
  * fix BSL parser (Closes: #690375)
  * support academic free license (Closes: #534987)
  * allow © owner to mention "and others"
  * support eclipse public license (Closes: #587892)
  * handle LGPL as written by IBM (Closes: #587970)
  * handle REM style comments (Closes: #748611)
* uscan: use defined-or (//) instead of "||" to avoid loosing
  '0' version field (Closes: #787767)

[ Piotr Ożarowski ]
* uscan: Use pypi.debian.net redirector instead of
  pypi.debian.org/packages/source URLs.  (Closes: #785746)

[ Hideki Yamane ]
* Add bash completion for dcut.  (Closes: #787321)

[ Craig Small ]
* debdiff: Honor DEBRELEASE_DEBS_DIR or --debs-dir.  (Closes: #785421)

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
    system @root, 'dpkg', '--unpack', @deb_files;
354
354
    die("$progname: dpkg --unpack failed\n") if ( ($?>>8) != 0 );
355
355
    system @root, shellwords($install_tool), '-f', 'install';
356
 
    if ( ($?>>8) != 0 ) {
357
 
        # Restore system to previous state, since apt wasn't able to resolve a
358
 
        # proper way to get the build-dep packages installed
 
356
    my $err = $? >> 8;
 
357
    if (!$err) {
 
358
        # $install_tool succeeded. Did the packages get installed? It's
 
359
        # possible that they didn't because $install_tool may have realized
 
360
        # that installation was impossible, and it could have given up,
 
361
        # successfully.
 
362
        for (my $i = 0; $i < @pkg_names; $i++) {
 
363
            my $pkg = $pkg_names[$i];
 
364
            my $status;
 
365
            spawn(exec => ['dpkg-query', '-W', '-f', '${db:Status-Status}', $pkg],
 
366
                  to_string => \$status,
 
367
                  error_to_file => '/dev/null',
 
368
                  nocheck => 1,
 
369
                  wait_child => 1);
 
370
            if ($status ne 'installed' || ($? >> 8)) {
 
371
                # Restore system to previous state, since $install_tool wasn't
 
372
                # able to resolve a proper way to get the build-dep packages
 
373
                # installed
 
374
                warn "$progname: Unable to install $pkg";
 
375
                $err = 1;
 
376
            }
 
377
            else {
 
378
                unlink $deb_files[$i];
 
379
            }
 
380
        }
 
381
        if ($err) {
 
382
            die "$progname: Unable to install all build-dep packages\n";
 
383
        }
 
384
    }
 
385
    else {
 
386
        # Restore system to previous state, since $install_tool wasn't able to
 
387
        # resolve a proper way to get the build-dep packages installed
359
388
        system @root, 'dpkg', '--remove', @pkg_names;
360
 
        die("$progname: apt-get install call failed\n");
361
 
    }
 
389
        die("$progname: Unable to install all build-dep packages\n");
362
390
 
363
 
    if ($opt_remove) {
364
 
        foreach my $file (@deb_files) {
365
 
            unlink $file;
 
391
        if ($opt_remove) {
 
392
            foreach my $file (@deb_files) {
 
393
                unlink $file;
 
394
            }
366
395
        }
367
396
    }
368
397
}