Files
mulhern 7672e9a8a2 Bastille: Miscellaneous fixes to the Bastille code base.
[YOCTO #3867]

Adds four additional small patches which address miscellaneous small problems
in Bastille.

The four patches are:

fix_missing_use_directives.patch: A number of use directives were missing from
several files. These were added as discovered.

fix_number_of_modules.patch: The curses interface includes a title for most
screens which gives a module, a module number, and the number of modules in the
series. Previously the last value was always 0, now it is simply
omitted. It would be more desirable to give the correct number, but this would
require a significant change to the code base.

remove_questions_text_file_references.patch: This version of Bastille does
not make use of a Questions.txt file, therefore the specification of the
location of this file in the OSMap/*.bastille files has been removed.

simplify_B_place.patch: This patch discards redundant variables, mostly
defined but not used cases, and makes the error reporting more informative.

Signed-off-by: mulhern <mulhern@yoctoproject.org>
2013-08-30 15:31:28 -04:00

41 lines
1.5 KiB
Diff

Upstream Status: Inappropriate [No upstream maintenance]
Signed-off-by: Anne Mulhern <mulhern@yoctoproject.org>
---
Index: Bastille/Bastille/API.pm
===================================================================
--- Bastille.orig/Bastille/API.pm 2013-08-21 08:59:17.939950001 -0400
+++ Bastille/Bastille/API.pm 2013-08-21 08:59:30.983950001 -0400
@@ -1679,24 +1679,22 @@
use File::Copy;
- my $original_source=$source;
$source = &getGlobal('BDIR', "share") . $source;
- my $original_target=$target;
if ( -e $target and -f $target ) {
- &B_backup_file($original_target);
- &B_log("ACTION","About to copy $original_source to $original_target -- had to backup target\n");
+ &B_backup_file($target);
+ &B_log("ACTION","About to copy $source to $target -- had to backup target\n");
$had_to_backup_target=1;
}
$retval=copy($source,$target);
if ($retval) {
- &B_log("ACTION","placed file $original_source as $original_target\n");
+ &B_log("ACTION","placed file $source as $target\n");
#
# We want to add a line to the &getGlobal('BFILE', "created-files") so that the
# file we just put at $original_target gets deleted.
- &B_revert_log(&getGlobal('BIN',"rm") . " $original_target\n");
+ &B_revert_log(&getGlobal('BIN',"rm") . " $target\n");
} else {
- &B_log("ERROR","Failed to place $original_source as $original_target\n");
+ &B_log("ERROR","Failed to place $source as $target\n");
}
# We add the file to the GLOBAL_SUMS hash if it is not already present