Class: MPRM::Repo
Instance Attribute Summary collapse
-
#arch ⇒ Object
Returns the value of attribute arch.
-
#component ⇒ Object
Returns the value of attribute component.
-
#directory ⇒ Object
Returns the value of attribute directory.
-
#gpg ⇒ Object
Returns the value of attribute gpg.
-
#gpg_passphrase ⇒ Object
Returns the value of attribute gpg_passphrase.
-
#gpg_sign_algorithm ⇒ Object
Returns the value of attribute gpg_sign_algorithm.
-
#label ⇒ Object
Returns the value of attribute label.
-
#nocache ⇒ Object
Returns the value of attribute nocache.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#path ⇒ Object
Returns the value of attribute path.
-
#release ⇒ Object
Returns the value of attribute release.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Methods included from Redhat
#build_rpm_repo, #create_filelists_xml, #create_other_xml, #create_primary_xml, #create_repomd_xml, #move_rpm_packages
Methods included from Debian
#build_apt_repo, #generate_packages_gz, #generate_release, #generate_release_gpg, #move_apt_packages, #s3_compatible_encode
Instance Attribute Details
#arch ⇒ Object
Returns the value of attribute arch.
12 13 14 |
# File 'lib/mprm/repo.rb', line 12 def arch @arch end |
#component ⇒ Object
Returns the value of attribute component.
11 12 13 |
# File 'lib/mprm/repo.rb', line 11 def component @component end |
#directory ⇒ Object
Returns the value of attribute directory.
19 20 21 |
# File 'lib/mprm/repo.rb', line 19 def directory @directory end |
#gpg ⇒ Object
Returns the value of attribute gpg.
16 17 18 |
# File 'lib/mprm/repo.rb', line 16 def gpg @gpg end |
#gpg_passphrase ⇒ Object
Returns the value of attribute gpg_passphrase.
17 18 19 |
# File 'lib/mprm/repo.rb', line 17 def gpg_passphrase @gpg_passphrase end |
#gpg_sign_algorithm ⇒ Object
Returns the value of attribute gpg_sign_algorithm.
18 19 20 |
# File 'lib/mprm/repo.rb', line 18 def gpg_sign_algorithm @gpg_sign_algorithm end |
#label ⇒ Object
Returns the value of attribute label.
14 15 16 |
# File 'lib/mprm/repo.rb', line 14 def label @label end |
#nocache ⇒ Object
Returns the value of attribute nocache.
20 21 22 |
# File 'lib/mprm/repo.rb', line 20 def nocache @nocache end |
#origin ⇒ Object
Returns the value of attribute origin.
15 16 17 |
# File 'lib/mprm/repo.rb', line 15 def origin @origin end |
#path ⇒ Object
Returns the value of attribute path.
9 10 11 |
# File 'lib/mprm/repo.rb', line 9 def path @path end |
#release ⇒ Object
Returns the value of attribute release.
13 14 15 |
# File 'lib/mprm/repo.rb', line 13 def release @release end |
#type ⇒ Object
Returns the value of attribute type.
10 11 12 |
# File 'lib/mprm/repo.rb', line 10 def type @type end |
Instance Method Details
#_parse_vars(arch_ar, component_ar, release_ar) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/mprm/repo.rb', line 45 def _parse_vars(arch_ar,component_ar,release_ar) arch_ar = arch.split(",") if !component.nil? component_ar = component.split(",") end release_ar = release.split(",") [arch_ar,component_ar,release_ar] end |
#create ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/mprm/repo.rb', line 22 def create if "#{@type}" == "deb" parch,pcomponent,prelease = _parse_vars(arch,component,release) if directory build_apt_repo(path,pcomponent,parch,prelease,label,origin,gpg,nocache) if move_apt_packages(path,pcomponent,parch,prelease,directory) == false return end end build_apt_repo(path,pcomponent,parch,prelease,label,origin,gpg,nocache) elsif "#{@type}" == "rpm" component = nil parch,pcomponent,prelease = _parse_vars(arch,component,release) if directory build_rpm_repo(path,parch,prelease,gpg) if move_rpm_packages(path,parch,prelease,directory) == false return end end build_rpm_repo(path,parch,prelease,gpg) end end |