Skip to content

Commit

Permalink
[connectionagent] add tracing package like connman's
Browse files Browse the repository at this point in the history
So it is easier to start debug output
  • Loading branch information
Lorn Potter committed Feb 5, 2014
1 parent d93f471 commit 3abe936
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/connectionagent.service
Expand Up @@ -4,7 +4,8 @@ Requires=dbus.service
After=pre-user-session.target

[Service]
ExecStart=/usr/bin/connectionagent
EnvironmentFile=-/etc/tracing/connectionagent/connectionagent.tracing
ExecStart=/usr/bin/connectionagent $TRACING
Type=dbus
BusName=com.jolla.Connectiond
Restart=always
Expand Down
2 changes: 2 additions & 0 deletions connd/qconnectionmanager.cpp
Expand Up @@ -787,6 +787,8 @@ void QConnectionManager::techChanged()
void QConnectionManager::browserRequest(const QString &servicePath, const QString &url)
{
Q_UNUSED(servicePath)
qDebug() << servicePath;
qDebug() << url;

Q_EMIT requestBrowser(url);
}
Expand Down
3 changes: 2 additions & 1 deletion connectionagent.pro
Expand Up @@ -14,6 +14,7 @@ equals(QT_MAJOR_VERSION, 5): {
SUBDIRS += connd

OTHER_FILES += rpm/connectionagent-qt5.spec \
rpm/connectionagent-qt5.yaml
rpm/connectionagent-qt5.yaml \
rpm/connectionagent.tracing
}

21 changes: 21 additions & 0 deletions rpm/connectionagent-qt5.spec
Expand Up @@ -15,6 +15,7 @@ Group: Communications/Connectivity Adaptation
License: LGPLv2
URL: http://github.com/lpotter/connectionagent
Source0: %{name}-%{version}.tar.bz2
Source1: connectionagent.tracing
Source100: connectionagent-qt5.yaml
Requires: connman-qt5-declarative
Requires: systemd
Expand Down Expand Up @@ -52,6 +53,15 @@ Requires: %{name} = %{version}
%description test
This package contains the auto tests for connection agent.

%package tracing
Summary: Configuration for Connectionagent to enable tracing
Group: Development/Tools
Requires: %{name} = %{version}-%{release}

%description tracing
Will enable tracing for Connectionagent


%prep
%setup -q -n %{name}-%{version}

Expand All @@ -75,6 +85,10 @@ rm -rf %{buildroot}
# << install pre
%qmake5_install

%make_install
mkdir -p %{buildroot}%{_sysconfdir}/tracing/connectionagent/
cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/tracing/connectionagent/

# >> install post
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
Expand Down Expand Up @@ -117,3 +131,10 @@ fi
%{_prefix}/opt/tests/libqofono/*
# >> files test
# << files test

%files tracing
%defattr(-,root,root,-)
%config %{_sysconfdir}/tracing/connectionagent
# >> files tracing
# << files tracing

1 change: 1 addition & 0 deletions rpm/connectionagent.tracing
@@ -0,0 +1 @@
TRACING=-d

0 comments on commit 3abe936

Please sign in to comment.