Re: FBR: Only sync drpms if repo has them

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

 




On 11/10/2017 07:42 PM, Patrick Uiterwijk wrote:
> Source repos do not have drpms, and neither do new repos (aka, first
> time a release gets mashed).
> +1s?
> 
> 
> diff --git a/roles/bodhi2/backend/files/new-updates-sync
> b/roles/bodhi2/backend/files/new-updates-sync
> index a241eeb..7f3baae 100755
> --- a/roles/bodhi2/backend/files/new-updates-sync
> +++ b/roles/bodhi2/backend/files/new-updates-sync
> @@ -204,11 +204,13 @@ def sync_single_repo_arch(release, repo, arch, dest_path):
>      maindir = 'tree' if arch == 'source' else 'os'
> 
>      results = []
> +    do_drpms = os.path.exists(os.path.join(source_path, maindir, 'drpms'))
> 
>      results.append(rsync(os.path.join(source_path, maindir, 'Packages'),
>                           os.path.join(dest_path)))
> -    results.append(rsync(os.path.join(source_path, maindir, 'drpms'),
> -                         os.path.join(dest_path)))
> +    if do_rpms:
> +        results.append(rsync(os.path.join(source_path, maindir, 'drpms'),
> +                             os.path.join(dest_path)))
>      if arch != 'source':
>          results.append(rsync(os.path.join(source_path, 'debug',
> 'tree', 'Packages'),
>                               os.path.join(dest_path, 'debug')))
> @@ -224,9 +226,10 @@ def sync_single_repo_arch(release, repo, arch, dest_path):
>      results.append(rsync(os.path.join(source_path, maindir, 'Packages'),
>                           os.path.join(dest_path),
>                           delete=True))
> -    results.append(rsync(os.path.join(source_path, maindir, 'drpms'),
> -                         os.path.join(dest_path)),
> -                         delete=True)
> +    if do_rpms:
> +        results.append(rsync(os.path.join(source_path, maindir, 'drpms'),
> +                             os.path.join(dest_path),
> +                             delete=True))
> 
>      return collect_stats(results)
> _______________________________________________


+1 
_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux