Skip to content

Commit

Permalink
Fixed PackageSelector example to actually load packages
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Nov 17, 2024
1 parent 9d13842 commit bf97801
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions examples/PackageSelector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@ class PackageSelectorClient < Client
def main
Yast.import "UI"
Yast.import "Pkg"
# Pkg::SourceCreate( "http://dist.suse.de/install/SLP/SUSE-10.1-Beta7/i386/CD1/", "" );
# Pkg::SourceCreate( "http://dist.suse.de/install/SLP/SUSE-10.0-RC4/i386/CD1/", "" );
# Pkg::SourceCreate( "file:/srv/10.1-i386/CD1/", "" );
Pkg.SourceCreate("file:/srv/10.1-i386/DVD1/", "")
# Pkg::SourceCreate( "file:/srv/sles-10-i386/CD1/", "" );

if true
Pkg.TargetInit(
"/", # installed system
false
) # don't create a new RPM database
end
Pkg.TargetInitialize("/")
Pkg.TargetLoad
Pkg.SourceRestore
Pkg.SourceLoad

UI.OpenDialog(
Opt(:defaultsize),
PackageSelector(Id(:selector), "/dev/fd0")
PackageSelector(Id(:selector))
)

@input = UI.RunPkgSelection(Id(:selector))
UI.CloseDialog

Expand Down

0 comments on commit bf97801

Please sign in to comment.