launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29820
[Merge] ~cjwatson/launchpad-buildd:recipe-ignore-fewer-files into launchpad-buildd:master
Colin Watson has proposed merging ~cjwatson/launchpad-buildd:recipe-ignore-fewer-files into launchpad-buildd:master.
Commit message:
Ignore fewer files when building recipes
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/439758
`dpkg-buildpackage -I` ignores files matching a number of patterns (see `@tar_ignore_default_pattern` in `/usr/share/perl5/Dpkg/Source/Package.pm`). Most of these are revision control metadata, and ignoring those is no problem. However, they also include things like `.a` and `.so`. Including these in source packages is typically not good practice, but in the rare cases where people need to do it, `dpkg-buildpackage -I` leaves them with no good alternative: there's no way to override it and say that particular files shouldn't be ignored.
Since by definition we're building from a clean bzr or git tree here, the only things we actually need to ignore are the `.bzr` and `.git` directories. For everything else, we can reasonably assume that if it's checked into revision control then the developer most probably wants to have it in the source package.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:recipe-ignore-fewer-files into launchpad-buildd:master.
diff --git a/bin/buildrecipe b/bin/buildrecipe
index 6cfa10f..8cbda6d 100755
--- a/bin/buildrecipe
+++ b/bin/buildrecipe
@@ -413,7 +413,8 @@ class RecipeBuilder:
[
"su",
"-c",
- "cd %s && /usr/bin/dpkg-buildpackage -i -I -us -uc -S -sa"
+ "cd %s && "
+ "/usr/bin/dpkg-buildpackage -i -I.bzr -I.git -us -uc -S -sa"
% self.source_dir_relative,
self.username,
]
diff --git a/debian/changelog b/debian/changelog
index f18c8dd..2a44a99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+launchpad-buildd (231) UNRELEASED; urgency=medium
+
+ * Only ignore .bzr and .git when building source packages from recipes,
+ not all the things that "dpkg-source -I" ignores.
+
+ -- Colin Watson <cjwatson@xxxxxxxxxx> Mon, 27 Mar 2023 17:56:08 +0100
+
launchpad-buildd (230) focal; urgency=medium
* Apply black and isort.