add correct self-provides to debuginfo subpackages

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=334
This commit is contained in:
Michael Schröder 2014-08-18 13:03:18 +00:00 committed by Git OBS Bridge
parent 9122fac510
commit 4e676e104c
5 changed files with 49 additions and 18 deletions

View File

@ -1,9 +1,7 @@
Create a debuginfo package for each subpackage. Create a debuginfo package for each subpackage.
Index: build/files.c --- ./build/files.c.orig 2014-08-18 12:59:00.491259331 +0000
=================================================================== +++ ./build/files.c 2014-08-18 13:02:12.918275693 +0000
--- build/files.c.orig
+++ build/files.c
@@ -21,6 +21,10 @@ @@ -21,6 +21,10 @@
#include <rpm/rpmlog.h> #include <rpm/rpmlog.h>
#include <rpm/rpmbase64.h> #include <rpm/rpmbase64.h>
@ -15,7 +13,7 @@ Index: build/files.c
#include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */
#include "misc/fts.h" #include "misc/fts.h"
#include "lib/cpio.h" #include "lib/cpio.h"
@@ -2097,13 +2101,237 @@ exit: @@ -2084,13 +2088,241 @@ exit:
return rc; return rc;
} }
@ -234,6 +232,10 @@ Index: build/files.c
+ /* Inherit other tags from parent. */ + /* Inherit other tags from parent. */
+ headerCopyTags (pkg->header, dbg->header, copyTagsForDebug); + headerCopyTags (pkg->header, dbg->header, copyTagsForDebug);
+ +
+ /* Add self-provides */
+ dbg->ds = rpmdsThis(dbg->header, RPMTAG_REQUIRENAME, RPMSENSE_EQUAL);
+ addPackageProvides(dbg);
+
+ /* Build up the files list. */ + /* Build up the files list. */
+ dbg->fileList = files; + dbg->fileList = files;
+ } + }
@ -253,7 +255,7 @@ Index: build/files.c
genSourceRpmName(spec); genSourceRpmName(spec);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
@@ -2119,8 +2347,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r @@ -2108,8 +2340,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r
rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr); rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr);
free(nvr); free(nvr);
@ -268,11 +270,36 @@ Index: build/files.c
goto exit; goto exit;
a = headerGetString(pkg->header, RPMTAG_ARCH); a = headerGetString(pkg->header, RPMTAG_ARCH);
Index: macros.in --- ./build/parseSpec.c.orig 2014-08-18 13:00:49.767700174 +0000
=================================================================== +++ ./build/parseSpec.c 2014-08-18 13:00:59.917648619 +0000
--- macros.in.orig @@ -503,7 +503,7 @@ static void initSourceHeader(rpmSpec spe
+++ macros.in }
@@ -182,24 +182,10 @@
/* Add extra provides to package. */
-static void addPackageProvides(Package pkg)
+void addPackageProvides(Package pkg)
{
const char *arch, *name;
char *evr, *isaprov;
--- ./build/rpmbuild_internal.h.orig 2014-08-18 13:00:42.455737908 +0000
+++ ./build/rpmbuild_internal.h 2014-08-18 13:01:40.838439511 +0000
@@ -425,6 +425,13 @@ int addReqProv(Package pkg, rpmTagVal ta
uint32_t index);
/** \ingroup rpmbuild
+ * Add self-provides to package.
+ * @param pkg package
+ */
+RPM_GNUC_INTERNAL
+void addPackageProvides(Package pkg);
+
+/** \ingroup rpmbuild
* Add rpmlib feature dependency.
* @param pkg package
* @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo)
--- ./macros.in.orig 2014-08-18 12:59:00.558258988 +0000
+++ ./macros.in 2014-08-18 12:59:21.194153431 +0000
@@ -186,24 +186,10 @@
# Template for debug information sub-package. # Template for debug information sub-package.
%debug_package \ %debug_package \
%global __debug_package 1\ %global __debug_package 1\
@ -297,10 +324,8 @@ Index: macros.in
%description debugsource\ %description debugsource\
This package provides debug sources for package %{name}.\ This package provides debug sources for package %{name}.\
Debug sources are useful when developing applications that use this\ Debug sources are useful when developing applications that use this\
Index: scripts/find-debuginfo.sh --- ./scripts/find-debuginfo.sh.orig 2014-08-18 12:59:00.552259019 +0000
=================================================================== +++ ./scripts/find-debuginfo.sh 2014-08-18 12:59:21.195153440 +0000
--- scripts/find-debuginfo.sh.orig
+++ scripts/find-debuginfo.sh
@@ -149,6 +149,11 @@ debug_link() @@ -149,6 +149,11 @@ debug_link()
# Provide .2, .3, ... symlinks to all filename instances of this build-id. # Provide .2, .3, ... symlinks to all filename instances of this build-id.
make_id_dup_link() make_id_dup_link()

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Aug 18 14:50:33 CEST 2014 - mls@suse.de
- rename SuSE to SUSE [bnc#888990]
- add correct self-provides to debuginfo subpackages
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 22 16:40:35 CEST 2014 - mls@suse.de Thu May 22 16:40:35 CEST 2014 - mls@suse.de

View File

@ -149,7 +149,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
RPM Package Manager is the main tool for managing the software packages RPM Package Manager is the main tool for managing the software packages
of the SuSE Linux distribution. of the SUSE Linux distribution.
RPM can be used to install and remove software packages. With rpm, it RPM can be used to install and remove software packages. With rpm, it
is easy to update packages. RPM keeps track of all these manipulations is easy to update packages. RPM keeps track of all these manipulations

View File

@ -1,5 +1,5 @@
#! /bin/bash #! /bin/bash
# Copyright (c) 2002 SuSE GmbH Nuernberg, Germany. # Copyright (c) 2002 SUSE GmbH Nuernberg, Germany.
# #
# Author: Michael Schroeder <feedback@suse.de> # Author: Michael Schroeder <feedback@suse.de>
# #

View File

@ -49,7 +49,7 @@ check if some package is installed. This is a hack.
+.BR rpm (1) +.BR rpm (1)
+ +
+.SH COPYRIGHT +.SH COPYRIGHT
+2002 SuSE Linux AG Nuernberg, Germany. +2002 SUSE Linux AG Nuernberg, Germany.
+ +
+.SH AUTHOR +.SH AUTHOR
+Michael Schroeder <mls@suse.de> +Michael Schroeder <mls@suse.de>