Add hook directory support, per configuration file, similar to pbuilder support.
git-svn-id: http://emdebian.org/svn/current@7753 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
8eae53de0f
commit
9fda93fe05
2 changed files with 23 additions and 2 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -6,8 +6,10 @@ multistrap (2.1.11) unstable; urgency=low
|
|||
* Remove workaround for apt from lenny.
|
||||
* Improve the fix for #553599 and generalise it. Handle making a real
|
||||
directory for amd64 to cope with libc6-amd64 [i386].
|
||||
* Add hook directory support, per configuration file, similar to
|
||||
pbuilder support.
|
||||
|
||||
-- Neil Williams <codehelp@debian.org> Mon, 07 Feb 2011 12:14:17 +0000
|
||||
-- Neil Williams <codehelp@debian.org> Mon, 07 Feb 2011 12:21:33 +0000
|
||||
|
||||
multistrap (2.1.10) experimental; urgency=low
|
||||
|
||||
|
|
21
multistrap
21
multistrap
|
@ -33,7 +33,7 @@ use vars qw/ $progname $ourversion $dstrap $extra @aptsources $mirror
|
|||
@extrapkgs @includes %source $setupsh $configsh $omitrequired $dryrun
|
||||
$omitpreinst @reinstall $tgzname %uniq %required $check @check %uniq
|
||||
$explicit_suite $allow_recommends %omitdebsrc @dsclist @sectoutput
|
||||
%flatfile %important $addimportant @debconf /;
|
||||
%flatfile %important $addimportant @debconf $hookdir %hooks /;
|
||||
|
||||
setlocale(LC_MESSAGES, "");
|
||||
textdomain("multistrap");
|
||||
|
@ -897,6 +897,20 @@ sub cascade {
|
|||
chomp ($fl);
|
||||
push @debconf, $fl;
|
||||
}
|
||||
my @h = split(' ', lc($keys{$section}{'hookdir'}))
|
||||
if (defined $keys{$section}{'hookdir'});
|
||||
foreach my $f (@h) {
|
||||
opendir (HOOKS, "$f") or next;
|
||||
my @hookfiles=grep(!m:\.\.?$:, readdir HOOKS);
|
||||
closedir(HOOKS);
|
||||
foreach my $hf (@hookfiles) {
|
||||
my $fl = `realpath $f/$hf 2>/dev/null`;
|
||||
chomp ($fl);
|
||||
next if (($fl eq "") or (not -f $fl) or (not -x $fl));
|
||||
push (@{$hooks{'A'}}, $fl) if ($hf =~ /^A/);
|
||||
push (@{$hooks{'D'}}, $fl) if ($hf =~ /^D/);
|
||||
}
|
||||
}
|
||||
my @d = split(' ', lc($keys{$section}{'debootstrap'}));
|
||||
push @debootstrap, @d;
|
||||
my @b = split(' ', lc($keys{$section}{'bootstrap'}));
|
||||
|
@ -1039,6 +1053,11 @@ sub dump_config {
|
|||
}
|
||||
$plural = ngettext("Debconf preseed file", "Debconf preseed files", scalar @debconf);
|
||||
printf("%s:\t%s\n", $plural, join(" ", sort @debconf)) if (scalar @debconf > 0);
|
||||
$plural = ngettext ("Hook: ", "", scalar @extrapkgs);
|
||||
print "hooks (A):\t\t$plural".join (", ", sort @{$hooks{'A'}})."\n"
|
||||
if (defined ($hooks{'A'} and scalar @{$hooks{'A'}} > 0));
|
||||
print "hooks (D):\t\t$plural".join (", ", sort @{$hooks{'D'}})."\n"
|
||||
if (defined ($hooks{'D'} and scalar @{$hooks{'D'}} > 0));
|
||||
$plural = ngettext ("Extra Package: ", "Extra Packages: ", scalar @extrapkgs);
|
||||
print "additional:\t\t$plural".join (", ", sort @extrapkgs)."\n" if (scalar @extrapkgs > 0);
|
||||
print "reinstall:\t\t".join (", ", sort (@reinstall))."\n" if (scalar @reinstall > 0);
|
||||
|
|
Loading…
Reference in a new issue