diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-04-03 18:05:50 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-04-03 18:05:50 +0200 |
commit | af5c905ec49085b7c396caf2c5166f0c34cbeb3f (patch) | |
tree | 56463d31ace48f127ed61169fdc2b4b8aedfcc56 /ubuntu/_base/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff | |
parent | e43172a6e74706afc06ff8d11cbfa769bc949cc1 (diff) | |
download | tde-packaging-af5c905ec49085b7c396caf2c5166f0c34cbeb3f.tar.gz tde-packaging-af5c905ec49085b7c396caf2c5166f0c34cbeb3f.zip |
DEB: use _base folder for a distro instead of specific distros (squeeze and maverick).
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'ubuntu/_base/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff')
-rw-r--r-- | ubuntu/_base/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ubuntu/_base/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff b/ubuntu/_base/kdelibs/debian/patches/kubuntu_19_debianize_useragent.diff new file mode 100644 index 000000000..715b2bd22 --- /dev/null +++ b/ubuntu/_base/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(" (Debian package " STRINGIFY(DEBIAN_VERSION) ")"); ++ } ++ + return d->useragent; + } + |