
kpackage4
Source (link to git-repo or to original if based on someone elses unmodified work):
This GUI is a tool to manage packages of various types such as RPM, Debian, Slackware ...
It can be used to list the packages installed on a computer and, for a selected package, display detailed informations such as detailed properties, package content, changelog or scripts used during installation or removal.
It allows installation of a new or upgraded packaged hosted on a local (RPM) or a remote (Debian) repository.
In "Management" mode, it display the same informations on a given package file (source or binary).
A handbook is also created during build process.
Build requires CMake, KDE4 and Qt4. A source rpm file for Mandriva & Mageia is available.
A Git repository was created : git://git.code.sf.net/p/kpackage4/kpackage4-3.6.0
TODO: Kpackage4 was fully tested using RPM package handler. Anyone who can test others handler will be welcome.
2015/11/18
Bug fix: the display of files list is sometimes truncated if Rpm pkg contains a great number of files
2015/09/08
Fix processing of pkg files list when root is not the default (/)
Fix compilation error & warning
2014/04/16
Fix bugs when a script contains CSS special characters (< or > or comment lines
Fix compilation pbs. with very recent Gcc, Kde & Qt
Fix configure script with 64bits processors (x86_64)
Note: Feedback will be very appreciated.
2014/04/05
Clear history & stack prior to packages list reload to fix Kpackage crash
2014/03/16
In management mode default behaviour is to expand the tree view
Improve marked items processing
Upgrade some confusing button texts
Fix memory leak when reloading packages list.
Fix bugs.
Code cleanup and performance improvement.
Install & remove dialogs are created on demand.
Add an "Installation date filter" feature
Add an "History" sub-menu to tool bar to navigate directly in the pkgs. stack
Add a "Scripts" page to displayed informations.
Ratings & Comments
14 Comments
Will there be a port to KF5/Qt5?
Can you explain what KF5 is ? Is it the name of the next generation of KDE software ? Nevertheless nothing is currently planed to port Kpackage4 to KDE5(KF5 ?) / Qt5. But if there is any advantage (improved performance, new features ...) a port may be considered.
I would suggest the best way to improve development on this program is to add PackageKit support: http://www.freedesktop.org/software/PackageKit/pk-using.html That'll give you YUM (Fedora), Zypper (openSUSE), URPMI (Mageia), APT (Debian/Ubuntu) and likely others.
It would be nice if it had urpmi support, as i prefer the gui than the mageia's one. However, to be able to compile it in Mageia 5 64bit, i had to do some changes: --- kpackage4-3.6.0.orig/src/kpackage.cpp 2014-04-05 11:30:06.000000000 +0200 +++ kpackage4-3.6.0/src/kpackage.cpp 2014-04-06 11:46:25.000000000 +0200 @@ -241 +241 @@ - if (pAct->data().toUInt() == (uint)item) { + if (pAct->data().value<void*>() == (void*)item) { @@ -272 +272 @@ - pAct->setData(QVariant((uint)item)); + pAct->setData(qVariantFromValue<void*>(item)); @@ -306 +306 @@ - kpackage->openFilesByUrl(KUrl::List::List(url)); + kpackage->openFilesByUrl(KUrl::List(url)); @@ -376 +376 @@ - kpackage->openFilesByUrl(KUrl::List::List(QStringList(entry))); + kpackage->openFilesByUrl(KUrl::List(QStringList(entry))); @@ -494 +494 @@ - openFilesByUrl(KUrl::List::List(dlg.selectedUrl())); + openFilesByUrl(KUrl::List(dlg.selectedUrl())); diff -U 0 -r kpackage4-3.6.0.orig/src/main.cpp kpackage4-3.6.0/src/main.cpp --- kpackage4-3.6.0.orig/src/main.cpp 2014-02-27 12:36:02.000000000 +0100 +++ kpackage4-3.6.0/src/main.cpp 2014-04-06 11:47:16.000000000 +0200 @@ -140 +140 @@ - kpackage->openFilesByUrl(KUrl::List::List(files), false); + kpackage->openFilesByUrl(KUrl::List(files), false); diff -U 0 -r kpackage4-3.6.0.orig/src/packageDisplay.cpp kpackage4-3.6.0/src/packageDisplay.cpp --- kpackage4-3.6.0.orig/src/packageDisplay.cpp 2014-03-03 16:34:50.000000000 +0100 +++ kpackage4-3.6.0/src/packageDisplay.cpp 2014-04-06 11:48:07.000000000 +0200 @@ -443 +443 @@ - KRun::displayOpenWithDialog(KUrl::List::List(url), this); + KRun::displayOpenWithDialog(KUrl::List(url), this); also, i have Greek localisation in my system, and i have some text without encoding: "install time ÎÏ Ï 09 Φεβ 2014 11:09:02 Ïμ CET distribution Mageia vendor Mageia.Org packager build-time ÎÏ Ï 19 Îαν 2014 07:37:31 μμ CET" in "Properties" and "Changelog" tabs. In some python programs, to display the text in Greek correctly in qt, i use the self.trUtf8(), if not, i have exactly the above output with symbols.
Thanks for your contrubution. Can you tell the Kde4 & Qt4 releases you are currently using with Mageia5 ? Did the Kpackage4 build fail due to a compilation error ? If yes can you give detailed informations about such errors ? Here (using Kde4-4.9.2 & Qt4-4.8.2) expressions such as "KUrl::List::List(...)" or "KUrl::List(...)" are accepted without any error (or warning) The development of an "Urpmi" package handler can be planned if other users ask for it; I take your wish into account.
Hi, i have kde 4.12.97 and qt 4.8.5 The errors in compiling are: /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp: In member function ‘void KPKG::slotUpdateHistory(bool, QTreeWidgetItem*)’: /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:272:31: σφάλμα: cast from ‘QTreeWidgetItem*’ to ‘uint {aka unsigned int}’ loses precision [-fpermissive] pAct->setData(QVariant((uint)item)); ^ /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp: In member function ‘void KPKG::slotOpenRecent(const KUrl&)’: /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:306:50: σφάλμα: cannot call constructor ‘KUrl::List::List’ directly [-fpermissive] kpackage->openFilesByUrl(KUrl::List::List(url)); ^ /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:306:50: error: for a function-style cast, remove the redundant ‘::List’ [-fpermissive] /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp: In member function ‘virtual void KPKG::readProperties(const KConfigGroup&)’: /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:376:65: error: cannot call constructor ‘KUrl::List::List’ directly [-fpermissive] kpackage->openFilesByUrl(KUrl::List::List(QStringList(entry))); ^ /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:376:65: error: for a function-style cast, remove the redundant ‘::List’ [-fpermissive] /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp: In member function ‘void KPACKAGE::slotOpenFile()’: /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:494:55: error: cannot call constructor ‘KUrl::List::List’ directly [-fpermissive] openFilesByUrl(KUrl::List::List(dlg.selectedUrl())); ^ /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:494:55: error: for a function-style cast, remove the redundant ‘::List’ [-fpermissive] /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp: In member function ‘pkgInterface* KPACKAGE::getPackageHandler(const QString&)’: /home/dglent/rpm/BUILD/kpackage4-3.6.0/src/kpackage.cpp:505:35: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fgets(buf, sizeof(buf) - 1, file); ^ src/CMakeFiles/kpackage.dir/build.make:264: recipe for target 'src/CMakeFiles/kpackage.dir/kpackage.o' failed make[2]: *** [src/CMakeFiles/kpackage.dir/kpackage.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 35%] Building CXX object src/CMakeFiles/kpackage.dir/kissInterface.o CMakeFiles/Makefile2:110: recipe for target 'src/CMakeFiles/kpackage.dir/all' failed make[1]: *** [src/CMakeFiles/kpackage.dir/all] Error 2 Makefile:126: recipe for target 'all' failed make: *** [all] Error 2 error: Bad exit status from /home/dglent/rpm/BUILDROOT/rpm-tmp.Slm3bb (%build) but i used cmake to compile. If i use configure i take this error: CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. and if i add the above line i take this error: /home/dglent/rpm/SOURCES/kpackage4-3.6.0/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx:1:0: error: bad value (x86_64) for -march= switch #ifndef __cplusplus ^ CMakeFiles/cmTryCompileExec1622618844.dir/build.make:60: recipe for target 'CMakeFiles/cmTryCompileExec1622618844.dir/testCXXCompiler.cxx.o' failed gmake[1]: *** [CMakeFiles/cmTryCompileExec1622618844.dir/testCXXCompiler.cxx.o] Error 1
Hi ! The errors you got (and that I cannot reproduce here even after adding '-fpermissive' to the Gcc flags) seem to be the consequence of the evolution of (mainly) Kde (from 4.9.2 to 4.12.97), Cmake and/or a different release of Gcc (here Gcc-4.4.1). The Cmake files generated using the configure script seem to be different too (here cmake-2.8.1). Can you tell what is the result of 'uname -m' you got; there may be a mismatch between this result (it seems to be 'x86_64') and what Gcc expects as an argument to '-march' switch in your case (a 64bits processor)
The output of uname -m is: "x86_64" and i have: gcc-4.8.2
I installed on a slack64-current with CFLAGS="-fpermissive" (error during compile), but when i start it, crashes: Application: KPackage (kpackage), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [KCrash Handler] #5 0x0000000000460a6b in begin (this=<optimized out>) at /usr/lib64/qt/include/QtCore/qlist.h:101 #6 constBegin (this=<optimized out>) at /usr/lib64/qt/include/QtCore/qlist.h:269 #7 SLACK::listPackages (this=0x185e270, pki=0x17bb140) at /home/davide/work/kpackage4-3.6.0/src/slackInterface.cpp:123 #8 0x000000000043e3a2 in managementWidget::collectData (this=0x17d8e10, refresh=true) at /home/davide/work/kpackage4-3.6.0/src/managementWidget.cpp:331 #9 0x000000000043e445 in managementWidget::collectData (this=<optimized out>, refresh=refresh@entry=true) at /home/davide/work/kpackage4-3.6.0/src/managementWidget.cpp:294 #10 0x0000000000433a8e in KPACKAGE::setup (this=<optimized out>) at /home/davide/work/kpackage4-3.6.0/src/kpackage.cpp:449 #11 0x000000000041b49a in main (argc=1, argv=0x7fffba1152d8) at /home/davide/work/kpackage4-3.6.0/src/main.cpp:143 my desktop is busy, as soon as i can i'll take a look at sources
QList<cacheObj*>::const_iterator it = packageLoc->constBegin(); packageLoc doesn't exists; if i declare it inside the 'for' cicle, program starts (or comment out two if(packageLoc){ ) plus, from user i don't have removepkg permission, but the windows close and the package disappear from the list
Hello "packageLoc" is a public member of "pkgInterface" base class defined in pkgInterface.h and "SLACK" class is derived from this "pkgInterface". Did you get a compilation error message for this (or for something connected to that point) ?
Hello gengisdave I wonder if this crash is a consequence of the problem you mentioned in your next comment. "packageLoc" is a pointer set to NULL in base class constructor and setup as the result of the path settings dialog. Can you rebuild kpackage4 with the debug option and send the log ?
I looked at source compiled with debug options, packageLoc is null at first start because kpackage has no configuration for slackware, once set the remote path for PACKAGES.TXT,it runs perfectly. My machine is 64bit, i had to change the configure, because it sets -march from 'uname -m', which returns x86_64, but the correct flag is x86-64, changed to uname -m | tr '_' '-', but i'm not sure if it breaks other arch
Hello Thanks for your help to test Slackware handler To solve this '-march' problem I'll try to find something more general.