dpkg/update-alternatives-suse.patch

105 lines
3.7 KiB
Diff

From 8cad1e2d4d20f76383a424aa85ebd3bc3a51487a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
Date: Mon, 3 Jan 2022 13:19:00 +0100
Subject: [PATCH 3/4] update-alternatives-suse
---
man/update-alternatives.pod | 8 ++++----
utils/Makefile.am | 10 +++++-----
utils/t/update_alternatives.t | 4 ++--
utils/update-alternatives.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/man/update-alternatives.pod b/man/update-alternatives.pod
index 7f3e0e66f..54e91f26b 100644
--- a/man/update-alternatives.pod
+++ b/man/update-alternatives.pod
@@ -37,7 +37,7 @@ B<update-alternatives>
B<update-alternatives>
creates, removes, maintains and displays information about the symbolic
-links comprising the Debian alternatives system.
+links comprising the SUSE alternatives system.
It is possible for several programs fulfilling the same or similar
functions to be installed on a single system at the same time.
@@ -47,7 +47,7 @@ different editor, if desired, but makes it difficult for a program
to make a good choice for an editor to invoke if the
user has not specified a particular preference.
-Debian's alternatives system aims to solve this problem.
+SUSE's alternatives system aims to solve this problem.
A generic name in the filesystem is
shared by all files providing interchangeable functionality.
The alternatives system and the system administrator
@@ -85,8 +85,8 @@ installed, changed or removed,
B<update-alternatives>
is called to update information about that file in the alternatives system.
B<update-alternatives>
-is usually called from the following Debian package maintainer scripts,
-B<postinst>
+is usually called from the following SUSE package maintainer scripts,
+B<post>
(configure) to install the alternative and from
B<prerm> and B<postrm>
(remove) to remove the alternative.
diff --git a/utils/Makefile.am b/utils/Makefile.am
index a86cba32b..d19007073 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -45,8 +45,8 @@ update_alternatives_SOURCES = \
update_alternatives_CPPFLAGS = \
-DALT_TMP_EXT=\".dpkg-tmp\" \
- -DADMINDIR_ENVVAR=\"DPKG_ADMINDIR\" \
- -DINSTDIR_ENVVAR=\"DPKG_ROOT\" \
+ -DADMINDIR_ENVVAR=\"RPM_ADMINDIR\" \
+ -DINSTDIR_ENVVAR=\"RPM_ROOT\" \
$(AM_CPPFLAGS)
update_alternatives_LDADD = \
@@ -81,9 +81,9 @@ uninstall-local:
rm -f $(DESTDIR)$(sysconfdir)/alternatives/README
TEST_ENV_VARS = \
- DPKG_DATADIR=$(top_srcdir)/data \
- UA_ROOTDIR_ENVVAR=DPKG_ROOT \
- UA_ADMINDIR_ENVVAR=DPKG_ADMINDIR \
+ RPM_DATADIR=$(top_srcdir)/data \
+ UA_ROOTDIR_ENVVAR=RPM_ROOT \
+ UA_ADMINDIR_ENVVAR=RPM_ADMINDIR \
UA_ADMINDIR_DEFAULT=$(admindir) \
# EOL
diff --git a/utils/t/update_alternatives.t b/utils/t/update_alternatives.t
index a4885dda9..a0959e5d9 100644
--- a/utils/t/update_alternatives.t
+++ b/utils/t/update_alternatives.t
@@ -32,8 +32,8 @@ my $bindir = File::Spec->rel2abs("$tmpdir/bin");
my @ua = ("$ENV{builddir}/update-alternatives", '--log', '/dev/null',
'--quiet', '--admindir', "$admindir", '--altdir', "$altdir");
-my $rootdir_envvar = $ENV{UA_ROOTDIR_ENVVAR} // 'DPKG_ROOT';
-my $admindir_envvar = $ENV{UA_ADMINDIR_ENVVAR} // 'DPKG_ADMINDIR';
+my $rootdir_envvar = $ENV{UA_ROOTDIR_ENVVAR} // 'RPM_ROOT';
+my $admindir_envvar = $ENV{UA_ADMINDIR_ENVVAR} // 'RPM_ADMINDIR';
delete $ENV{$rootdir_envvar};
delete $ENV{$admindir_envvar};
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 716035876..eee59d590 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -115,7 +115,7 @@ static int opt_force = 0;
static void
version(void)
{
- printf(_("Debian %s version %s.\n"), PROGNAME, VERSION);
+ printf(_("SUSE %s version %s.\n"), PROGNAME, VERSION);
printf("\n");
printf(_(
--
2.33.1