[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: playground/sysadmin/shaman
From:       Lukas Appelhans <l.appelhans () gmx ! de>
Date:       2010-04-06 1:15:15
Message-ID: 201004060315.15358.l.appelhans () gmx ! de
[Download RAW message or body]

Ha, go the good ol' wrapper way... great work guys! I'll be back coding on 
shaman soon I hopeā„¢

Lukas

Am Dienstag 06 April 2010 02:45:20 schrieb Jonathan Michael Thomas:
> SVN commit 1111548 by jmthomas:
> 
> Add new Shaman backend based on the QApt library, a Qt wrapper/Apt
> implementation around the libapt-pkg library. (Available from
> trunk/playground/libs/) As discussed with David on IRC, this is most
> probably the future of an Apt-based Shaman backend, since libqapt does all
> of the interaction with the ugly libapt-pkg API, meaning the shaman
> backend will have a much cleaner codebase. The backend can already grab a
> lot of information about packages, as well as do database updates. It
> still cannot install/remove packages, however, so it is not yet a suitable
> replacement for the existing apt backend.
> 
> Once QApt/this Shaman backend can appropriately replace the current Apt
> backend, I will discuss what to do with the old Apt backend further with
> David. (But I'd never overwrite it without his say-so) :)
> 
> CCMAIL:drf@kde.org
> CCMAIL:dpalacio@uninorte.edu.co
> 
> 
>  A             cmake/modules/FindQApt.cmake
>  M  +36 -5     libshaman/BackendSelector.cmake
>  A             libshaman/backends/qapt (directory)
>  A             libshaman/backends/qapt/AptBackend.cpp   [License: GPL
> (v2+)] A             libshaman/backends/qapt/AptBackend.h   [License: GPL
> (v2+)] A             libshaman/backends/qapt/DebPackage.cpp   [License:
> GPL (v2+)] A             libshaman/backends/qapt/DebPackage.h   [License:
> GPL (v2+)]
> 
> 
> --- trunk/playground/sysadmin/shaman/libshaman/BackendSelector.cmake
> #1111547:1111548 @@ -6,11 +6,14 @@
>  ## 4.4: We leave polkit-0.9 having more priority over polkit-1. This will
> change from 4.5 on if(NOT SHAMAN_BACKEND)
>      macro_optional_find_package(Aqpm)
> +    macro_optional_find_package(QApt)
>      macro_optional_find_package(AptPkg)
>      macro_optional_find_package(QPackageKit)
> 
>      if (AQPM_FOUND)
>          set (SHAMAN_BACKEND "Aqpm")
> +    elseif (QAPT_FOUND)
> +        set (SHAMAN_BACKEND "QApt")
>      elseif (APTPKG_FOUND)
>          set (SHAMAN_BACKEND "Apt")
>      elseif (QPACKAGEKIT_FOUND)
> @@ -18,6 +21,8 @@
>      else ()
>          macro_log_feature(AQPM_FOUND "Aqpm" "QT wrapper library around
> alpm, Arch Linux Package Management Library." "http://chakra-project.org"
> FALSE "" "Provides a backend for Shaman.") +       
> macro_log_feature(QAPT_FOUND "QApt" "High-level Qt wrapper/Apt
> implementation around the Apt-pkg library" +                         
> "http://kubuntu.org" FALSE "" "Provides a backend for Shaman.")
> macro_log_feature(APTPKG_FOUND "Apt-pkg" "Libraries for developing with
> APT's libapt-pkg Debian package manipulation library"
> "http://wiki.debian.org/Apt" FALSE "" "Provides a backend for Shaman.")
> macro_log_feature(QPACKAGEKIT_FOUND "PackageKit" "An universal package
> management system." "http://www.packagekit.org" @@ -33,10 +38,10 @@
>      string(TOUPPER ${SHAMAN_BACKEND} SHAMAN_BACKEND)
> 
>      # Check if the specified backend is valid. If it is not, we fall back
> to the Fake one -    if (NOT SHAMAN_BACKEND STREQUAL "AQPM" AND NOT
> SHAMAN_BACKEND STREQUAL "APT" AND NOT SHAMAN_BACKEND STREQUAL
> "QPACKAGEKIT" AND NOT SHAMAN_BACKEND STREQUAL "TESTSCRIPT" AND NOT
> SHAMAN_BACKEND STREQUAL "FAKE") +    if (NOT SHAMAN_BACKEND STREQUAL
> "AQPM" AND NOT SHAMAN_BACKEND STREQUAL "APT" AND NOT SHAMAN_BACKEND
> STREQUAL "QAPT" AND NOT SHAMAN_BACKEND STREQUAL "QPACKAGEKIT" AND NOT
> SHAMAN_BACKEND STREQUAL "TESTSCRIPT" AND NOT SHAMAN_BACKEND STREQUAL
> "FAKE") message ("WARNING: The Shaman Backend ${SHAMAN_BACKEND} you
> specified does not exist. Falling back to Fake backend") set
> (SHAMAN_BACKEND "Fake")
> -    endif (NOT SHAMAN_BACKEND STREQUAL "AQPM" AND NOT SHAMAN_BACKEND
> STREQUAL "APT" AND NOT SHAMAN_BACKEND STREQUAL "QPACKAGEKIT" AND NOT
> SHAMAN_BACKEND STREQUAL "TESTSCRIPT" AND NOT SHAMAN_BACKEND STREQUAL
> "FAKE") +    endif (NOT SHAMAN_BACKEND STREQUAL "AQPM" AND NOT
> SHAMAN_BACKEND STREQUAL "APT" AND NOT SHAMAN_BACKEND STREQUAL "QAPT" AND
> NOT SHAMAN_BACKEND STREQUAL "QPACKAGEKIT" AND NOT SHAMAN_BACKEND STREQUAL
> "TESTSCRIPT" AND NOT SHAMAN_BACKEND STREQUAL "FAKE")
> 
>      # Check requirements for each backend. If not, fall back to the fake
> one if (SHAMAN_BACKEND STREQUAL "AQPM")
> @@ -47,6 +52,20 @@
>                        Falling back to Fake backend")
>              set (SHAMAN_BACKEND "FAKE")
>          endif (NOT AQPM_FOUND)
> +    elseif (SHAMAN_BACKEND STREQUAL "QAPT")
> +        macro_optional_find_package(AptPkg)
> +        macro_optional_find_package(QApt)
> +
> +        if (NOT APTPKG_FOUND)
> +            message ("WARNING: You chose the QApt Shaman backend but you
> don't have Aptpkg installed. +                      Falling back to Fake
> backend")
> +                    set (SHAMAN_BACKEND "FAKE")
> +        endif (NOT APTPKG_FOUND)
> +        if (NOT QAPT_FOUND)
> +            message ("WARNING: You chose the QApt Shaman backend but you
> don't have QApt installed. +                      Falling back to Fake
> backend")
> +                    set (SHAMAN_BACKEND "FAKE")
> +        endif (NOT QAPT_FOUND)
>      elseif (SHAMAN_BACKEND STREQUAL "APT")
>          macro_optional_find_package(AptPkg)
> 
> @@ -96,22 +115,34 @@
>          include_directories(${POLKITQT_INCLUDE_DIR})
>          add_subdirectory(backends/aqpm)
>      endif (POLKITQT_FOUND)
> +elseif(SHAMAN_BACKEND STREQUAL "QAPT")
> +    message(STATUS "Building Shaman QApt Backend")
> +    macro_log_feature(APTPKG_FOUND "Apt-pkg" "Libraries for developing
> with APT's libapt-pkg Debian package manipulation library"
> "http://wiki.debian.org/Apt" FALSE "" "Provides a backend for Shaman.") + 
>   macro_log_feature(QAPT_FOUND "QApt" "High-level Qt wrapper/Apt
> implementation around the Apt-pkg library" "http://kubuntu.org" FALSE ""
> "Provides a backend for Shaman.") +    set_source_files_properties(
> backends/qapt/AptBackend.cpp
> +                             PROPERTIES COMPILE_FLAGS -DQT_STATICPLUGIN )
> +    include_directories(${APTPKG_INCLUDE_DIR})
> +    set(BACKEND_SRCS
> +        backends/qapt/AptBackend.cpp
> +        backends/qapt/DebPackage.cpp
> +    )
> +    set(BACKEND_LIBS
> +        ${APTPKG_LIBRARIES}
> +        libqapt
> +    )
>  elseif(SHAMAN_BACKEND STREQUAL "APT")
>      message(STATUS "Building Shaman Apt Backend")
>      macro_log_feature(APTPKG_FOUND "Apt-pkg" "Libraries for developing
> with APT's libapt-pkg Debian package manipulation library"
> "http://wiki.debian.org/Apt" FALSE "" "Provides a backend for Shaman.")
> set_source_files_properties( backends/apt/AptBackend.cpp
>                               PROPERTIES COMPILE_FLAGS -DQT_STATICPLUGIN )
> -    #find_package(KDE4Workspace REQUIRED)
>      include_directories(${APTPKG_INCLUDE_DIR})
>      set(BACKEND_SRCS
>          backends/apt/AptBackend.cpp
>          backends/apt/DebPackage.cpp
> -        backends/apt/OperationProgress.cpp
>      )
>      set(BACKEND_LIBS
>          ${APTPKG_LIBRARIES}
>      )
> -    add_subdirectory(backends/apt) #Helper
>  elseif(SHAMAN_BACKEND STREQUAL "QPACKAGEKIT")
>      message(STATUS "Building Shaman QPackageKit Backend")
>      macro_log_feature(QPACKAGEKIT_FOUND "PackageKit" "A common package
> management system." "http://www.packagekit.org" FALSE "" "Provides a
> backend for Shaman.")


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic