Subject: [PATCH 12/25] Add "changes" lab directory

From: Adam D. Barratt <[email-masked]>
Date: Wed, 6 Jan 2010 16:58:22 +0000

As a consequence, increase the lab format version.
---
 frontend/lintian |    2 +-
 lib/Lab.pm       |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/frontend/lintian b/frontend/lintian
index bbe583a..c1304d2 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -30,7 +30,7 @@ use Getopt::Long;
 # {{{ Global Variables
 my $LINTIAN_VERSION = "<VERSION>";	#External Version number
 my $BANNER = "Lintian v$LINTIAN_VERSION"; #Version Banner - text form
-my $LAB_FORMAT = 9;		#Lab format Version Number
+my $LAB_FORMAT = 10;		#Lab format Version Number
 				#increased whenever incompatible
 				#changes are done to the lab
 				#so that all packages are re-unpacked
diff --git a/lib/Lab.pm b/lib/Lab.pm
index cc319ce..565d38d 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -50,6 +50,7 @@ sub is_lab {
     return -d "$self->{dir}/binary"
 	&& -d "$self->{dir}/udeb"
 	&& -d "$self->{dir}/source"
+	&& -d "$self->{dir}/changes"
 	&& -d "$self->{dir}/info";
 }
 
@@ -106,7 +107,7 @@ sub setup_force {
     }
 
     # create base directories
-    for my $subdir (qw( binary source udeb info )) {
+    for my $subdir (qw( binary source udeb changes info )) {
 	my $fulldir = "$dir/$subdir";
 	if (not -d $fulldir) {
 	    mkdir($fulldir, 0777)
@@ -216,6 +217,7 @@ sub delete_force {
     unless (delete_dir("$self->{dir}/binary",
 		       "$self->{dir}/source",
 		       "$self->{dir}/udeb",
+		       "$self->{dir}/changes",
 		       "$self->{dir}/info")) {
 		warning("cannot remove lab directory $self->{dir} (please remove it yourself)");
     }
-- 
1.6.6