diff -ur t/distro-info-0.14build1/distro-info-util.c distro-info-0.14build1/distro-info-util.c
--- t/distro-info-0.14build1/distro-info-util.c 2014-10-21 02:06:31.000000000 -0600
+++ distro-info-0.14build1/distro-info-util.c 2016-04-06 10:45:57.935215287 -0600
@@ -587,6 +587,8 @@
#endif
#ifdef UBUNTU
bool filter_latest = false;
+ bool lts_option = false;
+ bool devel_option = false;
#endif
const struct option long_options[] = {
@@ -661,7 +663,12 @@
selected_filters++;
filter_cb = filter_devel;
#ifdef UBUNTU
- select_cb = select_latest_created;
+ devel_option = true;
+ if (lts_option) {
+ select_cb = select_latest_created;
+ filter_cb = filter_lts_with_devel;
+ selected_filters--;
+ }
#endif
#ifdef DEBIAN
select_cb = select_first;
@@ -722,8 +729,15 @@
case 'L':
// Only long option --lts is used
selected_filters++;
- filter_cb = filter_lts;
- select_cb = select_latest_release;
+ lts_option = true;
+ if (unlikely(devel_option)) {
+ select_cb = select_latest_created;
+ filter_cb = filter_lts_with_devel;
+ selected_filters--;
+ } else {
+ select_cb = select_latest_release;
+ filter_cb = filter_lts;
+ }
break;
#endif
diff -ur t/distro-info-0.14build1/ubuntu-distro-info.c distro-info-0.14build1/ubuntu-distro-info.c
--- t/distro-info-0.14build1/ubuntu-distro-info.c 2014-10-21 01:58:51.000000000 -0600
+++ distro-info-0.14build1/ubuntu-distro-info.c 2016-04-06 10:46:17.159215779 -0600
@@ -34,4 +34,8 @@
released(date, distro) && !eol(date, distro);
}
+static bool filter_lts_with_devel(const date_t *date, const distro_t *distro) {
+ return strstr(distro->version, "LTS") != NULL && !eol(date, distro);
+}
+
#include "distro-info-util.c"