OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 12-Sep-2003 15:18:23
Branch: HEAD Handle: 2003091214182200
Modified files:
openpkg-src/openpkg HISTORY rpm.patch.feature
Log:
In OpenPKG we use per-package %{_sourcedir} and %{_specdir}
definitions (macros have trailing ".../%{name}"). On removal
of source(s) and .spec file, this per-package directory would
be kept (usually <prefix>/RPM/SRC/<name>/), because RPM does
not know about this OpenPKG convention. So, let RPM try(!) to
remove the two directories (if they are empty) and just ignore
removal failures (if they are still not empty).
Summary:
Revision Changes Path
1.48 +1 -0 openpkg-src/openpkg/HISTORY
1.19 +37 -2 openpkg-src/openpkg/rpm.patch.feature
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/HISTORY
============================================================================
$ cvs diff -u -r1.47 -r1.48 HISTORY
--- openpkg-src/openpkg/HISTORY 12 Sep 2003 12:33:47 -0000 1.47
+++ openpkg-src/openpkg/HISTORY 12 Sep 2003 13:18:22 -0000 1.48
@@ -2,6 +2,7 @@
2003
====
+20030912 remove per-package %{_sourcedir} and %{_specdir} directories on --rebuild
20030912 allow "-bb --short-circuit" for continuing building a binary package
20030912 unconditionally remove temporary files of generated/executed scripts
20030912 do not remove the builded sources in %clean to be consistent with other
OpenPKG packages
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpm.patch.feature
============================================================================
$ cvs diff -u -r1.18 -r1.19 rpm.patch.feature
--- openpkg-src/openpkg/rpm.patch.feature 12 Sep 2003 12:33:47 -0000 1.18
+++ openpkg-src/openpkg/rpm.patch.feature 12 Sep 2003 13:18:22 -0000 1.19
@@ -272,7 +272,7 @@
+---------------------------------------------------------------------------
Index: build/build.c
--- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20
-+++ build/build.c 12 Sep 2003 11:27:33 -0000
++++ build/build.c 12 Sep 2003 12:54:07 -0000
@@ -33,7 +33,15 @@
for (p = spec->sources; p != NULL; p = p->next) {
@@ -315,7 +315,7 @@
+---------------------------------------------------------------------------
Index: build/build.c
--- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20
-+++ build/build.c 12 Sep 2003 11:27:33 -0000
++++ build/build.c 12 Sep 2003 12:54:07 -0000
@@ -242,7 +258,9 @@
exit:
@@ -326,6 +326,41 @@
(void) Unlink(scriptName);
scriptName = _free(scriptName);
}
+
++---------------------------------------------------------------------------
+| In OpenPKG we use per-package %{_sourcedir} and %{_specdir}
+| definitions (macros have trailing ".../%{name}"). On removal
+| of source(s) and .spec file, this per-package directory would
+| be kept (usually <prefix>/RPM/SRC/<name>/), because RPM does
+| not know about this OpenPKG convention. So, let RPM try(!) to
+| remove the two directories (if they are empty) and just ignore
+| removal failures (if they are still not empty).
++---------------------------------------------------------------------------
+Index: build/build.c
+--- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20
++++ build/build.c 12 Sep 2003 12:54:07 -0000
+@@ -337,6 +355,21 @@
+
+ if (what & RPMBUILD_RMSPEC)
+ (void) Unlink(spec->specFile);
++
++#ifdef OPENPKG
++ if (what & RPMBUILD_RMSOURCE) {
++ const char *pn;
++ pn = rpmGetPath("%{_sourcedir}", NULL);
++ Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY)
*/
++ pn = _free(pn);
++ }
++ if (what & RPMBUILD_RMSPEC) {
++ const char *pn;
++ pn = rpmGetPath("%{_specdir}", NULL);
++ Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY)
*/
++ pn = _free(pn);
++ }
++#endif
+
+ exit:
+ if (rc && rpmlogGetNrecs() > 0) {
+---------------------------------------------------------------------------
| Make sure the "Provides" headers are available for querying from the
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]