~synaptic-developers/synaptic/trunk

« back to all changes in this revision

Viewing changes to debian/patches/01_ubuntu_changelog.dpatch

  • Committer: Michael Vogt
  • Date: 2010-07-29 13:13:09 UTC
  • mfrom: (1529.2.106 ubuntu)
  • Revision ID: michael.vogt@ubuntu.com-20100729131309-0gdmwd09phcr1gc0
merged from the synaptic ubuntu branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
## DP: No description.
6
6
 
7
7
@DPATCH@
8
 
diff -urNad synaptic-0.56/common/rpackage.cc /tmp/dpep.Ri9fRS/synaptic-0.56/common/rpackage.cc
9
 
--- synaptic-0.56/common/rpackage.cc    2005-02-18 13:28:43.000000000 +0100
10
 
+++ /tmp/dpep.Ri9fRS/synaptic-0.56/common/rpackage.cc   2005-02-18 14:39:17.005309176 +0100
11
 
@@ -810,7 +810,7 @@
12
 
    if(verstr.find(':')!=verstr.npos)
13
 
       verstr=string(verstr, verstr.find(':')+1);
 
8
diff -urNad bug.153966.452564~/common/rpackage.cc bug.153966.452564/common/rpackage.cc
 
9
--- bug.153966.452564~/common/rpackage.cc       2010-04-14 00:16:09.000000000 +0200
 
10
+++ bug.153966.452564/common/rpackage.cc        2010-04-14 00:20:52.000000000 +0200
 
11
@@ -896,7 +896,7 @@
 
12
 {
14
13
    char uri[512];
15
 
-   snprintf(uri,512,"http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog",
16
 
+   snprintf(uri,512,"http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog",
 
14
    //FIXME: get the supportedOrigins from pkgStatus
 
15
-   if(origin() == "Debian") {
 
16
+   if(origin() == "Ubuntu") {
 
17
       string prefix;
 
18
       string srcpkg = srcPackage();
 
19
 
 
20
@@ -917,7 +917,7 @@
 
21
       if(verstr.find(':')!=verstr.npos)
 
22
          verstr=string(verstr, verstr.find(':')+1);
 
23
 
 
24
-      snprintf(uri,512,"http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog",
 
25
+      snprintf(uri,512,"http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog",
17
26
                                src_section.c_str(),
18
27
                                prefix.c_str(),
19
28
                                srcpkg.c_str(),
20
 
@@ -1293,7 +1293,7 @@
 
29
@@ -956,9 +956,23 @@
 
30
       struct stat filestatus;
 
31
       stat(filename.c_str(), &filestatus );
 
32
       if (filestatus.st_size == 0) {
 
33
-         out << "This change is not coming from a source that supports changelogs.\n" << endl;
 
34
-         out << "Failed to fetch the changelog for " << name() << endl;
 
35
-         out << "URI was: " << uri << endl;
 
36
+      // FIXME: Use supportedOrigins
 
37
+         if(origin() == "Ubuntu") {
 
38
+            string verstr;
 
39
+            if(availableVersion() != NULL) 
 
40
+               verstr = availableVersion();
 
41
+            
 
42
+            if(verstr.find(':')!=verstr.npos)
 
43
+               verstr=string(verstr, verstr.find(':')+1);
 
44
+            out << "The list of changes is not available yet.\n" << endl;
 
45
+            out << "Please use http://launchpad.net/ubuntu/+source/"<< srcPackage() << 
 
46
+                "/" << verstr << "/+changelog" << endl;
 
47
+            out << "until the changes become available or try again later." << endl;
 
48
+         } else {
 
49
+            out << "This change is not coming from a source that supports changelogs.\n" << endl;
 
50
+            out << "Failed to fetch the changelog for " << name() << endl;
 
51
+            out << "URI was: " << uri << endl;
 
52
+         }
 
53
       }
 
54
    };
 
55
    out.close();
 
56
diff -urNad bug.153966.452564~/common/rpackagestatus.cc bug.153966.452564/common/rpackagestatus.cc
 
57
--- bug.153966.452564~/common/rpackagestatus.cc 2010-04-13 23:31:39.000000000 +0200
 
58
+++ bug.153966.452564/common/rpackagestatus.cc  2010-04-14 00:18:59.000000000 +0200
 
59
@@ -69,7 +69,7 @@
21
60
       markUnsupported = true;
22
61
 
23
62
       // read supported labels
26
65
       stringstream sst1(labels);
27
66
       while(!sst1.eof()) {
28
67
         sst1 >> s;
29
 
@@ -1301,7 +1301,7 @@
 
68
@@ -77,7 +77,7 @@
 
69
       }
 
70
 
 
71
       // read supported origins
 
72
-      origin = _config->Find("Synaptic::supported-origins", "Debian");
 
73
+      origin = _config->Find("Synaptic::supported-origins", "Ubuntu");
 
74
       stringstream sst2(origin);
 
75
       while(!sst2.eof()) {
 
76
         sst2 >> s;
 
77
@@ -85,7 +85,7 @@
30
78
       }
31
79
       
32
80
       // read supported components
33
81
-      components = _config->Find("Synaptic::supported-components", "main updates/main");
34
82
+      components = _config->Find("Synaptic::supported-components", "main updates/main restricted");
35
 
       stringstream sst2(components);
36
 
       while(!sst2.eof()) {
37
 
         sst2 >> s;
 
83
       stringstream sst3(components);
 
84
       while(!sst3.eof()) {
 
85
         sst3 >> s;