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

Move repo refresh details into libzypp #334

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,23 @@ INSTALL(
DESTINATION ${SYSCONFDIR}/zypp/apt-packagemap.d
)


# installation_sources script (deprecated)
INSTALL(
PROGRAMS deprecated/installation_sources
DESTINATION ${INSTALL_PREFIX}/bin
)

# zypp-refresh script (deprecated)
INSTALL(
PROGRAMS deprecated/zypp-refresh
DESTINATION ${INSTALL_PREFIX}/sbin
)
INSTALL (
FILES deprecated/zypp-refresh.8
DESTINATION "${INSTALL_PREFIX}/share/man/man8"
)
INSTALL(
FILES deprecated/zypp-refresh.lr
DESTINATION ${SYSCONFDIR}/logrotate.d
)
6 changes: 6 additions & 0 deletions src/installation_sources → deprecated/installation_sources
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# this is a compatibility replacement for a C++ program
# that was in yast2-packagemanager.rpm

cat >&2 <<EOF
***
*** This script is deprecated and will be removed in future versions!
***
EOF

ZYPPER=zypper

# be even more compatible, #223795
Expand Down
9 changes: 9 additions & 0 deletions deprecated/zypp-refresh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
export ZYPP_LOGFILE=${ZYPP_LOGFILE:-/var/log/zypp-refresh.log}
/usr/bin/zypper --non-interactive refresh --force
cat >&2 <<EOF
***
*** This script is deprecated and will be removed in future versions!
***
EOF
exit 1
59 changes: 59 additions & 0 deletions deprecated/zypp-refresh.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
'\" t
.\" Title: zypp-refresh
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 03/18/2020
.\" Manual: ZYPPER
.\" Source: SUSE Linux
.\" Language: English
.\"
.TH "ZYPP\-REFRESH" "8" "03/18/2020" "SUSE Linux" "ZYPPER"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
zypp-refresh \- Autorefresh metadata of all enabled repositories
.SH "SYNOPSIS"
.sp
\fBzypp\-refresh\fR
.SH "DESCRIPTION"
.sp
\fBzypp\-refresh\fR refreshes metadata of all enabled repositories which have \fBautorefresh\fR turned on (see \fBzypper lr\fR)\&. For use e\&.g\&. in cron jobs or scripts\&.
.SH "FILES"
.PP
\fB/var/log/zypp\-refresh\&.log\fR
.RS 4
\fBzypp\-refresh\fR
logfile
.RE
.SH "AUTHORS"
.sp
.if n \{\
.RS 4
.\}
.nf
Jan Kupec <>
Michael Andres <ma@suse\&.de>
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.sp
zypper(8)
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SET (my_MAN1
needs-restarting.1)

SET (my_MAN8
zypper.8 zypper-log.8 zypp-refresh.8)
zypper.8 zypper-log.8)

ADD_A2X_MANPAGES(
MAN_INST_PATH ${MANDIR}
Expand Down
34 changes: 0 additions & 34 deletions doc/zypp-refresh.8.txt

This file was deleted.

19 changes: 1 addition & 18 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,33 +250,16 @@ INSTALL( FILES
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/zypper/xml
)

# zypp-refresh utility
ADD_EXECUTABLE( zypp-refresh zypp-refresh.cc )
TARGET_LINK_LIBRARIES( zypp-refresh ${ZYPP_LIBRARY} )
SET_TARGET_PROPERTIES( zypp-refresh PROPERTIES LINK_FLAGS "-pie -Wl,-z,relro,-z,now")
SET_TARGET_PROPERTIES( zypp-refresh PROPERTIES COMPILE_FLAGS "-fwhole-program -fpie -fPIE")
INSTALL(
TARGETS zypp-refresh
RUNTIME DESTINATION ${INSTALL_PREFIX}/sbin
)

# bash completion script
INSTALL(
FILES bash-completion.sh
DESTINATION ${SYSCONFDIR}/bash_completion.d
RENAME zypper.sh
)


# installation_sources script
INSTALL(
PROGRAMS installation_sources
DESTINATION ${INSTALL_PREFIX}/bin
)

# logrotate config file
INSTALL(
FILES zypper.lr zypp-refresh.lr
FILES zypper.lr
DESTINATION ${SYSCONFDIR}/logrotate.d
)

Expand Down
57 changes: 0 additions & 57 deletions src/ZCOMMAND.cc

This file was deleted.

33 changes: 0 additions & 33 deletions src/ZCOMMAND.h

This file was deleted.

Loading