~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to debian/patches/30-icepatch2-remove-bz2.patch

  • Committer: Bazaar Package Importer
  • Author(s): Francisco Moya
  • Date: 2009-10-18 19:40:49 UTC
  • mfrom: (6.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091018194049-30fbgpjg33ywp9er
Tags: 3.3.1-7
* Reversed the php dependencies to avoid apache installation by default.
* Updated patch #2 from ZeroC forums.
* Added --preserve to icepatch2client to inhibit removal of *.bz2.
* Fixed wordsize/endian selection based on patch by Siim Pöder 
  (Closes: #551074).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This patch adds a --preserve flag to icepatch2client to avoid removal of
 
2
compressed files.  It could be used to setup hierarchical IcePatch2
 
3
services.
 
4
 
 
5
diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp
 
6
index 29cd151..262e5b2 100644
 
7
diff -Nur -x '*.orig' -x '*~' zeroc-ice/cpp/include/IcePatch2/ClientUtil.h zeroc-ice.new/cpp/include/IcePatch2/ClientUtil.h
 
8
--- zeroc-ice/cpp/include/IcePatch2/ClientUtil.h        2009-03-27 09:14:00.734546020 +0100
 
9
+++ zeroc-ice.new/cpp/include/IcePatch2/ClientUtil.h    2009-10-27 16:36:25.822302484 +0100
 
10
@@ -147,6 +147,7 @@
 
11
     const bool _thorough;
 
12
     const Ice::Int _chunkSize;
 
13
     const Ice::Int _remove;
 
14
+    const bool _removeCompressed;
 
15
     const FileServerPrx _serverCompress;
 
16
     const FileServerPrx _serverNoCompress;
 
17
 
 
18
diff -Nur -x '*.orig' -x '*~' zeroc-ice/cpp/src/IcePatch2/Client.cpp zeroc-ice.new/cpp/src/IcePatch2/Client.cpp
 
19
--- zeroc-ice/cpp/src/IcePatch2/Client.cpp      2009-03-27 09:14:00.842709242 +0100
 
20
+++ zeroc-ice.new/cpp/src/IcePatch2/Client.cpp  2009-10-27 16:36:25.822302484 +0100
 
21
@@ -242,6 +242,7 @@
 
22
     opts.addOpt("h", "help");
 
23
     opts.addOpt("v", "version");
 
24
     opts.addOpt("t", "thorough");
 
25
+    opts.addOpt("p", "preserve");
 
26
     
 
27
     vector<string> args;
 
28
     try
 
29
@@ -272,6 +273,10 @@
 
30
     {
 
31
         properties->setProperty("IcePatch2.Thorough", "1");
 
32
     }
 
33
+    if(opts.isSet("preserve"))
 
34
+    {
 
35
+        properties->setProperty("IcePatch2.RemoveCompressed", "0");
 
36
+    }
 
37
 
 
38
     if(args.size() > 1)
 
39
     {
 
40
diff -Nur -x '*.orig' -x '*~' zeroc-ice/cpp/src/IcePatch2/ClientUtil.cpp zeroc-ice.new/cpp/src/IcePatch2/ClientUtil.cpp
 
41
--- zeroc-ice/cpp/src/IcePatch2/ClientUtil.cpp  2009-03-27 09:14:00.846558063 +0100
 
42
+++ zeroc-ice.new/cpp/src/IcePatch2/ClientUtil.cpp      2009-10-27 16:38:31.258250308 +0100
 
43
@@ -32,9 +32,10 @@
 
44
 {
 
45
 public:
 
46
 
 
47
-    Decompressor(const string& dataDir) :
 
48
+    Decompressor(const string& dataDir, bool removeCompressed = true) :
 
49
         _dataDir(dataDir),
 
50
-        _destroy(false)
 
51
+        _destroy(false),
 
52
+        _removeCompressed(removeCompressed)
 
53
     {
 
54
     }
 
55
 
 
56
@@ -124,7 +125,8 @@
 
57
             {
 
58
                 decompressFile(_dataDir + '/' + info.path);
 
59
                 setFileFlags(_dataDir + '/' + info.path, info);
 
60
-                remove(_dataDir + '/' + info.path + ".bz2");
 
61
+                if (_removeCompressed)
 
62
+                    remove(_dataDir + '/' + info.path + ".bz2");
 
63
             }
 
64
             catch(const string& ex)
 
65
             {
 
66
@@ -145,6 +147,7 @@
 
67
     FileInfoSeq _filesDone;
 
68
 
 
69
     bool _destroy;
 
70
+    bool _removeCompressed;
 
71
 };
 
72
 
 
73
 }
 
74
@@ -155,6 +158,7 @@
 
75
     _thorough(communicator->getProperties()->getPropertyAsInt("IcePatch2.Thorough") > 0),
 
76
     _chunkSize(communicator->getProperties()->getPropertyAsIntWithDefault("IcePatch2.ChunkSize", 100)),
 
77
     _remove(communicator->getProperties()->getPropertyAsIntWithDefault("IcePatch2.Remove", 1)),
 
78
+    _removeCompressed (communicator->getProperties()->getPropertyAsIntWithDefault("IcePatch2.RemoveCompressed", 1) > 0),
 
79
     _log(0)
 
80
 {
 
81
     PropertiesPtr properties = communicator->getProperties();
 
82
@@ -190,7 +194,8 @@
 
83
     _dataDir(simplify(dataDir)),
 
84
     _thorough(thorough),
 
85
     _chunkSize(chunkSize),
 
86
-    _remove(remove)
 
87
+    _remove(remove),
 
88
+    _removeCompressed(true)
 
89
 {
 
90
     init(server);
 
91
 }
 
92
@@ -682,7 +687,7 @@
 
93
 bool
 
94
 IcePatch2::Patcher::updateFiles(const FileInfoSeq& files)
 
95
 {
 
96
-    DecompressorPtr decompressor = new Decompressor(_dataDir);
 
97
+    DecompressorPtr decompressor = new Decompressor(_dataDir, _removeCompressed);
 
98
 #if defined(__hppa)
 
99
     //
 
100
     // The thread stack size is only 64KB only HP-UX and that's not