Bugzilla – Bug 158226
"yast -i horde" doesn't show the "Following packages haven't been found on the medium" error
Last modified: 2006-03-16 16:33:45 UTC
noarch/horde.rpm isn't on the beta7 CDs, so trying to install it should result in an error. However yast -i horde doesn't display an error. Instead, it shows the package selection dialog (with no packages selected) and waits for input. It also happens in Qt gui. It doesn't happen with other packages i tried. horde has been uninstalled during the update from 10.0. The package has also been changed to noarch after 10.0. Apart from that, it's a normal package. Will attach y2logs in a moment.
Created attachment 73008 [details] y2logs.tar.bz2 I tried the commmand several times, so there will be multiple logs of it.
ncurses and also Qt on my testing machine: +------------------------- pop up ---------------------------+ | Following packages haven't been found on the medium: horde | +------------------------------------------------------------+ The only difference is that my system is a new installation. BTW: I've tried to run `yast -i horde` on your system and it reports the very same message? Please, recheck.
Now I see: I was in /srv/www/htdocs, which contains the subdirectory 'horde' (with saved %config files), and this subdirectory somehow causes the described behaviour. For example: cd /tmp mkdir NoSuchPackage yast -i NoSuchPackage Now I don't know whether this is a bug or feature, close as invalid if it's feature. But you can even mkdir man-pages-ja # existing but not installed package yast -i man-pages-ja # doesn't install the package which looks more like a bug to me.
`mkdir FAKE-DIRECTORY` `yast2 -i FAKE-DIRECTORY` (...) `grep FAKE-DIRECTORY y2log` >> 2006-03-16 16:33:54 <1> liche(21346) [YCP] clients/sw_single.ycp:93 CheckWhichPackages (["FAKE-DIRECTORY"]) 2006-03-16 16:33:54 <1> liche(21346) [YCP] clients/sw_single.ycp:146 Reading file FAKE-DIRECTORY 2006-03-16 16:33:54 <3> liche(21346) [Interpreter] clients/sw_single.ycp:147 Parsing file 'FAKE-DIRECTORY' failed It just tries to parse the 'FAKE-DIRECTORY' file See: /usr/share/YaST2/clients/sw_single.ycp line 146 `cat test_file` >> apache2 apache2-worker `yast2 -i test_file` >> packages would get installed (no newline is allowed after the last entry in test_file) Please, try this patch: /usr/share/YaST2/clients/sw_single.ycp Index: sw_single.ycp =================================================================== --- sw_single.ycp (revision 29055) +++ sw_single.ycp (working copy) @@ -150,6 +150,8 @@ { string packagestr = (string) SCR::Read( .target.string, arg_name); // string ascii file next packagelist = splitstring (packagestr, "\n"); + // filter empty lines out, bug #158226 + packagelist = filter (string package, packagelist, { return !regexpmatch(package, "^ *$"); }); } } y2milestone("packagelist: %1", packagelist );
Fixed with this patch Index: clients/sw_single.ycp =================================================================== --- src/clients/sw_single.ycp (revision 29057) +++ src/clients/sw_single.ycp (working copy) @@ -29,6 +29,7 @@ import "Label"; import "PackageSystem"; import "Report"; + import "FileUtils"; list<string> packagelist = []; // list of packages to install @@ -137,7 +138,7 @@ { string arg_name = arg_list[0]:""; - if ( SCR::Read(.target.size, arg_name) <= 0 ) // a local file ? + if ( ! FileUtils::IsFile(arg_name) || FileUtils::GetSize(arg_name) <= 0 ) // Check: a local file ? bigger than 0? { packagelist = arg_list; // No: expect package names } @@ -150,6 +151,8 @@ { string packagestr = (string) SCR::Read( .target.string, arg_name); // string ascii file next packagelist = splitstring (packagestr, "\n"); + // filter empty lines out, bug #158226 + packagelist = filter (string package, packagelist, { return !regexpmatch(package, "^ *$"); }); } } y2milestone("packagelist: %1", packagelist );