~ubuntu-branches/ubuntu/karmic/sbuild/karmic-updates

« back to all changes in this revision

Viewing changes to bin/sbuild-checkpackages

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh, Roger Leigh
  • Date: 2009-05-17 15:52:53 UTC
  • mfrom: (8.1.7 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090517155253-fbxadfsyaf940ete
Tags: 0.58.3-1
[ Roger Leigh ]
* New release.
* debian/control:
  - Update to Standards Version 3.8.1.
  - Add buildd package.
  - Add libsbuild-perl package.
  - All packages depend upon libsbuild-perl.
* Add support for appending a tag to version numbers (Closes: #475777).
  Thanks to Timothy G Abbott for this patch.
* When using the --help or --version options, don't abort if not
  in the sbuild group (Closes: #523670).  Group membership is now
  only performed after options parsing, and only if required.
* Allow config files to use $HOME (Closes: #524564).  Thanks to
  James Vega for this patch.
* Restore buildd package.
* Split common library functions into new libsbuild-perl package.
* debian/sbuild.(preinst|postinst|postrm):
  - Remove special cases for versions older than oldstable.  Update
    addition and removal of sbuild group to use return value of getent
    rather than parsing getent output.
  - Use addgroup/delgroup in place of adduser/deluser.
  - Use --system when adding and deleting group, to ensure creation
    of a system group.  Migrate existing non-system group and group
    members if the system group is not present.
  - Handle removal of 50sbuild setup script.
* debian/buildd.(preinst|postinst|postrm): Add maintainer scripts for
  buildd package.  Move configuration file from /etc/buildd.conf to
  /etc/buildd/buildd.conf if present.  Also create buildd user and
  group for running the buildd daemon.
* Sbuild::Conf: Don't default MAINTAINER_NAME to $DEBEMAIL if unset
  in the configuration file (Closes: #520158).
* /etc/schroot/setup.d/50sbuild: Remove.  The setup tasks performed by
  this script are now handled internally by sbuild.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
use strict;
23
23
use warnings;
24
24
 
 
25
our $mode = undef;
 
26
 
 
27
package Options;
 
28
 
 
29
use Sbuild::OptionsBase;
 
30
use Sbuild::Conf;
 
31
 
 
32
BEGIN {
 
33
    use Exporter ();
 
34
    our (@ISA, @EXPORT);
 
35
 
 
36
    @ISA = qw(Exporter Sbuild::OptionsBase);
 
37
 
 
38
    @EXPORT = qw();
 
39
}
 
40
 
 
41
sub set_options {
 
42
    my $self = shift;
 
43
 
 
44
    $self->add_options(
 
45
        "l|list" => sub { $mode = "list"; },
 
46
        "s|set" => sub { $mode = "set"; });
 
47
}
 
48
 
 
49
package main;
 
50
 
25
51
use locale;
26
52
use POSIX qw(locale_h);
27
53
use Getopt::Long;
29
55
use Sbuild::Conf;
30
56
use Sbuild::Utility qw(setup cleanup shutdown);
31
57
 
32
 
package main;
33
 
 
34
 
our $mode = undef;
 
58
use Sbuild::Conf;
35
59
 
36
60
my $conf = Sbuild::Conf->new();
37
 
 
38
 
GetOptions (
39
 
    "h|help" => sub { help_text("1", "sbuild-checkpackages"); },
40
 
    "V|version" => sub {version_text("sbuild-checkpackages"); },
41
 
    "l|list" => sub { $mode = "list"; },
42
 
    "s|set" => sub { $mode = "set"; })
43
 
or usage_error("sbuild-checkpackages", "Error parsing command-line options");
 
61
exit 1 if !defined($conf);
 
62
my $options = Options->new($conf, "sbuild-checkpackages", "1");
 
63
exit 1 if !defined($options);
 
64
$conf->check_group_membership();
44
65
 
45
66
usage_error("sbuild-checkpackages", "--list or --set must be specified")
46
 
    if (@ARGV != 1 || !defined($mode));
 
67
    if (!defined($mode));
 
68
 
 
69
usage_error("sbuild-checkpackages", "A chroot must be specified")
 
70
    if (@ARGV != 1);
47
71
 
48
72
my $chroot = $ARGV[0];
49
73