[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.11-11-g66f2edc



The following commit has been merged in the master branch:
commit 84842080b2ad52796c093ccac76a9cae84fe15d7
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Wed Jun 17 22:23:29 2009 -0500

    Collect menu-methods rather than reading them from unpacked/
    
    The 'menus' check required an unpack level of two only to read some,
    rare, small files while the menu-files collection script was already
    collecting the other small files required for that check. By collecting
    these files as well, the unpack level of 'menus' drops to '1'.

diff --git a/checks/menus b/checks/menus
index 81466cb..8f61724 100644
--- a/checks/menus
+++ b/checks/menus
@@ -128,9 +128,11 @@ for my $file (sort keys %{$info->index}) {
 	    # the menu manual
 
 	    my $menumethod_includes_menu_h = 0;
+	    my $local_file = $file;
+	    $local_file =~ s,^etc/menu-methods/,,;
 	    $menumethod_file = $file;
 
-	    open(MM, '<', "unpacked/$file") or fail("cannot open menu-method file $file: $!");
+	    open(MM, '<', "menu/methods/$local_file") or fail("cannot open menu-method file $local_file: $!");
 	    while (<MM>) {
 		chomp;
 		if (m,^!include menu.h,o) {
diff --git a/checks/menus.desc b/checks/menus.desc
index 6043add..517c514 100644
--- a/checks/menus.desc
+++ b/checks/menus.desc
@@ -2,7 +2,7 @@ Check-Script: menus
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: men
 Type: binary
-Unpack-Level: 2
+Unpack-Level: 1
 Needs-Info: doc-base-files
 
 Tag: postinst-should-not-set-usr-doc-link
diff --git a/collection/menu-files b/collection/menu-files
index 381f9e4..d48aa4a 100755
--- a/collection/menu-files
+++ b/collection/menu-files
@@ -37,18 +37,17 @@ if (-e "menu") {
 
 mkdir("menu", 0777) or fail("cannot mkdir menu: $!");
 
-if (-d "unpacked/usr/lib/menu") {    
-     copy_dir('unpacked/usr/lib/menu', 'menu/lib')
-	or fail("cannot copy unpacked/usr/lib/menu/ directory");
-} else {
-    # no menu directory
-    mkdir("menu/lib", 0777) or fail("cannot mkdir menu/lib: $!");
-}
-
-if (-d "unpacked/usr/share/menu") {    
-    copy_dir('unpacked/usr/share/menu', 'menu/share')
-	or fail("cannot copy unpacked/usr/share/menu directory");
-} else {
-    # no menu directory
-    mkdir("menu/share", 0777) or fail("cannot mkdir menu/share: $!");
+my %dirs;
+$dirs{'share'}   = 'usr/share/menu';
+$dirs{'lib'}     = 'usr/lib/menu';
+$dirs{'methods'} = 'etc/menu-methods';
+
+while (my ($shortn, $path) = each %dirs) {
+    if (-d "unpacked/$path") {
+	 copy_dir("unpacked/$path", "menu/$shortn")
+	    or fail("cannot copy unpacked/$path/ directory");
+    } else {
+	# no menu directory
+	mkdir("menu/$shortn", 0777) or fail("cannot mkdir menu/$shortn: $!");
+    }
 }
diff --git a/collection/menu-files.desc b/collection/menu-files.desc
index 33dbed0..dfcdf6d 100644
--- a/collection/menu-files.desc
+++ b/collection/menu-files.desc
@@ -3,5 +3,5 @@ Author: Richard Braakman <dark@xs4all.nl>
 Info: This script copies the contents of /usr/lib/menu into the lintian menu/ directory.
 Type: binary
 Unpack-Level: 2
-Version: 1
+Version: 2
 Order: 1

-- 
Debian package checker


Reply to: