Class: FRM::PackageRelease

Inherits:
Base
  • Object
show all
Defined in:
lib/frm/release.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#compute_md5, #compute_sha1, #compute_sha2, #generate_gzip_pipe, #gpg_clearsign, #gpg_detached, #gunzip_pipe, #merge_package_file, #parse_package_stub

Constructor Details

#initialize(packages = {}, release = 'natty', component = 'main/binary-amd64') ⇒ PackageRelease

Returns a new instance of PackageRelease.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/frm/release.rb', line 5

def initialize(packages={},release='natty',component='main/binary-amd64')
  @release = release
  @component = component
  @standards_version = standards_version
  @priority = priority
  @packages = []
  packages.each { |package| @packages << Package.new(package,@release) }
  if component == 'main/binary-amd64'
    generate_i386_stubs
  end
  @i386_release_file = <<EOF
Component: main
Origin: apt.cloudscaling.com
Label: apt repository #{@release}
Architecture: i386
Description: Cloudscaling APT repository
EOF
  @i386_packages_file = ""
  @gzipped_i386_packages_file = generate_gzip_pipe(@i386_packages_file).read
  @package_file = generate_package_file
  @gzipped_package_file = generate_gzip_pipe(@package_file).read
  @short_release_file = generate_short_release_file
  @release_file = generate_release_file
end

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



4
5
6
# File 'lib/frm/release.rb', line 4

def component
  @component
end

#gzipped_i386_packages_fileObject (readonly)

Returns the value of attribute gzipped_i386_packages_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def gzipped_i386_packages_file
  @gzipped_i386_packages_file
end

#gzipped_package_fileObject (readonly)

Returns the value of attribute gzipped_package_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def gzipped_package_file
  @gzipped_package_file
end

#i386_packages_fileObject (readonly)

Returns the value of attribute i386_packages_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def i386_packages_file
  @i386_packages_file
end

#i386_release_fileObject (readonly)

Returns the value of attribute i386_release_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def i386_release_file
  @i386_release_file
end

#package_fileObject (readonly)

Returns the value of attribute package_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def package_file
  @package_file
end

#packagesObject (readonly)

Returns the value of attribute packages.



4
5
6
# File 'lib/frm/release.rb', line 4

def packages
  @packages
end

#priorityObject (readonly)

Returns the value of attribute priority.



4
5
6
# File 'lib/frm/release.rb', line 4

def priority
  @priority
end

#releaseObject (readonly)

Returns the value of attribute release.



4
5
6
# File 'lib/frm/release.rb', line 4

def release
  @release
end

#release_fileObject (readonly)

Returns the value of attribute release_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def release_file
  @release_file
end

#short_release_fileObject (readonly)

Returns the value of attribute short_release_file.



4
5
6
# File 'lib/frm/release.rb', line 4

def short_release_file
  @short_release_file
end

#standards_versionObject (readonly)

Returns the value of attribute standards_version.



4
5
6
# File 'lib/frm/release.rb', line 4

def standards_version
  @standards_version
end