Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Zypp -Wdeprecated-declarations warnings

Aperta
#839 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

The warnings point to backends/zypp/pk-backend-zypp.cpp at lines 364, 379, 776, 876, 1068, 1223, 2665 and 2691, which use the deprecated RepoReport, db_const_iterator, Solvable::provides() and Solvable::obsoletes(). Read the ZYPP_DEPRECATED notes in the libzypp headers to find each replacement, then rebuild the zypp backend. Done means that file compiles with no -Wdeprecated-declarations warnings and behaviour is unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Backend: zypp (SUSE Linux)

From: https://github.com/PackageKit/PackageKit/actions/runs/14432889256/job/40469819487?pr=787

[231/232] Compiling C++ object backends/zypp/libpk_backend_zypp.so.p/pk-backend-zypp.cpp.o
../backends/zypp/pk-backend-zypp.cpp:364:78: warning: ‘RepoReport’ is deprecated [-Wdeprecated-declarations]
  364 | struct RepoReportReceiver : public zypp::callback::ReceiveReport<zypp::repo::RepoReport>, ZyppBackendReceiver
      |                                                                              ^~~~~~~~~~
In file included from ../backends/zypp/pk-backend-zypp.cpp:72:
/usr/include/x86_64-linux-gnu/zypp/ZYppCallbacks.h:262:37: note: declared here
  262 |     struct ZYPP_API ZYPP_DEPRECATED RepoReport : public callback::ReportBase
      |                                     ^~~~~~~~~~
../backends/zypp/pk-backend-zypp.cpp:379:142: warning: ‘RepoReport’ is deprecated [-Wdeprecated-declarations]
  379 |         virtual void finish (zypp::Repository source, const std::string &task, zypp::repo::RepoReport::Error error, const std::string &reason)
      |                                                                                                                                              ^
/usr/include/x86_64-linux-gnu/zypp/ZYppCallbacks.h:262:37: note: declared here
  262 |     struct ZYPP_API ZYPP_DEPRECATED RepoReport : public callback::ReportBase
      |                                     ^~~~~~~~~~
../backends/zypp/pk-backend-zypp.cpp:379:142: warning: ‘RepoReport’ is deprecated [-Wdeprecated-declarations]
  379 |         virtual void finish (zypp::Repository source, const std::string &task, zypp::repo::RepoReport::Error error, const std::string &reason)
      |                                                                                                                                              ^
/usr/include/x86_64-linux-gnu/zypp/ZYppCallbacks.h:262:37: note: declared here
  262 |     struct ZYPP_API ZYPP_DEPRECATED RepoReport : public callback::ReportBase
      |                                     ^~~~~~~~~~
../backends/zypp/pk-backend-zypp.cpp: In function ‘zypp::target::rpm::RpmHeader::constPtr zypp_get_rpmHeader(const std::string&, zypp::Edition)’:
../backends/zypp/pk-backend-zypp.cpp:776:50: warning: ‘zypp::target::rpm::librpmDb::db_const_iterator::db_const_iterator()’ is deprecated [-Wdeprecated-declarations]
  776 |         target::rpm::librpmDb::db_const_iterator it;
      |                                                  ^~
In file included from /usr/include/x86_64-linux-gnu/zypp/target/rpm/RpmDb.h:33,
                 from ../backends/zypp/pk-backend-zypp.cpp:87:
/usr/include/x86_64-linux-gnu/zypp/target/rpm/librpmDb.h:229:3: note: declared here
  229 |   db_const_iterator() ZYPP_DEPRECATED;
      |   ^~~~~~~~~~~~~~~~~
../backends/zypp/pk-backend-zypp.cpp: In function ‘void zypp_get_packages_by_file(zypp::ZYpp::Ptr, const gchar*, std::vector<zypp::sat::Solvable>&)’:
../backends/zypp/pk-backend-zypp.cpp:876:50: warning: ‘zypp::target::rpm::librpmDb::db_const_iterator::db_const_iterator()’ is deprecated [-Wdeprecated-declarations]
  876 |         target::rpm::librpmDb::db_const_iterator it;
      |                                                  ^~
/usr/include/x86_64-linux-gnu/zypp/target/rpm/librpmDb.h:229:3: note: declared here
  229 |   db_const_iterator() ZYPP_DEPRECATED;
      |   ^~~~~~~~~~~~~~~~~
../backends/zypp/pk-backend-zypp.cpp: In function ‘gboolean zypp_package_provides_application(const zypp::sat::Solvable&)’:
../backends/zypp/pk-backend-zypp.cpp:1068:46: warning: ‘zypp::Capabilities zypp::sat::Solvable::provides() const’ is deprecated [-Wdeprecated-declarations]
 1068 |         Capabilities provides = item.provides();
      |                                 ~~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/zypp/sat/SolvableType.h:16,
                 from /usr/include/x86_64-linux-gnu/zypp/Resolvable.h:24,
                 from /usr/include/x86_64-linux-gnu/zypp/ResObject.h:17,
                 from /usr/include/x86_64-linux-gnu/zypp/Package.h:16,
                 from ../backends/zypp/pk-backend-zypp.cpp:52:
/usr/include/x86_64-linux-gnu/zypp/sat/Solvable.h:235:20: note: declared here
  235 |       Capabilities provides()    const ZYPP_DEPRECATED; // use dep_ prefixed version instead
      |                    ^~~~~~~~
../backends/zypp/pk-backend-zypp.cpp: In function ‘gboolean is_tumbleweed()’:
../backends/zypp/pk-backend-zypp.cpp:1223:65: warning: ‘zypp::Capabilities zypp::sat::Solvable::provides() const’ is deprecated [-Wdeprecated-declarations]
 1223 |                                 if (it->satSolvable ().provides ().matches (cap)) {
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/x86_64-linux-gnu/zypp/sat/Solvable.h:235:20: note: declared here
  235 |       Capabilities provides()    const ZYPP_DEPRECATED; // use dep_ prefixed version instead
      |                    ^~~~~~~~
../backends/zypp/pk-backend-zypp.cpp: In function ‘void backend_get_update_detail_thread(PkBackendJob*, GVariant*, gpointer)’:
../backends/zypp/pk-backend-zypp.cpp:2665:55: warning: ‘zypp::Capabilities zypp::sat::Solvable::obsoletes() const’ is deprecated [-Wdeprecated-declarations]
 2665 |                 Capabilities obs = solvable.obsoletes ();
      |                                    ~~~~~~~~~~~~~~~~~~~^~
/usr/include/x86_64-linux-gnu/zypp/sat/Solvable.h:238:20: note: declared here
  238 |       Capabilities obsoletes()   const ZYPP_DEPRECATED; // use dep_ prefixed version instead
      |                    ^~~~~~~~~
../backends/zypp/pk-backend-zypp.cpp:2691:101: warning: ‘zypp::Capabilities zypp::sat::Solvable::obsoletes() const’ is deprecated [-Wdeprecated-declarations]
 2691 |                                 GPtrArray *nobs = zypp_build_package_id_capabilities (it->obsoletes ());
      |                                                                                       ~~~~~~~~~~~~~~^~
/usr/include/x86_64-linux-gnu/zypp/sat/Solvable.h:238:20: note: declared here
  238 |       Capabilities obsoletes()   const ZYPP_DEPRECATED; // use dep_ prefixed version instead
      |                    ^~~~~~~~~
[232/232] Linking target backends/zypp/libpk_backend_zypp.so
Lingua principale
C
Stelle
360
Fork
196
Merge medio
1g 12h
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PackageKit/PackageKit

Tutte le issue di PackageKit/PackageKit

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.