summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-11-15 18:10:52 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-11-15 18:10:52 +0100
commit830f9676b4568fdf5704bd94c856d97d4c35813d (patch)
treeb7eb9bd9ca4fdb4c97da7b013583c87ab8f6e671 /ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff
parent0bfe4e2db5faf194cbafe6c3fcb8f331dd32f8c5 (diff)
downloadtde-packaging-830f9676b4568fdf5704bd94c856d97d4c35813d.tar.gz
tde-packaging-830f9676b4568fdf5704bd94c856d97d4c35813d.zip
DEB: adjusted to new 'core' folder for main packages.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff')
-rw-r--r--ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff39
1 files changed, 39 insertions, 0 deletions
diff --git a/ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff b/ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff
new file mode 100644
index 000000000..23fefb7dd
--- /dev/null
+++ b/ubuntu/maverick_automake/core/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff
@@ -0,0 +1,39 @@
+--- a/kio/kio/kprotocolmanager.cpp
++++ b/kio/kio/kprotocolmanager.cpp
+@@ -450,14 +450,19 @@
+ return d->useragent;
+
+ TQString supp;
++ int debian_append = 0;
+ struct utsname nam;
+ if( uname(&nam) >= 0 )
+ {
+ if( modifiers.contains('o') )
+ {
+ supp += TQString("; %1").arg(nam.sysname);
++ debian_append = 1;
+ if ( modifiers.contains('v') )
++ {
+ supp += TQString(" %1").arg(nam.release);
++ debian_append = 2;
++ }
+ }
+ if( modifiers.contains('p') )
+ {
+@@ -485,6 +490,16 @@
+ }
+ d->modifiers = modifiers;
+ d->useragent = CFG_DEFAULT_UAGENT(supp);
++
++ if (debian_append == 1)
++ d->useragent.append(" (Debian)");
++ else if (debian_append == 2)
++ {
++#define STRINGIFY(macro_or_string) STRINGIFY_ARG(macro_or_string)
++#define STRINGIFY_ARG(contents) #contents
++ d->useragent.append(" (Kubuntu package " STRINGIFY(DEBIAN_VERSION) ")");
++ }
++
+ return d->useragent;
+ }
+