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.
-
#nocache ⇒ Object
Returns the value of attribute nocache.
-
#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
#build_rpm_repo, #create_filelists_xml, #create_other_xml, #create_primary_xml, #create_repomd_xml
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.
352 353 354 |
# File 'lib/prm/repo.rb', line 352 def accesskey @accesskey end |
#arch ⇒ Object
Returns the value of attribute arch.
348 349 350 |
# File 'lib/prm/repo.rb', line 348 def arch @arch end |
#component ⇒ Object
Returns the value of attribute component.
347 348 349 |
# File 'lib/prm/repo.rb', line 347 def component @component end |
#directory ⇒ Object
Returns the value of attribute directory.
354 355 356 |
# File 'lib/prm/repo.rb', line 354 def directory @directory end |
#gpg ⇒ Object
Returns the value of attribute gpg.
350 351 352 |
# File 'lib/prm/repo.rb', line 350 def gpg @gpg end |
#nocache ⇒ Object
Returns the value of attribute nocache.
356 357 358 |
# File 'lib/prm/repo.rb', line 356 def nocache @nocache end |
#path ⇒ Object
Returns the value of attribute path.
345 346 347 |
# File 'lib/prm/repo.rb', line 345 def path @path end |
#recent ⇒ Object
Returns the value of attribute recent.
355 356 357 |
# File 'lib/prm/repo.rb', line 355 def recent @recent end |
#release ⇒ Object
Returns the value of attribute release.
349 350 351 |
# File 'lib/prm/repo.rb', line 349 def release @release end |
#secretkey ⇒ Object
Returns the value of attribute secretkey.
351 352 353 |
# File 'lib/prm/repo.rb', line 351 def secretkey @secretkey end |
#snapshot ⇒ Object
Returns the value of attribute snapshot.
353 354 355 |
# File 'lib/prm/repo.rb', line 353 def snapshot @snapshot end |
#type ⇒ Object
Returns the value of attribute type.
346 347 348 |
# File 'lib/prm/repo.rb', line 346 def type @type end |
Instance Method Details
#_parse_vars(arch_ar, component_ar, release_ar) ⇒ Object
385 386 387 388 389 390 391 392 |
# File 'lib/prm/repo.rb', line 385 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
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/prm/repo.rb', line 358 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,nocache) if move_packages(path,pcomponent,parch,prelease,directory) == false return end end silent = false build_apt_repo(path,pcomponent,parch,prelease,gpg,silent,nocache) elsif "#{@type}" == "sync" parch,pcomponent,prelease = _parse_vars(arch,component,release) sync_to_dho(path, accesskey, secretkey,pcomponent,prelease) elsif "#{@type}" == "rpm" component = nil parch,pcomponent,prelease = _parse_vars(arch,component,release) silent = false build_rpm_repo(path,parch,prelease,gpg,silent) end end |