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.
-
#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.
-
#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.
-
#upload ⇒ Object
Returns the value of attribute upload.
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 SNAP
Methods included from DHO
Methods included from Debian
#build_apt_repo, #generate_packages_gz, #generate_release, #generate_release_gpg, #move_apt_packages, #s3_compatible_encode
Instance Attribute Details
#accesskey ⇒ Object
Returns the value of attribute accesskey.
374 375 376 |
# File 'lib/prm/repo.rb', line 374 def accesskey @accesskey end |
#arch ⇒ Object
Returns the value of attribute arch.
366 367 368 |
# File 'lib/prm/repo.rb', line 366 def arch @arch end |
#component ⇒ Object
Returns the value of attribute component.
365 366 367 |
# File 'lib/prm/repo.rb', line 365 def component @component end |
#directory ⇒ Object
Returns the value of attribute directory.
376 377 378 |
# File 'lib/prm/repo.rb', line 376 def directory @directory end |
#gpg ⇒ Object
Returns the value of attribute gpg.
370 371 372 |
# File 'lib/prm/repo.rb', line 370 def gpg @gpg end |
#gpg_passphrase ⇒ Object
Returns the value of attribute gpg_passphrase.
371 372 373 |
# File 'lib/prm/repo.rb', line 371 def gpg_passphrase @gpg_passphrase end |
#gpg_sign_algorithm ⇒ Object
Returns the value of attribute gpg_sign_algorithm.
372 373 374 |
# File 'lib/prm/repo.rb', line 372 def gpg_sign_algorithm @gpg_sign_algorithm end |
#label ⇒ Object
Returns the value of attribute label.
368 369 370 |
# File 'lib/prm/repo.rb', line 368 def label @label end |
#nocache ⇒ Object
Returns the value of attribute nocache.
378 379 380 |
# File 'lib/prm/repo.rb', line 378 def nocache @nocache end |
#origin ⇒ Object
Returns the value of attribute origin.
369 370 371 |
# File 'lib/prm/repo.rb', line 369 def origin @origin end |
#path ⇒ Object
Returns the value of attribute path.
363 364 365 |
# File 'lib/prm/repo.rb', line 363 def path @path end |
#recent ⇒ Object
Returns the value of attribute recent.
377 378 379 |
# File 'lib/prm/repo.rb', line 377 def recent @recent end |
#release ⇒ Object
Returns the value of attribute release.
367 368 369 |
# File 'lib/prm/repo.rb', line 367 def release @release end |
#secretkey ⇒ Object
Returns the value of attribute secretkey.
373 374 375 |
# File 'lib/prm/repo.rb', line 373 def secretkey @secretkey end |
#snapshot ⇒ Object
Returns the value of attribute snapshot.
375 376 377 |
# File 'lib/prm/repo.rb', line 375 def snapshot @snapshot end |
#type ⇒ Object
Returns the value of attribute type.
364 365 366 |
# File 'lib/prm/repo.rb', line 364 def type @type end |
#upload ⇒ Object
Returns the value of attribute upload.
379 380 381 |
# File 'lib/prm/repo.rb', line 379 def upload @upload end |
Instance Method Details
#_parse_vars(arch_ar, component_ar, release_ar) ⇒ Object
416 417 418 419 420 421 422 423 |
# File 'lib/prm/repo.rb', line 416 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(",") return [arch_ar,component_ar,release_ar] end |
#create ⇒ Object
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/prm/repo.rb', line 381 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,label,origin,gpg,silent,nocache) if move_apt_packages(path,pcomponent,parch,prelease,directory) == false return end end silent = false build_apt_repo(path,pcomponent,parch,prelease,label,origin,gpg,silent,nocache) elsif "#{@type}" == "sync" parch,pcomponent,prelease = _parse_vars(arch,component,release) object_store = upload sync_to_dho(path, accesskey, secretkey,pcomponent,prelease,object_store) elsif "#{@type}" == "rpm" component = nil parch,pcomponent,prelease = _parse_vars(arch,component,release) if directory silent = true build_rpm_repo(path,parch,prelease,gpg,silent) if move_rpm_packages(path,parch,prelease,directory) == false return end end silent = false build_rpm_repo(path,parch,prelease,gpg,silent) end end |