Fix QML Provides generation

Disable QML Requires generation (until we generate all Provides)
This commit is contained in:
Andrey Bondrov 2016-10-13 22:44:52 +10:00
parent ae9d33b5b9
commit 36393fe836
2 changed files with 39 additions and 37 deletions

View file

@ -1,6 +1,6 @@
diff -urN rpm-5.4.10/configure.ac rpm-5.4.10-patched/configure.ac diff -urN rpm-5.4.10-orig/configure.ac rpm-5.4.10-patched/configure.ac
--- rpm-5.4.10/configure.ac 2016-10-12 19:02:21.996240456 +1000 --- rpm-5.4.10-orig/configure.ac 2016-10-13 19:51:48.630996187 +1000
+++ rpm-5.4.10-patched/configure.ac 2016-10-12 19:24:51.993205021 +1000 +++ rpm-5.4.10-patched/configure.ac 2016-10-13 21:31:19.476242608 +1000
@@ -2572,7 +2572,7 @@ @@ -2572,7 +2572,7 @@
macros/macros macros/macros.rpmbuild macros/macros macros/macros.rpmbuild
macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool
@ -10,9 +10,9 @@ diff -urN rpm-5.4.10/configure.ac rpm-5.4.10-patched/configure.ac
doc/Makefile doc/Makefile
doc/manual/Makefile doc/fr/Makefile doc/ja/Makefile doc/ko/Makefile doc/manual/Makefile doc/fr/Makefile doc/ja/Makefile doc/ko/Makefile
doc/pl/Makefile doc/ru/Makefile doc/sk/Makefile doc/pl/Makefile doc/ru/Makefile doc/sk/Makefile
diff -urN rpm-5.4.10/lib/rpmfc.c rpm-5.4.10-patched/lib/rpmfc.c diff -urN rpm-5.4.10-orig/lib/rpmfc.c rpm-5.4.10-patched/lib/rpmfc.c
--- rpm-5.4.10/lib/rpmfc.c 2016-10-12 19:02:22.178240451 +1000 --- rpm-5.4.10-orig/lib/rpmfc.c 2016-10-13 19:51:48.806996194 +1000
+++ rpm-5.4.10-patched/lib/rpmfc.c 2016-10-12 19:30:22.128196356 +1000 +++ rpm-5.4.10-patched/lib/rpmfc.c 2016-10-13 22:14:04.696348477 +1000
@@ -647,6 +647,7 @@ @@ -647,6 +647,7 @@
{ "libtool library ", RPMFC_LIBTOOL|RPMFC_INCLUDE }, { "libtool library ", RPMFC_LIBTOOL|RPMFC_INCLUDE },
@ -27,7 +27,7 @@ diff -urN rpm-5.4.10/lib/rpmfc.c rpm-5.4.10-patched/lib/rpmfc.c
} else } else
+ if (fc->fcolor->vals[fc->ix] & RPMFC_QML) { + if (fc->fcolor->vals[fc->ix] & RPMFC_QML) {
+ xx = rpmfcHelper(fc, 'P', "qml"); + xx = rpmfcHelper(fc, 'P', "qml");
+ xx = rpmfcHelper(fc, 'R', "qml"); +// xx = rpmfcHelper(fc, 'R', "qml");
+ } else + } else
if (fc->fcolor->vals[fc->ix] & RPMFC_BOURNE) { if (fc->fcolor->vals[fc->ix] & RPMFC_BOURNE) {
#ifdef NOTYET #ifdef NOTYET
@ -41,20 +41,24 @@ diff -urN rpm-5.4.10/lib/rpmfc.c rpm-5.4.10-patched/lib/rpmfc.c
#if defined(RPM_VENDOR_MANDRIVA) #if defined(RPM_VENDOR_MANDRIVA)
{ rpmfcSYMLINK, RPMFC_SYMLINK }, { rpmfcSYMLINK, RPMFC_SYMLINK },
#endif #endif
@@ -1455,6 +1460,10 @@ @@ -1455,6 +1460,14 @@
else if (_suffix(s, ".pc")) else if (_suffix(s, ".pc"))
ftype = "pkgconfig file"; ftype = "pkgconfig file";
+ /* XXX all files with extension ".qml" are qml for now. */ + /* XXX all files with extension ".qml" are qml for now. */
+ else if (_suffix(s, ".qml")) + else if (_suffix(s, ".qml"))
+ ftype = "qml file"; + ftype = "qml file";
+
+ /* XXX all files named "qmldir" are qml for now. */
+ else if (_suffix(s, "qmldir"))
+ ftype = "qml file";
+ +
/* XXX all files with extension ".php" are PHP for now. */ /* XXX all files with extension ".php" are PHP for now. */
else if (_suffix(s, ".php")) else if (_suffix(s, ".php"))
ftype = "PHP script text"; ftype = "PHP script text";
diff -urN rpm-5.4.10/lib/rpmfc.h rpm-5.4.10-patched/lib/rpmfc.h diff -urN rpm-5.4.10-orig/lib/rpmfc.h rpm-5.4.10-patched/lib/rpmfc.h
--- rpm-5.4.10/lib/rpmfc.h 2016-10-12 19:02:22.177240451 +1000 --- rpm-5.4.10-orig/lib/rpmfc.h 2016-10-13 19:51:48.806996194 +1000
+++ rpm-5.4.10-patched/lib/rpmfc.h 2016-10-12 19:23:54.535206529 +1000 +++ rpm-5.4.10-patched/lib/rpmfc.h 2016-10-13 21:31:19.498242609 +1000
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
/* (1 << 3) leaks into package headers, reserved */ /* (1 << 3) leaks into package headers, reserved */
@ -64,9 +68,9 @@ diff -urN rpm-5.4.10/lib/rpmfc.h rpm-5.4.10-patched/lib/rpmfc.h
RPMFC_TYPELIB = (1 << 5), RPMFC_TYPELIB = (1 << 5),
RPMFC_HASKELL = (1 << 6), RPMFC_HASKELL = (1 << 6),
RPMFC_RUBY = (1 << 7), RPMFC_RUBY = (1 << 7),
diff -urN rpm-5.4.10/macros/macros rpm-5.4.10-patched/macros/macros diff -urN rpm-5.4.10-orig/macros/macros rpm-5.4.10-patched/macros/macros
--- rpm-5.4.10/macros/macros 2016-10-12 19:02:22.164240451 +1000 --- rpm-5.4.10-orig/macros/macros 2016-10-13 19:51:48.798996194 +1000
+++ rpm-5.4.10-patched/macros/macros 2016-10-12 19:31:19.166194859 +1000 +++ rpm-5.4.10-patched/macros/macros 2016-10-13 21:31:19.500242609 +1000
@@ -1061,6 +1061,10 @@ @@ -1061,6 +1061,10 @@
#%%{load:%{_usrlibrpm}/macros.d/pkgconfig} #%%{load:%{_usrlibrpm}/macros.d/pkgconfig}
@ -78,9 +82,9 @@ diff -urN rpm-5.4.10/macros/macros rpm-5.4.10-patched/macros/macros
# mono(...) configuration. # mono(...) configuration.
#%%{load:%{_usrlibrpm}/macros.d/mono} #%%{load:%{_usrlibrpm}/macros.d/mono}
diff -urN rpm-5.4.10/macros/macros.in rpm-5.4.10-patched/macros/macros.in diff -urN rpm-5.4.10-orig/macros/macros.in rpm-5.4.10-patched/macros/macros.in
--- rpm-5.4.10/macros/macros.in 2016-10-12 19:02:22.012240455 +1000 --- rpm-5.4.10-orig/macros/macros.in 2016-10-13 19:51:48.647996188 +1000
+++ rpm-5.4.10-patched/macros/macros.in 2016-10-12 19:31:02.004195309 +1000 +++ rpm-5.4.10-patched/macros/macros.in 2016-10-13 21:31:19.509242609 +1000
@@ -1065,6 +1065,10 @@ @@ -1065,6 +1065,10 @@
%{load:%{_usrlibrpm}/macros.d/pkgconfig} %{load:%{_usrlibrpm}/macros.d/pkgconfig}
@ -92,9 +96,9 @@ diff -urN rpm-5.4.10/macros/macros.in rpm-5.4.10-patched/macros/macros.in
# mono(...) configuration. # mono(...) configuration.
%{load:%{_usrlibrpm}/macros.d/mono} %{load:%{_usrlibrpm}/macros.d/mono}
diff -urN rpm-5.4.10/macros/qml rpm-5.4.10-patched/macros/qml diff -urN rpm-5.4.10-orig/macros/qml rpm-5.4.10-patched/macros/qml
--- rpm-5.4.10/macros/qml 1970-01-01 10:00:00.000000000 +1000 --- rpm-5.4.10-orig/macros/qml 1970-01-01 10:00:00.000000000 +1000
+++ rpm-5.4.10-patched/macros/qml 2016-10-12 19:22:37.988208539 +1000 +++ rpm-5.4.10-patched/macros/qml 2016-10-13 21:31:19.513242610 +1000
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+# QML specific macro definitions. +# QML specific macro definitions.
+# To make use of these macros insert the following line into your spec file: +# To make use of these macros insert the following line into your spec file:
@ -107,9 +111,9 @@ diff -urN rpm-5.4.10/macros/qml rpm-5.4.10-patched/macros/qml
+# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. +# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+%__qml_provides %{_rpmhome}/qmldeps.sh --provides +%__qml_provides %{_rpmhome}/qmldeps.sh --provides
+%__qml_requires %{_rpmhome}/qmldeps.sh --requires +%__qml_requires %{_rpmhome}/qmldeps.sh --requires
diff -urN rpm-5.4.10/macros/qml.in rpm-5.4.10-patched/macros/qml.in diff -urN rpm-5.4.10-orig/macros/qml.in rpm-5.4.10-patched/macros/qml.in
--- rpm-5.4.10/macros/qml.in 1970-01-01 10:00:00.000000000 +1000 --- rpm-5.4.10-orig/macros/qml.in 1970-01-01 10:00:00.000000000 +1000
+++ rpm-5.4.10-patched/macros/qml.in 2016-10-12 19:22:19.668209019 +1000 +++ rpm-5.4.10-patched/macros/qml.in 2016-10-13 21:31:19.515242610 +1000
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+# QML specific macro definitions. +# QML specific macro definitions.
+# To make use of these macros insert the following line into your spec file: +# To make use of these macros insert the following line into your spec file:
@ -122,9 +126,9 @@ diff -urN rpm-5.4.10/macros/qml.in rpm-5.4.10-patched/macros/qml.in
+# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. +# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
+%__qml_provides %{_rpmhome}/qmldeps.sh --provides +%__qml_provides %{_rpmhome}/qmldeps.sh --provides
+%__qml_requires %{_rpmhome}/qmldeps.sh --requires +%__qml_requires %{_rpmhome}/qmldeps.sh --requires
diff -urN rpm-5.4.10/Makefile.am rpm-5.4.10-patched/Makefile.am diff -urN rpm-5.4.10-orig/Makefile.am rpm-5.4.10-patched/Makefile.am
--- rpm-5.4.10/Makefile.am 2012-03-17 11:24:19.000000000 +1100 --- rpm-5.4.10-orig/Makefile.am 2012-03-17 11:24:19.000000000 +1100
+++ rpm-5.4.10-patched/Makefile.am 2016-10-12 19:32:29.862193003 +1000 +++ rpm-5.4.10-patched/Makefile.am 2016-10-13 21:31:19.515242610 +1000
@@ -118,7 +118,7 @@ @@ -118,7 +118,7 @@
pkgcfg_DATA = \ pkgcfg_DATA = \
macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \ macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \
@ -134,9 +138,9 @@ diff -urN rpm-5.4.10/Makefile.am rpm-5.4.10-patched/Makefile.am
noinst_HEADERS = build.h debug.h system.h noinst_HEADERS = build.h debug.h system.h
diff -urN rpm-5.4.10/scripts/Makefile.am rpm-5.4.10-patched/scripts/Makefile.am diff -urN rpm-5.4.10-orig/scripts/Makefile.am rpm-5.4.10-patched/scripts/Makefile.am
--- rpm-5.4.10/scripts/Makefile.am 2016-10-12 19:02:20.941240483 +1000 --- rpm-5.4.10-orig/scripts/Makefile.am 2016-10-13 19:51:47.745996150 +1000
+++ rpm-5.4.10-patched/scripts/Makefile.am 2016-10-12 19:35:18.934188565 +1000 +++ rpm-5.4.10-patched/scripts/Makefile.am 2016-10-13 21:31:19.519242610 +1000
@@ -67,7 +67,8 @@ @@ -67,7 +67,8 @@
rpm.daily rpm.log rpm.xinetd \ rpm.daily rpm.log rpm.xinetd \
rubygems.rb \ rubygems.rb \
@ -147,10 +151,10 @@ diff -urN rpm-5.4.10/scripts/Makefile.am rpm-5.4.10-patched/scripts/Makefile.am
pkglibbindir = @USRLIBRPM@/bin pkglibbindir = @USRLIBRPM@/bin
diff -urN rpm-5.4.10/scripts/qmldeps.sh rpm-5.4.10-patched/scripts/qmldeps.sh diff -urN rpm-5.4.10-orig/scripts/qmldeps.sh rpm-5.4.10-patched/scripts/qmldeps.sh
--- rpm-5.4.10/scripts/qmldeps.sh 1970-01-01 10:00:00.000000000 +1000 --- rpm-5.4.10-orig/scripts/qmldeps.sh 1970-01-01 10:00:00.000000000 +1000
+++ rpm-5.4.10-patched/scripts/qmldeps.sh 2016-10-12 19:33:57.000000000 +1000 +++ rpm-5.4.10-patched/scripts/qmldeps.sh 2016-10-13 22:13:24.485346817 +1000
@@ -0,0 +1,90 @@ @@ -0,0 +1,88 @@
+#!/bin/bash +#!/bin/bash
+# Copyright (C) 2012 Jolla Oy +# Copyright (C) 2012 Jolla Oy
+# Contact: Bernd Wachter <bernd.wachter@jollamobile.com> +# Contact: Bernd Wachter <bernd.wachter@jollamobile.com>
@ -184,8 +188,6 @@ diff -urN rpm-5.4.10/scripts/qmldeps.sh rpm-5.4.10-patched/scripts/qmldeps.sh
+ +
+case $1 in +case $1 in
+-P|--provides) +-P|--provides)
+ shift
+ RPM_BUILD_ROOT="$1"
+ while read file; do + while read file; do
+ case "$file" in + case "$file" in
+ */qmldir) + */qmldir)
@ -193,7 +195,7 @@ diff -urN rpm-5.4.10/scripts/qmldeps.sh rpm-5.4.10-patched/scripts/qmldeps.sh
+ provides="`head -1 ${file} | sed -r 's/^module\s+//'`" + provides="`head -1 ${file} | sed -r 's/^module\s+//'`"
+ version="`grep -i -E -o '^[a-z]*\s+[0-9.]*\s+[a-z0-9]*.qml' ${file} | awk '{print $2}' | sort -r | uniq | head -1`" + version="`grep -i -E -o '^[a-z]*\s+[0-9.]*\s+[a-z0-9]*.qml' ${file} | awk '{print $2}' | sort -r | uniq | head -1`"
+ if [ -z "$version" ]; then + if [ -z "$version" ]; then
+ echo "qmldeps: WARNING: no version number found, package version will be used." >&2 +# echo "qmldeps: WARNING: no version number found, package version will be used." >&2
+ echo "qml($provides)" + echo "qml($provides)"
+ else + else
+ echo "qml($provides) = $version" + echo "qml($provides) = $version"

View file

@ -61,7 +61,7 @@ Summary: The RPM package management system
Name: rpm Name: rpm
Epoch: 1 Epoch: 1
Version: %{libver}.%{minorver} Version: %{libver}.%{minorver}
Release: %{?prereldate:0.%{prereldate}.}70 Release: %{?prereldate:0.%{prereldate}.}71
License: LGPLv2.1+ License: LGPLv2.1+
Group: System/Configuration/Packaging Group: System/Configuration/Packaging
Url: http://rpm5.org/ Url: http://rpm5.org/