Changeset 2362 in ProjectBuilder for devel/pb/bin/pb
- Timestamp:
- Feb 25, 2019, 12:20:27 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r2357 r2362 1985 1985 my $keyfile = pb_ssh_get(1); 1986 1986 pb_mkdir_p("$ENV{'HOME'}/.abuild"); 1987 open(CONF,"> $ENV{'HOME'}/.abuild/abuild.conf") || c onfess "Unable to create the abuild conf file";1987 open(CONF,"> $ENV{'HOME'}/.abuild/abuild.conf") || cluck "Unable to create the abuild conf file" && return; 1988 1988 print CONF "PACKAGER_PRIVKEY=\"$keyfile\"\n" if (defined $keyfile); 1989 1989 close(CONF); … … 2618 2618 # Remove a potential $ENV{'HOME'} as tdir should be relative to pb's home 2619 2619 if ($cmt =~ /^VE/o) { 2620 $tdir =~ s|\$ENV.+\}/|| or c onfess "for $cmt: $tdir must have \$ENV{'HOME'} in it or the remainder of the code won't work since some parts use relative pathing and others will try absolute. Use a symlink if necessary to place the real files in a different place than under your home directory";2620 $tdir =~ s|\$ENV.+\}/|| or cluck "for $cmt: $tdir must have \$ENV{'HOME'} in it or the remainder of the code won't work since some parts use relative pathing and others will try absolute. Use a symlink if necessary to place the real files in a different place than under your home directory" && return; 2621 2621 } else { 2622 2622 # process, ok if not present. … … 2682 2682 # TODO: we don't do anything with found !! 2683 2683 my $found = pb_ve_docker_get_image($tag{$pbstep}); 2684 c onfess"No image $tag{$pbstep} available in Docker, please create one first\n" if (not defined $found);2684 cluck "No image $tag{$pbstep} available in Docker, please create one first\n" if (not defined $found); 2685 2685 # Now we use that image to do what is needed 2686 2686 # use a dockerfile to ease the creation of next images … … 2723 2723 $homedir = `$cmd1 run --cidfile="$cidfile" $tag{$pbstep} grep -E '^$dkaccount:' /etc/passwd | cut -d: -f6`; 2724 2724 chomp($homedir); 2725 open(CID,"$cidfile") || c onfess "Unable to open $cidfile";2725 open(CID,"$cidfile") || cluck "Unable to open $cidfile" && return; 2726 2726 my $cid = <CID>; 2727 2727 close(CID); … … 2793 2793 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 2794 2794 my $pbextdir = pb_get_extdir(); 2795 confess "Unable to get package list" if (not defined $pkg); 2795 if (not defined $pkg) { 2796 cluck "Unable to get package list"; 2797 return 2798 } 2796 2799 2797 2800 # We consider 2 specific packages … … 2891 2894 } 2892 2895 my $ts = "$ENV{'PBTMP'}/vebuild/".basename($pbscript2); 2893 open(DOCKER," > $ts") || c onfess "Unable to create $ts";2896 open(DOCKER," > $ts") || cluck "Unable to create $ts" && return; 2894 2897 print DOCKER "#!/bin/bash\n"; 2895 2898 print DOCKER "# Put content from host to guest, copying to have the correct uid/gid and rights to do so\n"; … … 3532 3535 3533 3536 if (($action eq "test") && (! -x "$ENV{'PBDESTDIR'}/pbtest")) { 3534 confess "No test script ($ENV{'PBDESTDIR'}/pbtest) found when in test mode. Aborting ..."; 3537 cluck "No test script ($ENV{'PBDESTDIR'}/pbtest) found when in test mode. Aborting ..."; 3538 next; 3535 3539 } 3536 3540 print SCRIPT "pb --version\n"; … … 3774 3778 # Do not use the one passed potentially with -a 3775 3779 my ($pbac) = pb_conf_get($vtype."login"); 3776 confess "No $vtype"."login defined in your project yml conf file" if ((not defined $pbac) || (not defined $pbac->{$ENV{'PBPROJ'}})); 3780 if ((not defined $pbac) || (not defined $pbac->{$ENV{'PBPROJ'}})) { 3781 cluck "No $vtype"."login defined in your project yml conf file"; 3782 next; 3783 } 3777 3784 3778 3785 my $key = ""; … … 4898 4905 my $bdir; 4899 4906 4900 opendir($bdir,"$dir") || c onfess "Unable to open directory $dir: $!";4907 opendir($bdir,"$dir") || cluck "Unable to open directory $dir: $!" && return; 4901 4908 foreach my $f (readdir($bdir)) { 4902 4909 next if ($f =~ /^\./); … … 5167 5174 if (not defined $ENV{'PBPASSPHRASE'}) { 5168 5175 if (not defined $ENV{'PBPASSFILE'}) { 5169 c onfess("No pbpassphrase nor pbpassfile defined, unable to handle GPG Release file\n");5176 cluck("No pbpassphrase nor pbpassfile defined, unable to handle GPG Release file\n"); 5170 5177 } else { 5171 open(PASS,"$ENV{'PBPASSFILE'}") || c onfess("Unable to open $ENV{'PBPASSFILE'}\n");5178 open(PASS,"$ENV{'PBPASSFILE'}") || cluck("Unable to open $ENV{'PBPASSFILE'}\n") && return; 5172 5179 my $pass = <PASS>; 5173 5180 chomp($pass);
Note:
See TracChangeset
for help on using the changeset viewer.