Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement reposync plugin #1903

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dnf5-plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ add_subdirectory("config-manager_plugin")
add_subdirectory("copr_plugin")
add_subdirectory("needs_restarting_plugin")
add_subdirectory("repoclosure_plugin")
add_subdirectory("reposync_plugin")
16 changes: 16 additions & 0 deletions dnf5-plugins/reposync_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# set gettext domain for translations
set(GETTEXT_DOMAIN dnf5-plugin-reposync)
add_definitions(-DGETTEXT_DOMAIN=\"${GETTEXT_DOMAIN}\")

add_library(reposync_cmd_plugin MODULE reposync.cpp reposync_cmd_plugin.cpp)

# disable the 'lib' prefix in order to create reposync_cmd_plugin.so
set_target_properties(reposync_cmd_plugin PROPERTIES PREFIX "")

target_link_libraries(reposync_cmd_plugin PRIVATE libdnf5 libdnf5-cli)
target_link_libraries(reposync_cmd_plugin PRIVATE dnf5)

install(TARGETS reposync_cmd_plugin LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/dnf5/plugins/)
install(DIRECTORY "config/usr/" DESTINATION "${CMAKE_INSTALL_PREFIX}")

add_subdirectory(po)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version = '1.0'

['reposync.downloadpath']
type = 'cloned_named_arg'
long_name = 'download-path'
short_name = 'p'
source = 'reposync.destdir'

['reposync.source']
type = 'cloned_named_arg'
long_name = 'source'
source = 'reposync.srpm'
5 changes: 5 additions & 0 deletions dnf5-plugins/reposync_plugin/po/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if(NOT WITH_TRANSLATIONS)
return()
endif()

include(Translations)
17 changes: 17 additions & 0 deletions dnf5-plugins/reposync_plugin/po/cs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-06 03:02+0000\n"
"PO-Revision-Date: 2024-02-02 13:11+0000\n"
"Language-Team: Czech <https://translate.fedoraproject.org/projects/dnf5/dnf5-"
"plugin-reposync/cs/>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Generator: Weblate 5.3.1\n"
62 changes: 62 additions & 0 deletions dnf5-plugins/reposync_plugin/po/dnf5-plugin-reposync.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-21 10:44+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: reposync.cpp:64
msgid "Synchronize a remote DNF repository to a local directory."
msgstr ""

#: reposync.cpp:159
msgid "Can't use --norepopath with multiple repositories enabled"
msgstr ""

#: reposync.cpp:243
#, c++-format
msgid ""
"Download destination '{0}' for location '{1}' of '{2}' package from '{3}' "
"repo is outside of safe write path '{4}'."
msgstr ""

#: reposync.cpp:280
#, c++-format
msgid "Failed to create directory '{0}' iterator: {1}"
msgstr ""

#: reposync.cpp:298
#, c++-format
msgid "Failed to delete file {0}: {1}"
msgstr ""

#: reposync.cpp:301
#, c++-format
msgid "[DELETED] {}"
msgstr ""

#: reposync.cpp:317
#, c++-format
msgid "Removing '{}' with failing PGP check: {}"
msgstr ""

#: reposync.cpp:378
#, c++-format
msgid "Failed to get mirror for package: \"{}\""
msgstr ""

#: reposync.cpp:395
msgid "PGP signature check failed"
msgstr ""
Loading
Loading