Author: schoenfeld
Date: 2008-09-21 16:14:06 +0000 (Sun, 21 Sep 2008)
New Revision: 1635

Modified:
   trunk/debian/changelog
   trunk/scripts/mk-build-deps.pl
Log:
mk-build-deps: Implement --install switch which installs a generated
package and its depends afterwards.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-09-21 14:49:47 UTC (rev 1634)
+++ trunk/debian/changelog      2008-09-21 16:14:06 UTC (rev 1635)
@@ -1,11 +1,16 @@
 devscripts (2.10.38) UNRELEASED; urgency=low
 
+  [ Adam D. Barratt ]
   * When upgrading from devscripts 2.10.36, remove the incorrectly 
     created /etc/devscripts.con if it is present and add the affected 
     section to /etc/devscripts.conf instead.
 
- -- Adam D. Barratt <[EMAIL PROTECTED]>  Sun, 21 Sep 2008 15:08:17 +0100
+  [ Patrick Schoenfeld ]
+  * mk-build-deps: Implement --install switch which installs a generated
+    package and its depends afterwards.
 
+ -- Patrick Schoenfeld <[EMAIL PROTECTED]>  Sun, 21 Sep 2008 18:12:36 +0200
+
 devscripts (2.10.37) unstable; urgency=low
 
   * Fix typo in postinst. (Closes: #499639)
@@ -117,7 +122,7 @@
   [ Luk Claes ]
   * Update debsign for new commands of .commands (Closes: #498649).
 
- -- Luk Claes <[EMAIL PROTECTED]>  Sat, 20 Sep 2008 18:37:41 +0200
+-- Luk Claes <[EMAIL PROTECTED]>  Sat, 20 Sep 2008 18:37:41 +0200
 
 devscripts (2.10.35) unstable; urgency=low
 

Modified: trunk/scripts/mk-build-deps.pl
===================================================================
--- trunk/scripts/mk-build-deps.pl      2008-09-21 14:49:47 UTC (rev 1634)
+++ trunk/scripts/mk-build-deps.pl      2008-09-21 16:14:06 UTC (rev 1635)
@@ -29,7 +29,7 @@
 
 B<mk-build-deps> --help|--version
 
-B<mk-build-deps> <control file | package name> [...]
+B<mk-build-deps> [-i|--install] <control file | package name> [...]
 
 =head1 DESCRIPTION
 
@@ -41,6 +41,10 @@
 
 =over 4
 
+=item B<-i>, B<--install>
+
+Install the generated packages and its build-dependencies.
+
 =item B<-h>, B<--help>
 
 Show a summary of options.
@@ -68,11 +72,15 @@
 use File::Basename;
 
 my $progname = basename($0);
+my $opt_install;
 my ($opt_help, $opt_version);
 my $control;
+my @packages;
+my @deb_files;
 
 GetOptions("help|h" => \$opt_help,
            "version|v" => \$opt_version,
+          "install|i" => \$opt_install,
            )
     or die "Usage: $progname <control file | package name> [...]\nRun 
$progname --help for more details\n";
 
@@ -143,8 +151,21 @@
        " Depencency package to build the '$name' package\n";
 
     close EQUIVS;
+
+    push @packages, $name;
+
 }
 
+if ($opt_install) {
+    for my $package (@packages) {
+       my $file = glob "${package}-build-deps_*.deb";
+       push @deb_files, $file;
+    }
+
+    system 'dpkg', '--unpack', @deb_files;
+    system 'aptitude', '-f', 'install';
+}
+
 sub help {
    print <<"EOF";
 Usage: $progname <control file> | <package name> [...]



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to