Class: PRM::Repo
- Inherits:
-
Object
- Object
- PRM::Repo
- Defined in:
- lib/prm/repo.rb
Instance Attribute Summary collapse
-
#accesskey ⇒ Object
Returns the value of attribute accesskey.
-
#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.
-
#path ⇒ Object
Returns the value of attribute path.
-
#recent ⇒ Object
Returns the value of attribute recent.
-
#release ⇒ Object
Returns the value of attribute release.
-
#secretkey ⇒ Object
Returns the value of attribute secretkey.
-
#snapshot ⇒ Object
Returns the value of attribute snapshot.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Methods included from Redhat
Methods included from SNAP
Methods included from DHO
Methods included from Debian
#build_apt_repo, #generate_packages_gz, #generate_release, #generate_release_gpg, #move_packages
Instance Attribute Details
#accesskey ⇒ Object
Returns the value of attribute accesskey.
471 472 473 |
# File 'lib/prm/repo.rb', line 471 def accesskey @accesskey end |
#arch ⇒ Object
Returns the value of attribute arch.
467 468 469 |
# File 'lib/prm/repo.rb', line 467 def arch @arch end |
#component ⇒ Object
Returns the value of attribute component.
466 467 468 |
# File 'lib/prm/repo.rb', line 466 def component @component end |
#directory ⇒ Object
Returns the value of attribute directory.
473 474 475 |
# File 'lib/prm/repo.rb', line 473 def directory @directory end |
#gpg ⇒ Object
Returns the value of attribute gpg.
469 470 471 |
# File 'lib/prm/repo.rb', line 469 def gpg @gpg end |
#path ⇒ Object
Returns the value of attribute path.
464 465 466 |
# File 'lib/prm/repo.rb', line 464 def path @path end |
#recent ⇒ Object
Returns the value of attribute recent.
474 475 476 |
# File 'lib/prm/repo.rb', line 474 def recent @recent end |
#release ⇒ Object
Returns the value of attribute release.
468 469 470 |
# File 'lib/prm/repo.rb', line 468 def release @release end |
#secretkey ⇒ Object
Returns the value of attribute secretkey.
470 471 472 |
# File 'lib/prm/repo.rb', line 470 def secretkey @secretkey end |
#snapshot ⇒ Object
Returns the value of attribute snapshot.
472 473 474 |
# File 'lib/prm/repo.rb', line 472 def snapshot @snapshot end |
#type ⇒ Object
Returns the value of attribute type.
465 466 467 |
# File 'lib/prm/repo.rb', line 465 def type @type end |
Instance Method Details
#_parse_vars(arch_ar, component_ar, release_ar) ⇒ Object
502 503 504 505 506 507 |
# File 'lib/prm/repo.rb', line 502 def _parse_vars(arch_ar,component_ar,release_ar) arch_ar = arch.split(",") component_ar = component.split(",") release_ar = release.split(",") return [arch_ar,component_ar,release_ar] end |
#create ⇒ Object
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/prm/repo.rb', line 476 def create if "#{@type}" == "deb" parch,pcomponent,prelease = _parse_vars(arch,component,release) if snapshot snapshot_to(path,pcomponent,prelease,snapshot,type,recent) pcomponent = snapshot end if directory silent = true build_apt_repo(path,pcomponent,parch,prelease,gpg,silent) if move_packages(path,pcomponent,parch,prelease,directory) == false return end end silent = false build_apt_repo(path,pcomponent,parch,prelease,gpg,silent) elsif "#{@type}" == "sync" sync_to_dho(path, accesskey, secretkey,pcomponent,prelease) elsif "#{@type}" == "rpm" component = "test" parch,prelease = _parse_vars(arch,component,release) silent = false build_rpm_repo(path,parch,prelease,gpg,silent) end end |