Browse Source

add RPM internal %{_force_oldpackage} option for enforcing --oldpackage on upgrades (this will help us in a few months to mass upgrade packages from OpenPKG-CURRENT to OpenPKG 2.0)

master
parent
commit
2e07a1445e
  1. 1
      openpkg/HISTORY
  2. 2
      openpkg/rpm.patch.bugfix
  3. 46
      openpkg/rpm.patch.feature
  4. 2
      openpkg/rpm.patch.porting
  5. 2
      openpkg/rpm.patch.regen

1
openpkg/HISTORY

@ -2,6 +2,7 @@
2003
====
20030918 add RPM internal %{_force_oldpackage} option for enforcing --oldpackage on upgrades
20030918 introduce new rpmdb utility for administrating the RPM database on the lower level
20030916 RPM database mutex workaround for Solaris plus the passing of option -b to patch(1)
20030915 remove the librpmmisc.a library because its contents RPM includes in librpmio.a

2
openpkg/rpm.patch.bugfix

@ -10,7 +10,7 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
## Created on: 17-Sep-2003
## Created on: 18-Sep-2003
##
## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.

46
openpkg/rpm.patch.feature

@ -10,7 +10,7 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
## Created on: 17-Sep-2003
## Created on: 18-Sep-2003
##
## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.
@ -876,10 +876,14 @@ Index: lib/rpmrc.c
| Additionally, do not override the "_host_xx" macros because their
| value (derived from <prefix>/etc/openpkg/platform) is already
| correctly set internally.
| Finally, provide default for introduced variable
| %{_force_oldpackage}, which, if non-zero, automatically enforces
| --oldpackage on all upgrade operations (this is useful on
| mass-upgrades from OpenPKG-CURRENT to OpenPKG-RELEASE).
+---------------------------------------------------------------------------
Index: macros.in
--- macros.in 2 Jul 2003 19:20:52 -0000 1.1.1.14
+++ macros.in 15 Sep 2003 19:08:46 -0000
+++ macros.in 18 Sep 2003 11:15:49 -0000
@@ -305,7 +305,7 @@
# Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.
#
@ -889,7 +893,18 @@ Index: macros.in
#
# Should unpackaged files in a build root terminate a build?
@@ -929,11 +929,11 @@
@@ -618,6 +618,10 @@
# If non-zero, all erasures will be automagically repackaged.
%_repackage_all_erasures 0
+# If non-zero, automatically enforce --oldpackage for all upgrade operations
+# (useful on mass-upgrades from OpenPKG-CURRENT to OpenPKG-RELEASE)
+%_force_oldpackage 0
+
# Verify digest/signature flags for various rpm modes:
# 1 --nohdrchk if set, don't check rpmdb headers
#
@@ -929,11 +933,11 @@
%_build_cpu %{_host_cpu}
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
@ -1235,7 +1250,7 @@ Index: rpmqv.c
+---------------------------------------------------------------------------
Index: db/env/env_region.c
--- db/env/env_region.c 18 Jan 2003 14:05:01 -0000 1.1.1.5
+++ db/env/env_region.c 17 Sep 2003 14:12:02 -0000
+++ db/env/env_region.c 17 Sep 2003 17:58:12 -0000
@@ -184,6 +184,24 @@
}
@ -1252,7 +1267,7 @@ Index: db/env/env_region.c
+ if (F_ISSET(dbenv, DB_ENV_CREATE))
+ goto creation;
+ else {
+ ret = ENOENT;
+ ret = ENOENT;
+ goto err;
+ }
+ }
@ -1284,3 +1299,24 @@ Index: rpmdb/db3.c
/* ... non-existent (or unwritable) DBENV, will create ... */
dbi->dbi_oeflags |= DB_CREATE;
dbi->dbi_eflags &= ~DB_JOINENV;
+---------------------------------------------------------------------------
| Add internal feature variable %{_force_oldpackage} which, if
| non-zero, automatically enforces --oldpackage on all upgrade
| operations (this is useful on mass-upgrades from OpenPKG-CURRENT to
| OpenPKG-RELEASE).
+---------------------------------------------------------------------------
Index: rpm.c
--- rpm.c 16 May 2002 16:55:25 -0000 1.1.1.23
+++ rpm.c 18 Sep 2003 11:15:08 -0000
@@ -1016,6 +1016,10 @@
if (oldPackage && !upgrade)
argerror(_("--oldpackage may only be used during upgrades"));
+#ifdef OPENPKG
+ if (upgrade && rpmExpandNumeric("%{?_force_oldpackage}"))
+ probFilter |= RPMPROB_FILTER_OLDPACKAGE;
+#endif
if (noPgp && bigMode != MODE_CHECKSIG)
argerror(_("--nopgp may only be used during signature checking"));

2
openpkg/rpm.patch.porting

@ -10,7 +10,7 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
## Created on: 17-Sep-2003
## Created on: 18-Sep-2003
##
## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.

2
openpkg/rpm.patch.regen

@ -10,7 +10,7 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
## Created on: 17-Sep-2003
## Created on: 18-Sep-2003
##
## ATTENTION: THIS PATCH FILE WAS AUTO-GENERATED FROM AN OPENPKG
## RPM CVS REPOSITORY, HENCE DO NOT EDIT THIS FILE.

Loading…
Cancel
Save