launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32198
Re: [Merge] ~tushar5526/launchpad:bug-fixes-and-optimisations-for-archive-and-exclude-options into launchpad:master
Diff comments:
> diff --git a/lib/lp/archivepublisher/scripts/publishdistro.py b/lib/lp/archivepublisher/scripts/publishdistro.py
> index 33982d8..fe9e002 100644
> --- a/lib/lp/archivepublisher/scripts/publishdistro.py
> +++ b/lib/lp/archivepublisher/scripts/publishdistro.py
> @@ -646,10 +646,8 @@ class PublishDistro(PublisherScript):
> exclude_options = []
> # If there are any archives specified to be excluded, exclude rsync
> # for them in the rsync command
> - for excluded_archive in self.findArchives(
> - self.options.excluded_archives
> - ):
> - exclude_options.extend(["--exclude", excluded_archive.reference])
> + for excluded_archive_reference in self.options.excluded_archives:
We don't have findArchives as missing PPA references are meant to be ignored by rsync command eventually via the --missing-args command.
> + exclude_options.extend(["--exclude", excluded_archive_reference])
> return [
> self._buildRsyncCommand(
> extra_options=exclude_options,
> @@ -704,11 +694,16 @@ class PublishDistro(PublisherScript):
> archive_path.name,
> )
> continue
> - # skip any archive excluded by --exclude
> - if archive in self.findArchives(
No need to filter based on distribution here, as the archive being fetched in the code above is already filtered based on distribution's name. Updated a test case to test this behaviour.
> - self.options.excluded_archives, distribution
> + # If --archive is set, run only for the specified archives
> + # and skip others.
> + if (
Moved after Line 30: if archive is None as archive.reference was erroring out. Added relevant tests for it.
> + self.options.archives
> + and archive.reference not in self.options.archives
> ):
> continue
> + # skip any archive excluded by --exclude
> + if archive.reference in self.options.excluded_archives:
> + continue
> for suite_path in archive_path.iterdir():
> try:
> series, pocket = distribution.getDistroSeriesAndPocket(
--
https://code.launchpad.net/~tushar5526/launchpad/+git/launchpad/+merge/480702
Your team Launchpad code reviewers is requested to review the proposed merge of ~tushar5526/launchpad:bug-fixes-and-optimisations-for-archive-and-exclude-options into launchpad:master.
References