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

Bug#523017: debian-cd : an empty 'Packages' file for local packages is missing (if there are only local udebs)



Hi,

Thank your for the patch. It is still useful.
I just had to update the line numbers of the first hunk
(included below - I hope it will help).

I must admit I haven't understood the second hunk yet.
Is it still needed nowadays ? What use case does it address ?

Regards,
JH Chatenet

diff -Naur a/debian-cd/tools/make_disc_trees.pl b/debian-cd/tools/make_disc_trees.pl
--- a/debian-cd/tools/make_disc_trees.pl	2019-12-12 12:22:25.000000000 +0100
+++ b/debian-cd/tools/make_disc_trees.pl	2020-08-17 21:17:28.533910458 +0200
@@ -598,11 +598,15 @@
 	$filename = $File::Find::name;
 
 	if ((-d "$_") && ($filename =~ m/\/main\/binary-[^\/]*$/)) {
-		if ((-f "$_/Packages") && (! -d "../local/$_/")) {
-			mkdir "../local/$_/" || die "Error creating directory local/$_: $!\n";
-			open(LPFILE, ">../local/$_/Packages") or die "Error creating local/$_/Packages: $!\n";
-			close LPFILE;
-			print "  Created empty Packages file for local/$_\n";
+		if (-f "$_/Packages") {
+			if (! -d "../local/$_/") {
+				mkdir "../local/$_/" || die "Error creating directory local/$_: $!\n";
+			}
+			if ( ! -f "../local/$_/Packages" ) {
+				open(LPFILE, ">../local/$_/Packages") or die "Error creating local/$_/Packages: $!\n";
+				close LPFILE;
+				print "  Created empty Packages file for local/$_\n";
+			}
 		}
 	}
 }


Reply to: