Description of problem: Kpackage does not uninstall RPMs. Version-Release number of selected component (if applicable): kdeadmin-3.5.7-1.fc7.1 How reproducible: Choose an RPM and try to uninstall it in kpackage Steps to Reproduce: 1. Load kpackage 2. Choose an RPM 3. Select uninstall from the right hand pane, near the bottom 4. A window opens, choose uninstall 5. It simply closes (despite the option keep window open) and does nothing. Actual results: Expected results: Additional info:
Created attachment 253811 [details] Fixes the uninstall problem I don't know if this is the right fix but kpackage succesfully does uninstalls after this. Please, check and apply if everything is OK.
(In reply to comment #1) > Created an attachment (id=253811) [edit] > Fixes the uninstall problem > > I don't know if this is the right fix but kpackage succesfully does uninstalls > after this. Please, check and apply if everything is OK. I can confirm that this works for me too. It probably isn't the correct fix though, but I'm no programmer. What I suspect is the problem is that kpackage checks to see if you are root and if not, doesn't perform an uninstall. It uses consolehelper when run as a normal user but as kpackage uses getuid() it returns the non-priviledged users uid and not that of root - so it thinks it's not root. That patch simply bypasses that. Replacing getuid() with geteuid() might be a better fix but like I said I'm no programmer so I could be talking rubbish. I haven't tested that theory yet, but I'll give it a go.
Created attachment 255171 [details] Fix uninstallations of RPMs through consolehelper I've tested it an geteuid() seems to work! :-)
Just curious, what is the reason to check something and then do the same in any case?: - if (getuid() == 0) { + if (geteuid() == 0) { return doinstP(installFlags,files,test); } else { return doinstP(installFlags,files,test); } Strange, isn't it? Moreover, the patch you provide here has nothing to do with uninstallation because this part is related to installation. You missed that in the original version there was a doUninst instead of one of doUninstP and this was a cause of not uninstalling packages. If you try original version, then you start kdepackage as root, it does nnot work. If you start it from konsole as ordinary user, when you hit "Uninstall" it asks for root password and then uninstall works. So, please, respect my patch until someone from kpackage maintainers confirms the bug and provide correct fix. BTW, if you are not programmer, why don't wait and see what programmers say?
fwiw, if you want a real(upstream) kpackage developer to see/comment, reporting this to bugs.kde.org is the best way to help make that happen.
Two questions: 1. What the bugzilla.redhat.com is for? 2. What is current development version of KDE? Is it kdeadmin-3.5.7 which we are talking about? If not than why not to fix the bug here in the version which Fedora users currently running?
> 1. What the bugzilla.redhat.com is for? imo, generally, for fedora-specific issues (or where upstream *is* fedora/redhat). Otherwise, fedora tries to do as much with upstream (in this case, kde.org) as possible (that way, everybody wins/benefits). > 2. What is current development version of KDE? not sure exactly what you mean, but the latest in the kde-3.5.x series is kde-3.5.8. kde-4.0 is in the works, but most of that is strictly F9 territory.
>> 1. What the bugzilla.redhat.com is for? > imo, generally, for fedora-specific issues Then why not to remove all packages from bugzilla menu which are not fedora/ redhat upstream? > not sure exactly what you mean I mean that Fedora 7 users are running 3.5.7 and we are asking to fix kpackage here in Fedora. Moreover, the possible fix is already provided (the first one) and it only necessary to check this with Fedora package maintainer. If the Fedora package maintainer thinks that he has not enough knowledge and needs some assistance from KDE team, it is better if he contacts them himself. P.S. This bugzilla thread is an area for discussion about specific bug in the specific package. Why not limit the discussion only for this topic and start more general one in fedora-list?
> Then why not to remove all packages from bugzilla That suggestion misses "fedora-specific issues". upstream's generally get annoyed seeing disto-specific bugs in their bug-trackers. > the possible fix is already provided no argument there, I'll probably be applying/testing the provided patch soon.
wrt further discussion, would be great. see also: http://fedoraproject.org/wiki/Objectives http://fedoraproject.org/wiki/PackageMaintainers/WhyUpstream
(In reply to comment #4) > So, please, respect my patch until someone from kpackage maintainers confirms > the bug and provide correct fix. > > BTW, if you are not programmer, why don't wait and see what programmers say? Yes you're right, I went barking up the wrong tree and blundered in with my two left feet. Apologies.
the correct fix is that we shouldn't use console helper but just use the code in kpackage. It's safer. It's fixed in kdeadmin-3.5.8-2.f7 that will be pushed in F8/F7 update soon. Thanks for your report