Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #111 from seomoz/dan/skip-package-upload-use
Browse files Browse the repository at this point in the history
Use options[:skip_package_upload] where needed
  • Loading branch information
krobertson authored Aug 8, 2017
2 parents 67a57c7 + 3deaa1f commit f614752
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/deb/s3/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def upload(*files)
end

# retrieve the manifest for the arch if we don't have it already
manifests[arch] ||= Deb::S3::Manifest.retrieve(options[:codename], component, arch, options[:cache_control], options[:fail_if_exists])
manifests[arch] ||= Deb::S3::Manifest.retrieve(options[:codename], component, arch, options[:cache_control], options[:fail_if_exists], options[:skip_package_upload])

# add package in manifests
begin
Expand Down Expand Up @@ -279,7 +279,7 @@ def list
rows = archs.map { |arch|
manifest = Deb::S3::Manifest.retrieve(options[:codename], component,
arch, options[:cache_control],
false)
false, false)
manifest.packages.map do |package|
if options[:long]
package.generate
Expand Down Expand Up @@ -319,7 +319,7 @@ def show(package_name, version, arch)

# retrieve the existing manifests
manifest = Deb::S3::Manifest.retrieve(options[:codename], component, arch,
options[:cache_control], false)
options[:cache_control], false, false)
package = manifest.packages.detect { |p|
p.name == package_name && p.full_version == version
}
Expand Down Expand Up @@ -393,11 +393,12 @@ def copy(package_name, to_codename, to_component)
from_manifest = Deb::S3::Manifest.retrieve(options[:codename],
component, arch,
options[:cache_control],
false)
false, options[:skip_package_upload])
to_release = Deb::S3::Release.retrieve(to_codename)
to_manifest = Deb::S3::Manifest.retrieve(to_codename, to_component, arch,
options[:cache_control],
options[:fail_if_exists])
options[:fail_if_exists],
options[:skip_package_upload])
packages = from_manifest.packages.select { |p|
p.name == package_name &&
(versions.nil? || versions.include?(p.full_version))
Expand Down Expand Up @@ -464,7 +465,7 @@ def delete(package)
# retrieve the existing manifests
log("Retrieving existing manifests")
release = Deb::S3::Release.retrieve(options[:codename], options[:origin], options[:suite])
manifest = Deb::S3::Manifest.retrieve(options[:codename], component, options[:arch], options[:cache_control], false)
manifest = Deb::S3::Manifest.retrieve(options[:codename], component, options[:arch], options[:cache_control], false, options[:skip_package_upload])

deleted = manifest.delete_package(package, versions)
if deleted.length == 0
Expand Down Expand Up @@ -505,7 +506,8 @@ def verify
release.architectures.each do |arch|
log("Checking for missing packages in: #{options[:codename]}/#{options[:component]} #{arch}")
manifest = Deb::S3::Manifest.retrieve(options[:codename], component,
arch, options[:cache_control], false)
arch, options[:cache_control], false,
options[:skip_package_upload])
missing_packages = []

manifest.packages.each do |p|
Expand Down

0 comments on commit f614752

Please sign in to comment.